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

Github release fails with status code 422 #1265

Open
ematipico opened this issue Dec 9, 2024 · 3 comments
Open

Github release fails with status code 422 #1265

ematipico opened this issue Dec 9, 2024 · 3 comments

Comments

@ematipico
Copy link
Contributor

ematipico commented Dec 9, 2024

I am testing knope inside a testing repository of mine, see find the workflow that most suites me.

I am doing experiments with prereleases, and when running the command knope release (type "Release"), the github action fails and I don't know why.

Note that knope actually creates the tag and the release notes.

To note that this is a monorepo, and in this run only one package was bumped.

@dbanty
Copy link
Member

dbanty commented Dec 13, 2024

I'm not able to see the logs for that run. What exactly does Knope output when it fails?

@ematipico
Copy link
Contributor Author

Sorry about that, here's the missage:

Run knope release --verbose
Loading package cli
cli/Cargo.toml has version 0.1.2-nightly.2
Looking for Git tags matching package name.
No tags found matching pattern cli/v
Loading package bar
bar/Cargo.toml has version 0.1.1
Looking for Git tags matching package name.
No tags found matching pattern bar/v
Searching for last package tag to determine if there's a release to release
No tags found matching pattern cli/v
Searching for last package tag to determine if there's a release to release
No tags found matching pattern bar/v
Error:   × Problem with workflow release

Error: github::api_request_error

  × Trouble communicating with GitHub while creating a
  │ release: 422: {"message":"Validation Failed","errors":
  │ [{"resource":"Release","code":"already_exists","field":"tag_name"}],"docum
  │ entation_url":"https://docs.github.com/rest/releases/releases#create-a-
  │ release","status":"422"}
  help: There was a problem communicating with GitHub, this may be a network
        issue or a permissions issue.

@dbanty
Copy link
Member

dbanty commented Dec 13, 2024

It seems like it this run was trying to double-publish a release that already exists, not the new nightly release.

It looks like the prepare-nightly workflow runs in its own job and doesn't commit/push the changes anywhere, so I don't think the build and release jobs are actually getting the updated Cargo.toml files. So then release job tries to re-publish the last stable release, which fails.

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

2 participants