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

SDN-4182: Script cleanup + track ovnk upstream issues in jira #97

Merged
merged 9 commits into from Nov 15, 2023

Conversation

ricky-rav
Copy link
Contributor

@ricky-rav ricky-rav commented Nov 14, 2023

A long-due cleanup of our script and a new functionality to create jira stories for each ovnk upstream issue labeld with ci-flake.

To sum up the relevant input parameters:

  • ./network_bugs_overview -g retrieves ovnk upstream issues and tracks them inside the SDN-4175 epic; assignees are kept whenever possible. For instance:
$ ./network_bugs_overview -g
- Found 18 github issues with ci-flake label
- Found 17 bugs in 1.4s with the query: project = SDN AND "Epic Link" = SDN-4175 AND Summary ~ "upstream-*"

Created the following JIRA stories:
	https://issues.redhat.com/browse/SDN-4213

WARNING: the status following jira stories doesn't match the status of their corresponding github issue:
	https://issues.redhat.com/browse/SDN-4205
  • ./network_bugs_overview -q prints a quick version of the team bug load, skipping the "assigned <=21 days" column, which often takes a long time
  • ./network_bugs_overview -n prints out new bugs in markdown format
  • ./network_bugs_overview runs:
    1. github issue tracking on jira;
    2. full (that is, NOT quick) breakdown of bug load for each team member
    3. printing of new (unassigned) bugs in markdown format

@ricky-rav ricky-rav changed the title Upstream issues jira Script cleanup + track ovnk upstream issues in jira Nov 14, 2023
Our bugs are not on bugzilla anymore, let's remove bugzilla queries from the script.

Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>
@ricky-rav ricky-rav force-pushed the upstreamIssuesJira branch 3 times, most recently from ab6325f to 8f52623 Compare November 14, 2023 11:15
@ricky-rav
Copy link
Contributor Author

/assign @flavio-fernandes

@ricky-rav ricky-rav changed the title Script cleanup + track ovnk upstream issues in jira SDN-4182: Script cleanup + track ovnk upstream issues in jira Nov 14, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Nov 14, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 14, 2023

@ricky-rav: This pull request references SDN-4182 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set.

In response to this:

A long-due cleanup of our script and a new functionality to create jira stories for each ovnk upstream issue labeld with ci-flake.

To sum up the relevant input parameters:

  • ./network_bugs_overview -g retrieves ovnk upstream issues and tracks them inside the SDN-4175 epic; assignees are kept whenever possible. For instance:
$ ./network_bugs_overview -g
- Found 18 github issues with ci-flake label
- Found 17 bugs in 1.4s with the query: project = SDN AND "Epic Link" = [SDN-4175](https://issues.redhat.com//browse/SDN-4175) AND Summary ~ "upstream-*"

Created the following JIRA stories:
  https://issues.redhat.com/browse/SDN-4213

WARNING: the status following jira stories doesn't match the status of their corresponding github issue:
  https://issues.redhat.com/browse/SDN-4205
  • ./network_bugs_overview -q prints a quick version of the team bug load, skipping the "assigned <=21 days" column, which often takes a long time
  • ./network_bugs_overview -n prints out new bugs in markdown format
  • ./network_bugs_overview runs:
    1. github issue tracking on jira;
    2. full (that is, NOT quick) breakdown of bug load for each team member
    3. printing of new (unassigned) bugs in markdown format

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.

@ricky-rav
Copy link
Contributor Author

/jira refresh

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 14, 2023

@ricky-rav: This pull request references SDN-4182 which is a valid jira issue.

In response to this:

/jira refresh

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.

Copy link
Contributor

@flavio-fernandes flavio-fernandes left a comment

Choose a reason for hiding this comment

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

This is great! I have a few comments

And an ask: lint it using black:

cd  network-tools.git/jira-scripts
python3 -m venv --copies .env && source ./.env/bin/activate
pip install --upgrade pip
pip install black
black network_bugs_overview
deactivate

@@ -7,11 +7,9 @@ import sys
from tabulate import tabulate
import time

import bugzilla
Copy link
Contributor

Choose a reason for hiding this comment

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

bye bye bz!
Please remove the references to Bugzilla from the readme as well:
https://github.com/openshift/network-tools/blob/master/jira-scripts/README.md

jira-scripts/network_bugs_overview Outdated Show resolved Hide resolved
jira-scripts/network_bugs_overview Outdated Show resolved Hide resolved
@@ -112,6 +133,117 @@ def init_developers_dict():
return developers


def retrieve_open_github_issues():
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>
We're not using it anymore when calculating the workload of each team member. Let's remove it.

Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>
Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>
Also, make sure "-q" retrieves jira bugs (quick option).

Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>
Ovn-kubernetes upstream issues labeled with "ci-flake" are not tracked in JIRA: let's create a jira user story under the SDN-4175 epic for each such open issue:
- the assignee is kept whenever possible, otherwise bbennett is used.
- the summary (title) of these jira cards will start with upstream-$GITHUB_ISSUE_ID, where $GITHUB_ISSUE_ID is the ID found in the URL of the issue itself (e.g. upstream-3986 for ovn-org/ovn-kubernetes#3986)

A list of which jira stories have been created is printed to stdout, as well as a list of stories in the SDN-4175 epic whose status doesn't match the status of the github issue they're tracking.

The new "-g" ("--process-github-issues") input parameter executes this new functionality, or the script alone without any input parameters.

Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>
Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>
Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>
Signed-off-by: Riccardo Ravaioli <rravaiol@redhat.com>
@ricky-rav
Copy link
Contributor Author

@flavio-fernandes I addressed your comments and I also overcomplicated my life by printing out all github issues and jira stories that are not in sync with each other. :-D
I ran black at the end. I admit I'm not a big fan, but let's go for it :)

Copy link
Contributor

@flavio-fernandes flavio-fernandes left a comment

Choose a reason for hiding this comment

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

This is awesome, @ricky-rav !!!
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 15, 2023
Copy link
Contributor

openshift-ci bot commented Nov 15, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flavio-fernandes, ricky-rav

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

The pull request process is described here

Needs approval from an approver in each of these files:

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 15, 2023
Copy link
Contributor

openshift-ci bot commented Nov 15, 2023

@ricky-rav: all tests passed!

Full PR test history. Your PR dashboard.

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.

@openshift-merge-bot openshift-merge-bot bot merged commit 110f4f0 into openshift:master Nov 15, 2023
3 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-network-tools-container-v4.15.0-202311152309.p0.g110f4f0.assembly.stream for distgit ose-network-tools.
All builds following this will include this PR.

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. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants