Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Fix the "PR-to-Update-Go" GitHub Action#6605

Merged
zrhoffman merged 23 commits intoapache:masterfrom
ocket8888:fix-pr-gha
Mar 3, 2022
Merged

Fix the "PR-to-Update-Go" GitHub Action#6605
zrhoffman merged 23 commits intoapache:masterfrom
ocket8888:fix-pr-gha

Conversation

@ocket8888
Copy link
Copy Markdown
Contributor

@ocket8888 ocket8888 commented Mar 3, 2022

Fixes the GHA for opening PRs to update our Go version, which has been broken in some fashion since #6532 was merged.

This also expands doctest coverage a bit, makes those easier to run, fixes the broken unit tests, fixes strict typing compliance, and fixes a myriad of linting problems.


Which Traffic Control components are affected by this PR?

  • GitHub Actions

What is the best way to verify this PR?

What I did was change the contents of GO_VERSION on my fork's master branch to 1.17.6 and ran the action via manual trigger, verified that it opened a PR to update that file and also .env - see ocket8888#53. To run the unit tests use

python3 -m unittest discover .github/actions/pr-to-update-go/tests

To run the doctests use

python3 .github/actions/pr-to-update-go/pr_to_update_go/go_pr_maker.py

If this is a bugfix, which Traffic Control versions contained the bug?

  • master

PR submission checklist

  • This PR has tests
  • This PR has documentation
  • This PR has a CHANGELOG.md entry
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY

@ocket8888 ocket8888 added bug something isn't working as intended low impact affects only a small portion of a CDN, and cannot itself break one automation related to automated testing/deployment/packaging etc. labels Mar 3, 2022
@ocket8888 ocket8888 requested a review from zrhoffman March 3, 2022 00:22
Copy link
Copy Markdown
Member

@zrhoffman zrhoffman left a comment

Choose a reason for hiding this comment

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

Wow, thanks for documenting all of this, it's way more maintainable now. Just 1 URL to change and then it should be good.

Comment thread .github/actions/pr-to-update-go/pr_to_update_go/go_pr_maker.py Outdated
Comment thread .github/actions/pr-to-update-go/pr_to_update_go/go_pr_maker.py Outdated
Copy link
Copy Markdown
Member

@zrhoffman zrhoffman left a comment

Choose a reason for hiding this comment

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

  • Unit tests pass
  • Doctests pass
  • Go PR is generated correctly

@zrhoffman zrhoffman merged commit 77fc6f9 into apache:master Mar 3, 2022
@ocket8888 ocket8888 deleted the fix-pr-gha branch March 3, 2022 17:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

automation related to automated testing/deployment/packaging etc. bug something isn't working as intended go version low impact affects only a small portion of a CDN, and cannot itself break one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants