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
Create a manual trigger for the release process #357
Conversation
| then | ||
| echo "{{ plugin_name }} $VERSION has already been released. Skipping." | ||
| exit | ||
| fi |
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 code is basically copied over from the other release scripts such as publish_client_pypi.sh.
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.
why draft? It seems ready to me
6183301
to
24cc197
Compare
|
Attached issue: https://pulp.plan.io/issues/8404 |
| {%- endif %} | ||
| - name: {{ "${{ matrix.name }}" }} | ||
| run: | | ||
| git checkout "origin/${GITHUB_REF##*/}" -- .ci |
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.
It’s probably better to use the branch’s ci scripts rather than the tag’s version of the ci scripts?
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 not quite following here. Why?
And which branch do you mean? "2.2" for a "2.2.5" release?
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 workflow runs against the tag (see here). It does so in order to build and publish the tag's files to pypi, docs.pulpproject.org, etc.
However, consider the case that you try to release a tag but encounter a problem in the CI scripts. You fix the CI scripts but the workflow will still run against the tag's version of the CI scripts. So the only fix would be to create a new tag with new ci files.
To prevent such a problem, I thought we could check out the .ci scripts from the branch instead.
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.
Maybe I am overthinking things though?
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.
So in case the Release failed, and rerunning does not suffice, but you need to fix CI files, you push them to the release branch and then restart? Maybe this is solving non-obvious corner-case problems. But we should have this troubleshooting method documented somewhere and linked from/to this comment.
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 added a comment to the release workflow. I'll also add a section about troubleshooting failed releases to our release guide.
| @@ -7,6 +7,14 @@ cd "$(dirname "$(realpath -e "$0")")"/../.. | |||
|
|
|||
| set -euv | |||
|
|
|||
| export VERSION=$(http pulp/pulp/api/v3/status/ | jq --arg plugin {{ plugin_app_label }} -r '.versions[] | select(.component == $plugin) | .version') | |||
| export response=$(curl --write-out %{http_code} --silent --output /dev/null https://pypi.org/project/pulp-npm-client/$VERSION/) | |||
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.
please don't forget to remove hard-coded npm plugin
s/pulp-npm-client/{{ plugin_dash }}-client
|
Setting this back to WIP. I have a couple more ideas for improvement. |
|
Nevermind, the changes are turning out to be quite large. Will follow up with another PR. |
| @@ -0,0 +1 @@ | |||
| Created a manual trigger for our release process so the process could be rerun in case of failures. | |||
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.
Should this be misc?
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 was thinking feature since the audience of the changelog is plugin writers and we want to inform them that the release process is now dispatched manually instead of automatically when they push a tag?
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.
Right this is the plugin_template. Not pulpcore...
| {%- if update_redmine %} | ||
| - name: Update Redmine | ||
| run: bash .ci/scripts/update_redmine.sh | ||
| {%- endif %} |
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.
The "if"s from here should be represented in the matrix above, IMHO.
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.
Oh yea, I totally forgot. Thanks.
| {%- endif %} | ||
| - name: {{ "${{ matrix.name }}" }} | ||
| run: | | ||
| git checkout "origin/${GITHUB_REF##*/}" -- .ci |
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 not quite following here. Why?
And which branch do you mean? "2.2" for a "2.2.5" release?
48d23c2
to
7dced72
Compare
|
I decided to revert the publish matrix. I realized that it wasn't necessary to parallelize the publish tasks. Doing so added extra complexity. Instead we are checking that each release artifact is published and skipping the step if it is. |
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.
let's try it!
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.
YOLO
fixes #8404