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

Cannot make a release with the latest change to release.sh #833

Closed
lubosmj opened this issue Jan 23, 2024 · 1 comment · Fixed by #835
Closed

Cannot make a release with the latest change to release.sh #833

lubosmj opened this issue Jan 23, 2024 · 1 comment · Fixed by #835

Comments

@lubosmj
Copy link
Member

lubosmj commented Jan 23, 2024

It is not possible to perform a release without disabling all the selected options:
image


The following behaviour is observable in the pulp-container repository after applying the latest changes from the temaplate:

remote: error: GH006: Protected branch update failed for refs/heads/2.16.        
remote: error: 5 of 5 required status checks are expected.        
To https://github.com/pulp/pulp_container
 * [new tag]           2.16.4 -> 2.16.4
 ! [remote rejected]   2.16 -> 2.16 (protected branch hook declined)
error: failed to push some refs to 'https://github.com/pulp/pulp_container'

The issue is relevant to this line of code:

git push origin "${BRANCH}" "${NEW_VERSION}"


Not to forget that if the script fails to succeed, there is still a new tag created which results into the following error when trying to re-run the job:

fatal: tag '2.16.4' already exists
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.18/x64/bin/bump2version", line 8, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/bumpversion/cli.py", line 137, in main
    _tag_in_vcs(vcs, context, args)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/bumpversion/cli.py", line 728, in _tag_in_vcs
    vcs.tag(sign_tags, tag_name, tag_message)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/bumpversion/vcs.py", line 138, in tag
    subprocess.check_output(command)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/subprocess.py", line [41](https://github.com/pulp/pulp_container/actions/runs/7629035585/job/20781496890#step:7:42)5, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'tag', '2.16.4', '--message', 'Release 2.16.4']' returned non-zero exit status 128.
@lubosmj
Copy link
Member Author

lubosmj commented Jan 23, 2024

Consider that the current Release Pipeline action does not push the package to PyPI. It should dispatch a new workflow that uploads missing parts to PyPI, see c53c1e3. However, this does not seem to work at the moment.

mdellweg added a commit to mdellweg/plugin_template that referenced this issue Jan 24, 2024
When pushing with the default workflow token, you would need to
disable the branch protection and the subsequent publish workflow
will not trigger.

Fixes pulp#833
@pulpbot pulpbot moved this to Needs review in RH Pulp Kanban board Jan 24, 2024
mdellweg added a commit that referenced this issue Jan 24, 2024
When pushing with the default workflow token, you would need to
disable the branch protection and the subsequent publish workflow
will not trigger.

Fixes #833
@pulpbot pulpbot moved this from Needs review to Done in RH Pulp Kanban board Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant