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

Create a manual trigger for the release process #357

Merged
merged 1 commit into from Mar 29, 2021

Conversation

daviddavis
Copy link
Contributor

fixes #8404

then
echo "{{ plugin_name }} $VERSION has already been released. Skipping."
exit
fi
Copy link
Contributor Author

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.

Copy link
Member

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

@daviddavis daviddavis force-pushed the issue8404 branch 3 times, most recently from 6183301 to 24cc197 Compare March 18, 2021 18:11
@daviddavis
Copy link
Contributor Author

@pulpbot
Copy link
Member

pulpbot commented Mar 18, 2021

Attached issue: https://pulp.plan.io/issues/8404

@daviddavis daviddavis marked this pull request as ready for review March 18, 2021 22:26
{%- endif %}
- name: {{ "${{ matrix.name }}" }}
run: |
git checkout "origin/${GITHUB_REF##*/}" -- .ci
Copy link
Contributor Author

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?

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

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/)
Copy link
Member

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

@daviddavis
Copy link
Contributor Author

Setting this back to WIP. I have a couple more ideas for improvement.

@daviddavis daviddavis marked this pull request as draft March 19, 2021 12:22
@daviddavis
Copy link
Contributor Author

Nevermind, the changes are turning out to be quite large. Will follow up with another PR.

@daviddavis daviddavis marked this pull request as ready for review March 19, 2021 14:37
@@ -0,0 +1 @@
Created a manual trigger for our release process so the process could be rerun in case of failures.
Copy link
Member

Choose a reason for hiding this comment

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

Should this be misc?

Copy link
Contributor Author

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?

Copy link
Member

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 %}
Copy link
Member

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.

Copy link
Contributor Author

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
Copy link
Member

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?

@daviddavis daviddavis force-pushed the issue8404 branch 2 times, most recently from 48d23c2 to 7dced72 Compare March 22, 2021 17:50
@daviddavis
Copy link
Contributor Author

daviddavis commented Mar 22, 2021

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.

@daviddavis
Copy link
Contributor Author

Ping @ipanova @fao89 @mdellweg any more feedback?

Copy link
Member

@fao89 fao89 left a 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!

Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

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

YOLO

@daviddavis daviddavis merged commit f940f6a into pulp:master Mar 29, 2021
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

Successfully merging this pull request may close these issues.

None yet

5 participants