Skip to content

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

Merged
felixfontein merged 37 commits into
ansible-community:mainfrom
anweshadas:test
Feb 6, 2024
Merged

Initial (Github Actions) Workflows for Ansible Community Package release #265
felixfontein merged 37 commits into
ansible-community:mainfrom
anweshadas:test

Conversation

@anweshadas

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

@gotmax23 gotmax23 left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/upload-to-pypi.yml Outdated
Comment thread .github/workflows/upload-to-pypi.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/upload-to-pypi.yml Outdated
Comment thread .github/workflows/upload-to-pypi.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/upload-to-pypi.yml Outdated
Comment thread .github/workflows/upload-to-pypi.yml Outdated
Comment thread .github/workflows/upload-to-pypi.yml Outdated
Comment thread .github/workflows/upload-to-pypi.yml Outdated
Comment thread .github/workflows/upload-to-pypi.yml Outdated
Comment thread .github/workflows/upload-to-pypi.yml Outdated
Comment thread .github/workflows/upload-to-pypi.yml Outdated
@anweshadas

Copy link
Copy Markdown
Collaborator Author

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

Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated

@webknjaz webknjaz left a comment

Copy link
Copy Markdown
Member

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.

Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml
Comment thread .github/workflows/ansible-release.yml
@webknjaz

Copy link
Copy Markdown
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.

Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml
Comment thread .github/workflows/ansible-release.yml
Comment thread .github/workflows/ansible-release.yml Outdated
@felixfontein

Copy link
Copy Markdown
Contributor

We tried to apply most of the feedback. PTAL.

Comment thread .github/workflows/ansible-release.yml

@webknjaz webknjaz left a comment

Copy link
Copy Markdown
Member

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

gotmax23 commented Feb 5, 2024

Copy link
Copy Markdown
Contributor

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

Comment thread .github/workflows/ansible-release.yml Outdated
Comment thread .github/workflows/ansible-release.yml Outdated
@gotmax23

gotmax23 commented Feb 6, 2024

Copy link
Copy Markdown
Contributor

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>

@felixfontein felixfontein left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

CI failures are unrelated.

@felixfontein felixfontein merged commit 51535ac into ansible-community:main Feb 6, 2024
@felixfontein

Copy link
Copy Markdown
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.

5 participants