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

Add a pr-run-mode that can handle projects with different versions #905

Open
ericswanson-dfinity opened this issue Apr 5, 2024 · 0 comments

Comments

@ericswanson-dfinity
Copy link

Feature request: make it so the release workflow for a PR can cope with a workspace that has projects that have different version numbers. Something like pr-run-mode="plan-by-project".

Rather than reporting “too many unrelated apps in your workspace to coherently Announce,” run cargo dist plan with the tag and version of each project.

Example: here is a PR where we were trying to update the version of one project in a workspace:

Since we were using the default pr-run-mode="plan", we got this error:

× There are too many unrelated apps in your workspace to coherently Announce!
help: Please either specify --tag, or give them all the same version

Here are some options:

--tag=v0.3.1 will Announce: nns
--tag=v0.4.0 will Announce: sns

you can also request any single package with --tag=nns-v0.3.1

It's a PR, so we can't specify a tag, but from the error message we can see that cargo dist plan already knows which tags we should specify for every project.

We ended up having to update the versions of both projects. This was fine; we were going to update both anyway; but it won't always be the case that project versions are in lockstep.

I would like for the release.yml workflow in this case to effectively run cargo dist plan --tag=<project>-v<project version> for every project in the workspace, which in this example would be:

cargo dist plan --tag=nns-v0.3.1
cargo dist plan --tag=sns-v0.4.0

In other words: I’m opening a PR to update the version of one project in a workspace. I’m going to follow it up with cargo dist plan --tag=<project>-v<project version> && cargo release -p <project>. I'd like the release workflow to do what it can to verify that this will work, even if that means running cargo dist plan for every project.

As far as I can see, the only workaround is to set pr-run-mode="skip".

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

No branches or pull requests

1 participant