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

scripts: add ability to update issues, add Github Tracking Issue #6156

Closed
wants to merge 1 commit into from

Conversation

otan
Copy link
Contributor

@otan otan commented Dec 13, 2019

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.

@otan otan requested a review from jseldess December 13, 2019 20:35
@cockroach-teamcity
Copy link
Member

This change is Reviewable

"Observability": ("A-observability", "taroface"),
"IAM & Security": ("A-iam-security", "Amruta-Ranade"),
"Bulk I/O": ("A-io", "lnhsingh"),
"I/O": ("A-io", "lnhsingh"),
Copy link
Contributor Author

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!)

@cockroach-teamcity
Copy link
Member

@otan otan added the fixitday label Dec 13, 2019
@cockroach-teamcity
Copy link
Member

@cockroach-teamcity
Copy link
Member

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.
@cockroach-teamcity
Copy link
Member

Copy link
Contributor

@jseldess jseldess left a 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: :shipit: 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", []))

Copy link
Contributor

@jseldess jseldess left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: 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.

Copy link
Contributor Author

@otan otan left a 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: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @otan)

Copy link
Contributor

@jseldess jseldess left a 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: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @otan)

@jseldess jseldess closed this Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update 20.1 roadmap issues with new details from Airtable
3 participants