This repository has been archived by the owner on May 3, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix(holocron): bad modules could cause crashes and prevent restart #631
fix(holocron): bad modules could cause crashes and prevent restart #631
Changes from 10 commits
47caed4
46d4c5d
5c04d60
d7b988b
9dadb44
2e6e400
221a0a5
0674669
0ec0071
41089bb
98e2774
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we loading the same module
'cultured-frankie';
again? if so we should try and merge this test with the one above if you are able to get both error messages at the same time. This is to avoid overloading the integration tests and make them take longer unnecessarilyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was only able to get one regex matcher to work at a time within a single test case. Thats why I added another test case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the log look like? does it log both lines?
/Failed to get external react-intl from root module/
and
/There was an error loading module (?<moduleName>.*) at (?<url>.*). Reverting back to (?<workingModule>.*)
?If so we should try and find why the regex is not matching in one single case, loading the same module to the module map twice and that 5sec delay is expensive if we can avoid it 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have we not tested the same scenario above when requiring
react-intl
? the only difference I can see isunhealthy-frank
tries to load a different externalsemver
?If this test is to test the scenario when 2 modules with broken required externals are deployed consecutively, then the afterEach in line 754 is resetting the module map anyway and removing
cultured-frankie
from the previous testThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test case test when a new module is added to the module map with an error. The previous test case tests when a module's version is updated with an issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right so we are testing 1 case when the same module is updated (version bump) and it is broken and also when a brand new module which is broken is added for the first time? is that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please set a lower max poll time instead of waiting a full 5s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/americanexpress/one-app/blob/main/src/server/utils/pollModuleMap.js#L35-L40
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also for future reference here is where we set it - https://github.com/americanexpress/one-app/blob/main/prod-sample/one-app/base.env#L14
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we set a lower max pall time for the integration tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5 seconds is hardcoded as the min - https://github.com/americanexpress/one-app/blob/main/src/server/utils/pollModuleMap.js#L35-L40
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can reuse any of the other franks rather than creating a brand new one? If we deploy the correct version of the root module that doesn't provide any externals, I think
cultured-frankie@0.0.1
should be enough?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was easier to add a new module that only had one version with an issue, than to manage an existing module with one working version and one broken one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just thinking that it is more work to maintain another frank but I guess now we removed the package-locks from them we shouldn't need to change them too much.
Is it achievable with the franks that we already got? if so maybe double check with the team to see what's their preference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maintenance aside, building another module would also be expensive and increase integration tests build time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An additional version of an existing module would have the same downside.