-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
test: enable coredump for the unit tests #6107
Conversation
Performance Report✔️ no performance regression detected Full benchmark results
|
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.
Not sure this is the right idea or not. Am wondering if it is better to run this as a separate workflow, on-demand, so that we do not get hit with the debug build overhead on every run. What are your thoughts?
.github/workflows/test.yml
Outdated
if: ${{ failure() && steps.unit_tests.conclusion == 'failure' }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: core-dump |
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.
will this over-write the existing if there are multiple?
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 think it is associated to the workflow run. So it will rewritten only if we re-run the workflow.
.github/workflows/test.yml
Outdated
- name: List down all files | ||
if: ${{ failure() && steps.unit_tests.conclusion == 'failure' }} | ||
run: ls -l |
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.
Curious!!! How does this fit into the solution? Is it to make sure we log the dump to stdout or something?
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.
This is for debugging purposes, to make sure. the coredump was generated with correct or may be different file names.
.github/workflows/test.yml
Outdated
- name: Replace nodejs with debug build | ||
run: sudo cp -f node $(which node) |
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.
Curious why you chose to only replace for unit-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.
Because we were observing the Segfault
only during the unit tests.
@matthewkeil I tried triggering on-demand over 20 times and |
.github/workflows/test.yml
Outdated
- name: Install unzip | ||
run: sudo apt-get install unzip | ||
- name: Download nodejs debug build | ||
run: curl -L "https://drive.google.com/uc?export=download&id=1hlhbbQi-NJi8_WjULvOdo-K_tfZFzN3Z&confirm=t" > nodejs.zip |
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.
You can compress all the steps in a single multi-line inlined script, not sure if you need so much granularity at the UI level
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 don't see any issue even performing granular steps. Seems more useful while looking in the logs and seeing the UI. In the end both achieve the same thing.
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.
True, just an organizational detail. More verbose code and more lines in exchange for step by step reporting at the UI level. I would prefer to compact them but don't want to spend days fighting over this detail either
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.
As I said I prefer this granular approach, otherwise we can compact a lot of workflow in single bash script files and run in single step to avoid multi step reporting on the UI.
@matthewkeil @dapplion I restructured the workflow actions. Please re-review now so we can close this PR. |
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.
The restructuring you did looks great!! As @dapplion mentioned the output is a bit verbose though.
I still tend to think that running with debug for all CI runs, but only on unit-tests, is not the right approach but you are determined and I can definitely get behind that aspect of this PR. I have had challenges catching this so another approach seems helpful and is appreciated.
LGTM 👍
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.
We can enable this for now and assess the pain of the slowdown.
Hopefully we will capture fruitful coredumps quickly, and if not, we can timebox this approach and revert this after N months.
@matthewkeil Running only for unit tests is because we observed segfault only during the unit tests so far. And each job run in isolation so can't affect each other behavior. If we observed segfault anywhere else we can reuse the same actions. I just want to get the coredump at least once 🦀 |
Yes I agree, if we don't observe the coredump in a week or two, we should revert it. But keeping the custom actions to reuse in future if needed. So why I restructured those actions as independent actions and not part of the workflow. |
🎉 This PR is included in v1.13.0 🎉 |
Motivation
Improve debugging capabilities.
Description
Make sure if tests fails again we have coredump to debug further.
Steps to test or reproduce
Run all tests