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

chore(ci): Fix release workflow build step checking out wrong commit #275

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

dav-pascual
Copy link
Member

@dav-pascual dav-pascual commented Oct 5, 2023

actions/checkout checks out the latest commit at the time of the workflow trigger,
hence any commit done during the workflow is not included.
Fixing this to checkout the actual latest (release) commit.

@dav-pascual dav-pascual added the CI/CD Label to use for automation changes in CI/CD label Oct 5, 2023
@dav-pascual dav-pascual self-assigned this Oct 5, 2023
@dav-pascual dav-pascual force-pushed the fix-pypi-publish branch 2 times, most recently from b5016e7 to dda3b4f Compare October 5, 2023 10:01
@dav-pascual dav-pascual changed the title ci: Fix release workflow build step checking out wrong commit chore(ci): Fix release workflow build step checking out wrong commit Oct 5, 2023
@dav-pascual
Copy link
Member Author

dav-pascual commented Oct 5, 2023

@pvoborni
Copy link
Contributor

pvoborni commented Oct 5, 2023

I don't understand how does this fix #273. There, the issue seems to be:

404 Client Error: Not Found for url: https://github.com/neoave/mrack/releases/download/v1.16.0/mrack-1.16.0.tar.gz

I.e. the release process did not upload the archive here: https://github.com/neoave/mrack/releases/tag/v1.16.0

But how does the checkout fix it? I was looking at latest test&release run: https://github.com/neoave/mrack/actions/runs/6406506972 and that seems to fail on the fact the version was not bumped as the commit used "chore" type in commit (i think that "chore" doesn't bump version") it would need to be fix, feat or something else.

The fact that the workflow runs with the version it was executed on seems good to me. Or what is the issue with it?

@dav-pascual
Copy link
Member Author

I don't understand how does this fix #273. There, the issue seems to be:

404 Client Error: Not Found for url: https://github.com/neoave/mrack/releases/download/v1.16.0/mrack-1.16.0.tar.gz

I.e. the release process did not upload the archive here: https://github.com/neoave/mrack/releases/tag/v1.16.0

But how does the checkout fix it? I was looking at latest test&release run: https://github.com/neoave/mrack/actions/runs/6406506972 and that seems to fail on the fact the version was not bumped as the commit used "chore" type in commit (i think that "chore" doesn't bump version") it would need to be fix, feat or something else.

The fact that the workflow runs with the version it was executed on seems good to me. Or what is the issue with it?

@pvoborni Oops, didn't look at the packit logs and thought it was about the same issue. I'll unlink the issue.

The workflow run you looked at, indeed won't upload the new version to pypi because @Tiboris already did so manually.
In that workflow it also gets the right version (1.16.0) because the release commit was done in a previous workflow run, so the commit "is there" when the workflow starts: https://github.com/neoave/mrack/actions/runs/6406506972/job/17391355353#step:12:61

Look at this workflow run: https://github.com/neoave/mrack/actions/runs/6241434877
It's doing semantic release for 1.16 version, but it's trying to publish 1.15.1 because it didn't get the latest release commit done during the semantic release step.

actions/checkout checks out the latest commit at the time of the workflow trigger,
hence any commit done during the workflow is not included.
Fixing this to checkout the actual latest (release) commit.

Signed-off-by: David Pascual <[email protected]>
Copy link
Contributor

@pvoborni pvoborni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, the release was executed on top of 278d1b1 the semantic release added 41b12e7 but the python release was still done on top of 278d1b1 , thus the version from 41b12e7 was not included.

And the reason why we did not encounter it before is that the release process was changed in 278d1b1

Copy link
Member

@Tiboris Tiboris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dav-pascual maybe in same step of building python dist packages we can use action to upload them to the release page as the files will be present at this point.

this will fix i hope the pypi upload

please note this will be affected for future releases and 1.16.0 is not proposed to fedora rpms yet.

@dav-pascual dav-pascual merged commit e8e20f1 into neoave:main Oct 9, 2023
@dav-pascual dav-pascual deleted the fix-pypi-publish branch January 23, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/CD Label to use for automation changes in CI/CD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants