-
Notifications
You must be signed in to change notification settings - Fork 458
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
scripts: add ability to update issues, add Github Tracking Issue #6156
Conversation
"Observability": ("A-observability", "taroface"), | ||
"IAM & Security": ("A-iam-security", "Amruta-Ranade"), | ||
"Bulk I/O": ("A-io", "lnhsingh"), | ||
"I/O": ("A-io", "lnhsingh"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this seemed to have changed, so I put both in!)
This works by searching a github issue based on title, and updating if necessary. Run `--check_existing` if you wish to search issues before adding -- it is slower due to the rate limit so is off by default. Also add the Github Tracking Issue from Airtable to Github. I haven't run this on every record yet, and there's rate limiting from github which rate limits us to 30 searches per minute, but otherwise it seems to work for the one record I tried. Also added `--dry_run` mode so that it doesn't make records but does all the processing we want. Cleaned up some stuff too! Let me know if you have questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, @otan. Mostly working after some minor changes (see comments). However, it crashes at one point, which I don't understand:
Successfully updated issue #5953
Successfully updated issue #5954
Successfully updated issue #5955
Successfully updated issue #5956
Successfully updated issue #5957
Successfully updated issue #5958
Successfully updated issue #5959
Successfully updated issue #5960
Successfully updated issue #5961
Successfully updated issue #5962
Successfully updated issue #5963
Successfully updated issue #5964
Successfully updated issue #5965
Successfully updated issue #5966
Successfully updated issue #5967
Successfully updated issue #5968
Successfully updated issue #5969
Traceback (most recent call last):
File "issues-from-roadmap.py", line 160, in <module>
create_issue(issue)
File "issues-from-roadmap.py", line 67, in create_issue
print("Successfully created issue {0:s} #{}".format(epic_name, ret['number']), "\n")
ValueError: cannot switch from manual field specification to automatic field numbering
Ideas?
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jseldess and @otan)
scripts/issues-from-roadmap.py, line 26 at r1 (raw file):
Previously, otan (Oliver Tan) wrote…
(this seemed to have changed, so I put both in!)
You can remove the "Bulk I/O" entry.
scripts/issues-from-roadmap.py, line 21 at r2 (raw file):
# Map Airtable product areas to GitHub labels and writers. epic_area_to_tag_and_writer = { "KV": ("A-kv-storage", "rmloveland"),
Need to change this to:
"OKS": ("A-kv-storage", "rmloveland"),
scripts/issues-from-roadmap.py, line 127 at r2 (raw file):
assert fields, "missing fields in airtable entry" epic_name = fields.get("Epic/Feature Name", "") epic_desc = fields.get("Describe this feature to the customer", "")
Unfortunately, this field changed in the meantime. Need to change this to:
epic_desc = fields.get("Customer-facing description", "")
scripts/issues-from-roadmap.py, line 129 at r2 (raw file):
epic_desc = fields.get("Describe this feature to the customer", "") epic_area = fields.get("Product Area", "") epic_members = ", ".join(member['name'] for member in fields.get("Team Members", []))
Same as above:
epic_members = ", ".join(member['name'] for member in fields.get("Points of contact", []))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @jseldess and @otan)
scripts/issues-from-roadmap.py, line 87 at r2 (raw file):
headers=headers, params={ "q": issue["title"].replace(' ', '+') + '+milestone:"{}"+label:"C-roadmap"+state:"open"+repo:cockroachdb/docs'.format(args.milestone),
I think we should probably search both open and closed issues that match.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll get this this when I'm back from pto
I think the crash can be fixed by changing {0:s} to just {} in the format string. In any case the issue did not exist before :)
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @otan)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@otan, I made some small fixes to get this working, but I wasn't able to push to your branch, so I've re-created as a separate PR to get this merged: #6278. We can iterate on this more in follow-up PRs. Thanks again!
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @otan)
Resolves #6123. Example: #5953.
This works by searching a github issue based on title, and updating if necessary. Run
--check_existing
if you wish to search issues before adding -- it is slower due to the rate limit so is off by default.Also add the Github Tracking Issue from Airtable to Github.
I haven't run this on every record yet, and there's rate limiting from github which rate limits us to 30 searches per minute, but otherwise it seems to work for the one record I tried.
Also added
--dry_run
mode so that it doesn't make records but does all the processing we want.Cleaned up some stuff too! Let me know if you have questions.