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

Switch makebumpver to jira #5380

Merged

Conversation

jkonecny12
Copy link
Member

Backport of #5367.

Migrate our current makebumpver script from Bugzilla checking to JIRA.

We are changing the convention from:

Resolves: rhbz#<bug number>
Related: rhbz#<bug number>

to

Resolves: <RHEL issue>
Related: <RHEL issue>
Reverts: <RHEL issue>

These scripts are a bit outdated so let's take a brief change on this during the path:

  • Base migration to pep8 (still names of the variables and functions are not correct)
  • Backport fix to work with infra: ... together with ... (#infra) in the infra commits - improves backporting for us
  • Improve duplication in the code
  • Improve logging - less mess up output compared until you enable --debugging
  • Switch from sys.std*** to print
  • Backporting fixes to the templating system
  • Fixing up the documentation
  • Removing outdated git scripts

This PR is bacport of:

The j2 files are used for our templates and have syntax which is not
recognized by pylint. This way we will make sure that pylint is not
scaning template files but only the rendered files from these templates.

(cherry picked from commit de2042f)
Let's make this consistent through the file.

(cherry picked from commit 3eef8d6)
Let's make the method a bit more sane by moving the bug checking code
out of giant if clause.

(cherry picked from commit 7d0bbe2)
(cherry picked from commit 0c7b25e)
Let's make it a function instead of copied code on plenty of places.

(cherry picked from commit a5533d4)
Without this change we will get all the debug outputs from the bugzilla
JIRA calls which makes the output hard to read. Let's enable these only
in debugging mode.

(cherry picked from commit 03e9e50)
Validate JIRA issues on commits with Red Hat JIRA and not to bugzilla
anymore. From RHEL-8.10 and RHEL-9.4 Bugzilla is not used by Red Hat any
JIRA is the successor. Let's adapt this script to that.

It's simplified version of RHBZ solution.

What is different:
* JIRA don't have ACKs but instead states
* JIRA don't support Related / Resolves - still in the code because it
could help us but JIRA is just taking the issue and ignores the rest.
* Don't support BZ in summary (we are not using that anymore)
* Print confirmation that the given commit is correct

(cherry picked from commit 07bef45)
Remove Bugzilla code which was migrated to JIRA and remove arguments
which can't be reasonably used with JIRA.

Remove:
--map
Mapping between Fedora and RHEL bugs is functionality which is not
used anymore and it can't be even reasonably used from Bugzilla to JIRA.

--skip-acks and --skip-all was renamed to --skip
ACKs are not used on JIRA anymore so having two different skip
parameters doesn't help.

unused variable bad_bump

(cherry picked from commit f92c8c6)
Let's make the script working between branching by getting the version
validation from the templates.

(based on commit 702cfe0)
We don't use Bugzilla anymore for RHEL bugs. Bugzilla was migrated to
JIRA.

(cherry picked from commit 40b80e4)
Fix the variable naming. We are not on RHEL-8 anymore :).

(cherry picked from commit dc70b51)
If user is missing python3-jira library let's tell them where to get it.

(cherry picked from commit bb68822)
I found recommendation on JIRA link format so change our makebumpver
script accordingly to this recommendation.

(cherry picked from commit c2eb11b)
Old output might be confusing to people so let's switch from:

*** Bug RHEL-11111 Related commit 18b88f233a0195a56805f6e268a269cc11e4f4b3 is allowed
*** Bug RHEL-22222 Resolves commit 18b88f233a0195a56805f6e268a269cc11e4f4b3 is allowed

to:

*** Reverts RHEL-11111 commit 18b88f233a0195a56805f6e268a269cc11e4f4b3 is allowed
*** Resolves RHEL-22222 commit 18b88f233a0195a56805f6e268a269cc11e4f4b3 is allowed

(cherry picked from commit 9067f9e)
There are some changes to the workflow:
- We don't support links in summary lines anymore
- Conflicts is not supported anymore
- Reverts is new supported action

(based on commit cf43cfb)
Current implementation was wrong. It was resolving the whole transaction
based on the last commit.

(cherry picked from commit 6e5c706)
@jkonecny12 jkonecny12 added infrastructure Changes affecting mostly infrastructure f40 labels Dec 14, 2023
@github-actions github-actions bot added documentation and removed infrastructure Changes affecting mostly infrastructure labels Dec 14, 2023
Copy link

Infrastructure check failed on these files. Please do a double check of these files before merge!

CONTRIBUTING.rst
docs/commit-log.rst
scripts/makebumpver
scripts/rhel_version.py
scripts/rhel_version.py.j2
tests/pylint/runpylint.py

@jkonecny12
Copy link
Member Author

/packit build

@jkonecny12
Copy link
Member Author

/kickstart-test --waive infra only

@jkonecny12 jkonecny12 merged commit 5cdb118 into rhinstaller:master Jan 2, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants