Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

O3-2309: Implement dynamic frontend docker images for e2e test #765

Merged
merged 16 commits into from
Aug 7, 2023

Conversation

Piumal1999
Copy link
Collaborator

@Piumal1999 Piumal1999 commented Jul 25, 2023

Requirements

Summary

With this PR, we can avoid resource limitation issues in GitHub actions. When the e2e tests are running, it will automatically create a lightweight prod version of the front end (as a docker image), only containing the changed MFs and the necessary MFs. So it can run with less than 300 MBs of RAM. That docker image will be used to create the frontend instance of the e2e docker-compose stack. This will also reduce the loading durations. (This will also be implemented in patient-chart in future.)

Screenshots

image

Related Issue

https://issues.openmrs.org/browse/O3-2309

Other

Reference: openmrs/openmrs-esm-patient-chart@1ac7ed5

The failing 2 tests will be fixed with #763

e2e/support/github/run-e2e-docker-env.sh Outdated Show resolved Hide resolved
e2e/support/github/Dockerfile Outdated Show resolved Hide resolved
@ibacher
Copy link
Member

ibacher commented Aug 2, 2023

@Piumal1999 Do you have any idea why the e2e tests passed on the other PR but not here? In all honesty, flaky tests are worse than no tests at all, so if we don't know how to fix them, I'd prefer we just kill off the tests that are consistently failing.

@Piumal1999
Copy link
Collaborator Author

Piumal1999 commented Aug 2, 2023

@Piumal1999 Do you have any idea why the e2e tests passed on the other PR but not here? In all honesty, flaky tests are worse than no tests at all, so if we don't know how to fix them, I'd prefer we just kill off the tests that are consistently failing.

There were some inconsistencies in the port number I used. I just fixed that, and I hope it will fix the tests

(In the other PR, I was directly using the dev server. The tests work perfectly with the dev server but fail locally due to some reason )

@Piumal1999
Copy link
Collaborator Author

The patient chart issue got fixed after upgrading the openmrs and framework versions. And all the tests are passing.

(I'm going to revert some changes which are already added to PR #763 to prevent conflicts. So the tests on this PR might fail, but it is ready to merge)

jq -n \
--arg apps "$apps" \
--arg app_names "$(echo ${app_names[@]})" \
'{"@openmrs/esm-primary-navigation-app": "next", "@openmrs/esm-home-app": "next", "@openmrs/esm-patient-chart-app": "next"} + (
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: We don't need the esm-login-app here because we use the API for login in e2e tests. We can add the esm-offline-tools-app when we are testing offline features.

@Piumal1999 Piumal1999 changed the title Dynamic frontend Docker image for e2e test O3-2309: Implement dynamic frontend docker images for e2e test Aug 3, 2023
@Piumal1999 Piumal1999 marked this pull request as ready for review August 3, 2023 17:20
Copy link
Member

@jayasanka-sack jayasanka-sack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Piumal1999 !

@jayasanka-sack jayasanka-sack merged commit 012ca12 into openmrs:main Aug 7, 2023
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants