Skip to content

NOISSUE: Add jira auto clone tool to scripts - #1513

Merged
openshift-merge-robot merged 1 commit into
openshift:mainfrom
pacevedom:jira
Mar 17, 2023
Merged

NOISSUE: Add jira auto clone tool to scripts#1513
openshift-merge-robot merged 1 commit into
openshift:mainfrom
pacevedom:jira

Conversation

@pacevedom

Copy link
Copy Markdown
Contributor

Python tool to automate bug handling:

  • Checks Fix versions and mismatches for original and cloned bugs.
  • Checks Target version mismatches with Fix versions.
  • Checks gaps in Target version against Fix versions and creates clones for those that are not present.
  • Automatically creates blocks links between clones and originals.
  • Automatically synchronize clones with originals for Fix versions.
  • Alert about manual actions required, such as setting Target version/Fix versions.

Which issue(s) this PR addresses:

Closes #

@openshift-ci
openshift-ci Bot requested review from copejon and pmtk March 16, 2023 11:37
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 16, 2023
@pacevedom

Copy link
Copy Markdown
Contributor Author

/cc @ggiguash @dhellmann

@openshift-ci
openshift-ci Bot requested review from dhellmann and ggiguash March 16, 2023 11:38
@dhellmann

Copy link
Copy Markdown
Contributor

So this is a tool 1 person can use to manage all of the bug tickets? Rather than something an individual needs to run with 1 bug ticket they are working on?

Python tool to automate bug handling:
- Checks Fix versions and mismatches for original and cloned bugs.
- Checks Target version mismatches with Fix versions.
- Checks gaps in Target version against Fix versions and creates
  clones for those that are not present.
- Automatically creates blocks links between clones and originals.
- Automatically synchronize clones with originals for Fix versions.
- Alert about manual actions required, such as setting Target
  version/Fix versions.
@pacevedom

Copy link
Copy Markdown
Contributor Author

So this is a tool 1 person can use to manage all of the bug tickets? Rather than something an individual needs to run with 1 bug ticket they are working on?

Added some more stuff now if compared to the original commit.
The idea for the tool is to have something that:

  • Watches and fixes any inconsistencies for bugs.
  • Is able to run without supervision (mostly).
  • Is able to run in a job.

You can have it fix/setup your own bugs with -i option, or have it run widespread on the whole MicroShift bugs filter.
Since it needs a JIRA token, it can't do anything you can't do with your user.

@dhellmann dhellmann 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.

/lgtm
/retest-required

Comment thread scripts/jira/cloner.py

fix_versions_missing = set(fix_versions[1:])
clones = get_clone_by_issues(issue, connection)
for clone in clones:

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.

The body of this loop has a lot of conditionals and exception handling. We can land this version, but you might be able to simplify this by creating a "command" abstraction so that this function can be split between building a list of commands to run and another function that actually runs them (or not, if dry-run is set).

Comment thread scripts/jira/cloner.py
finally:
actions.append([JIRA_URL_PREFIX+clone.key, JIRA_URL_PREFIX+issue.key, "Fix versions updated to match original"])

if clone_fix_versions != fix_versions:

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.

Does the order of the versions matter here? I don't know if Jira sorts the values or if we might fail to recognize "4.13.0, 4.12.z" being the same as "4.12.z, 4.13.0", for example.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Mar 17, 2023
@openshift-ci

openshift-ci Bot commented Mar 17, 2023

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dhellmann, pacevedom

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [dhellmann,pacevedom]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci

openshift-ci Bot commented Mar 17, 2023

Copy link
Copy Markdown
Contributor

@pacevedom: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-greenboot 9f30e69 link false /test e2e-greenboot

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants