-
-
Notifications
You must be signed in to change notification settings - Fork 529
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 on CI that update-meson is properly ran #39527
base: develop
Are you sure you want to change the base?
Conversation
74afe78
to
627262f
Compare
Documentation preview for this PR (built with commit 6bf8c80; changes) is ready! 🎉 |
d74473a
to
82a439a
Compare
@tobiasdiez tried this once and it launched a months-long battle. It affects the sagemath-{objects,categories,etc} namespace packages. Though at this point they are unmaintained, nobody should be using them, and we could be more pragmatic about fixing whatever goes wrong. |
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.
Thanks. Generally looks good to me, but I have a few suggestions for the ci code.
.github/workflows/ci-meson.yml
Outdated
if: ${{ steps.check_update_meson.outcome == 'failure' }} | ||
shell: bash -l {0} | ||
run: | | ||
git status |
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 this can be combined with the previous step.
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 can't find some other good way to ensure simultaneously
- test step is not run when build step (or some previous step) fails
- test step is still run when update-meson step fails
- update-meson is ran reasonably early so that in principle someone want to check the failure of this early can do so (though if it's after build step it is kind of moot anyway)
also the purpose of git diff
is to print out the diff, there's no need to print out the diff when there's no change.
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.
Alternatively we could just remove the whole continue-on-error and let the test not run when update-meson is not ran (which might not be that bad of an idea? If pull request author is quickly notified then they can quickly fix the thing and repush)
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.
Alternatively we could just remove the whole continue-on-error and let the test not run when update-meson is not ran (which might not be that bad of an idea? If pull request author is quickly notified then they can quickly fix the thing and repush)
I would prefer this yes. It's the simplest method to maintain and also the one with the least surprising outcomes (if you forget to add a python file in the meson build, then you almost surely get 'confusing' test failures). Alternatively, you could argue that it's a kind of "linter"/checker and thus should be moved to the Lint workflow.
.github/workflows/ci-meson.yml
Outdated
run: | | ||
# Please see step 'Show files changed by update-meson' above and apply the changes, | ||
# or run tools/update-meson.py locally | ||
false |
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 quite understand the purpose of this check. Why would we want to have two steps that fail due to one reason?
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.
Thanks, LGTM. Feel free to set it to positive review once the CI is green.
Fixes sagemath#39172 Side note, can we just include the `__init__.py` to be tracked by git? ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. (not applicable) - [x] I have updated the documentation and checked the documentation preview. (no documentation change? Do we need to mention this in developer guide somewhere?) ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39527 Reported by: user202729 Reviewer(s): Tobias Diez, user202729
Fixes #39172
Side note, can we just include the
__init__.py
to be tracked by git?📝 Checklist
⌛ Dependencies