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

Initial (Github Actions) Workflows for Ansible Community Package release #265

Merged
merged 37 commits into from Feb 6, 2024

Conversation

anweshadas
Copy link
Collaborator

Introduction

The Release Manager(s) (RM) for Ansible Community Package, are always the Ansible Community Team members, who are Red Hatters. But with this endeavor we are trying to open up the release process to the community members. So an interested and designated group of people can be Release Ansible.
Who can be the release managers for Ansible Community Package?

Anyone from the Ansible Community can be the RM for Ansible Community Package. We will be forming a Release Manager Working Group from the community who will be not only doing the release but also taking the decisions and responsible for work in and around the release process (barring certain reasonable restrictions and limitations).

Automation of the current release process

We are trying to automate the current release process with Github Actions (GHA). We wrote the initial workflow(s). This workflow tries to follow the current release process as much as possible.

Step 1

Run the ansible-release workflow to create the release PR to the ansible-build-data repo.

Step 2

After the PR is merged by a maintainer, run upload-to-pypi to upload the distribution packages to PyPI.

Step 3

After uploading the source to PyPI run docsbuild-release workflow to create PR to ansible-documentation.

Plan for betterment this workflow

Here is the plan to improve the intial workflow

The process needs to be divided in two parts: Pre-Release and Release

Pre- Release includes:

  • Creating PR in ansible-build-data
  • Merging (manually) the above mentioned PR

Pre-requisite : A new ansible-core release will trigger the Pre-Release workflow

Release workflow includes:

  • Make and upload GHA artifact
  • Creating PR in ansible-documentation
  • Releasing the tar in test.pypi.org
  • Releasing the tar to PyPI
  • Creating the Git Tag
  • Releasing the distribution packages to PyPI

Pre-requisite : The release workflow will run (manually) only after the merging of ansible-build-data PR.

The new upstream recommendations for building and publishing from github action to (Test)PyPI:
pypa/packaging.python.org#1261

Copy link
Contributor

@gotmax23 gotmax23 left a comment

Choose a reason for hiding this comment

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

Thank you so much for working on this! This should streamline the process a lot. I'll comment on the actual code for now. I'll respond to the overall proposal later.

I would also remove the 8.4.0 release files. This combined with the 18 commits that aren't split into logical changes makes this a bit difficult to review.

.github/workflows/ansible-release.yml Outdated Show resolved Hide resolved
.github/workflows/ansible-release.yml Show resolved Hide resolved
.github/workflows/ansible-release.yml Outdated Show resolved Hide resolved
.github/workflows/upload-to-pypi.yml Outdated Show resolved Hide resolved
.github/workflows/upload-to-pypi.yml Outdated Show resolved Hide resolved
.github/workflows/ansible-release.yml Outdated Show resolved Hide resolved
.github/workflows/ansible-release.yml Outdated Show resolved Hide resolved
.github/workflows/upload-to-pypi.yml Outdated Show resolved Hide resolved
.github/workflows/upload-to-pypi.yml Outdated Show resolved Hide resolved
Comment on lines 5 to 11
ansible_version:
description: 'Release Version. Example : 11.1.0'
required: true
ansible_major_version:
description: 'Exmaple 11'
required: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Future enhancement: make the workflow determine ansible_version from ansible_major_version,

Copy link
Member

Choose a reason for hiding this comment

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

Maybe vice versa?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oops, that's what I meant in the first place.

@anweshadas
Copy link
Collaborator Author

Still working on this, more things left to be updated.

Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

(nitpick) Let's the unnecessary YAML quotes that are added added inconsistently in arbitrary places.

.github/workflows/ansible-release.yml Outdated Show resolved Hide resolved
.github/workflows/ansible-release.yml Outdated Show resolved Hide resolved
.github/workflows/ansible-release.yml Outdated Show resolved Hide resolved
.github/workflows/ansible-release.yml Outdated Show resolved Hide resolved
.github/workflows/ansible-release.yml Outdated Show resolved Hide resolved
@webknjaz
Copy link
Member

@anweshadas another review round complete. Part of the comments are style normalization — you can safely accept the suggested changes in a batch from the Files tab in this PR.
And there's a few comments pointing out more serious problems that I believe should be addressed before merging this PR.

@felixfontein
Copy link
Contributor

We tried to apply most of the feedback. PTAL.

Copy link
Member

@webknjaz webknjaz left a comment

Choose a reason for hiding this comment

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

You have my blessing, I suppose..

@gotmax23 gotmax23 self-requested a review February 5, 2024 17:37
@gotmax23
Copy link
Contributor

gotmax23 commented Feb 5, 2024

Requesting a review from myself. I'll give this another look.

@gotmax23
Copy link
Contributor

gotmax23 commented Feb 6, 2024

Other than that, this looks good to me. Thanks @anweshadas for all your work on this and for responding to all the feedback! This is really great.

Co-authored-by: Maxwell G <maxwell@gtmx.me>
Copy link
Contributor

@felixfontein felixfontein 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 get this merged so we can do further improvements in follow-up PRs :)

@felixfontein
Copy link
Contributor

CI failures are unrelated.

@felixfontein felixfontein merged commit 51535ac into ansible-community:main Feb 6, 2024
1 of 3 checks passed
@felixfontein
Copy link
Contributor

Thanks @anweshadas @gotmax23 @webknjaz for your work on this!

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