-
Notifications
You must be signed in to change notification settings - Fork 698
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
Add a --dry-run build check of cabal.project.release #9610
Conversation
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 for the workflow!
@philderbeast are you planning to work on this? No rush, of course. |
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.
Since actions/runner-images#7061 is closed, the workaround shouldn't be duplicated yet again.
Yes I am, @ulysses4ever, but have been putting all my focus on #9578, trying to get that one over the line ;-) |
5e101ce
to
5bc17c3
Compare
@ulysses4ever I removed the workaround. Could you please take another look at this? |
335fe77
to
4b69d63
Compare
@Mikolaj this could be ready to go but needs one more reviewer to approve. |
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'm sorry for the slow turnaround: I have been overwhelmed recently.
cf2a4d0
to
b9856d5
Compare
run: cabal v2-update | ||
- uses: actions/checkout@v4 | ||
- name: Check release project | ||
run: cabal build all --dry-run --project-file=cabal.project.release --index-state="hackage.haskell.org HEAD" |
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 very minor now but still: HEAD
is the default value for --index-state
(see the docs). We don't have a convention of explicitly reinforcing defaults in these workflows, I believe. So, doing it in one place looks confusing. What do you think?
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.
That one I put there intentionally to override the --index-state
from the project.
Line 8 in 833a17d
index-state: hackage.haskell.org 2024-02-13T10:16:13Z |
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.
For CI we want to test with HEAD
and bump the timestamp in the project when cutting a release, wouldn't we?
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 see... This is maybe a matter of preference but I think if you want to test cabal.project.release, it seems strange to override anything in it. But I can see someone arguing that testing the release config against the current Hackage state may be worthy.
At the very least, please, add a comment there why this index-state flag is needed.
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.
@Mikolaj in making a release should we be making mention of cabal.project.release
and when to set its index-state
? Do you think testing with HEAD
but fixing index-state
at release is the right way to go?
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.
Second, as a post-release step, the release manager could bump the index state
That has the big advantage of not blocking the release. Or is this a disadvantage? Let's discuss.
The index-state that is used to build releases can afford to be more conservative. The only constraint on the process is, presumably, that others can verifiably build their own version of the release using precisely the same dependency versions (if they so desire).
Stepping back a second, @Mikolaj I think you understood what I wrote perfectly and I find no fault in your analysis. In particular, I agree you do want to test Cabal against the latest Haskell universe, so you get a heads up of problems with newer dependencies.
Dealing with such breakage during regular pull request CI is a suboptimal time, but I agree it's better than "never". Dealing with it at the start of the release process, however, seems unnecessary. The index-state should be fixed for a release, and whether or not it's fixed at the beginning of the release, or immediately after the previous release, makes little difference to the release in the long run. Doing it after, however, means fixing breakage is not the release manager's responsibility. And there would be plenty of time to get the build working again should anything break.
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.
After a thought, I agree, bumping the index after a release is best, since it makes the already exhausting release process lighter. I've added the point to our release checklist. The counter-argument is that our releases often sync with a new GHC and we want to know if the toolchain builds with all the new versions of libraries prepared for the GHC just released on Hackage. However, our CI is almost never updated to include the new GHC (pre-alpha; so we'd need head.hackage for that) in time for the release, because too many problems emerge (so syncing with a GHC is partially decoupled with the release proper, with its own ticket for tracking the tasks, e.g., see #9729). So it's impossible to early test in CI all the new versions of packages, because we can't even test the new base. So the conservative index is just fine.
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.
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 @chreekat wants to do that on gitlab CI eventually. Given that our GHA CI takes very long already, maybe it's too much [edit: to enable on GHA] until we are ready to review our CI and trim down some other non-essential or near-duplicate jobs.
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.
After a thought, I agree, bumping the index after a release is best
I'm not so sure any more. We've just had a serious release issue due to that policy. Let's move the discussion to #9819.
8fd9268
to
108e900
Compare
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.
LGTM
- Cache of ~/.cabal/store not needed for --dry-run - Remove workaround for the new job only
The release project disables tests and benchmarks.
108e900
to
d6e067e
Compare
Got a segfault running workflow
|
Label merge+no rebase is necessary when the pull request is from an organisation. |
@Mergifyio backport 3.12 |
✅ Backports have been created
|
Add a --dry-run build check of cabal.project.release (backport #9610)
Fixes #9601. Add a
build --dry-run
quick job for lightweight checkingcabal.project.release
. Increases duplication inworkflows/quick-jobs.yml
.Template Β: This PR does not modify
cabal
behaviour (documentation, tests, refactoring, etc.)Include the following checklist in your PR: