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

Efficient labels #105

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Efficient labels #105

wants to merge 13 commits into from

Conversation

galargh
Copy link
Member

@galargh galargh commented May 19, 2023

Implement issue labels support efficiently. With integrations/terraform-provider-github@main...galargh:terraform-provider-github:feat/github_issue_labels in place, we can manage all labels for a repository using a single tf resource instead of a resource per label. This greaaaaaaatly reduces the number of GitHub API calls that we'll be doing during plans/syncs/applies.

Testing
  • deployed and tested in pl-strflt/github-mgmt

@galargh galargh requested a review from laurentsenta May 19, 2023 19:48
@galargh galargh marked this pull request as ready for review May 19, 2023 19:48
@galargh
Copy link
Member Author

galargh commented May 22, 2023

I'm putting this back in draft. The changes in the provider need more work. I'll mark it as ready for review after successful testing in pl-strflt org.

Things to look out for:

  • import should import all the labels for the repo to state
  • plan/apply (without refresh) should avoid having a side-effect of importing new labels to the state
  • refresh should import new labels to the state

@galargh galargh removed the request for review from laurentsenta May 22, 2023 07:23
@galargh galargh marked this pull request as draft May 22, 2023 07:23
@galargh
Copy link
Member Author

galargh commented May 23, 2023

And it's ready! You can have a look at all the labels being tracked through https://github.com/pl-strflt/github-mgmt/blob/master/github/pl-strflt.yml

We might want to wait a couple of days to see if integrations/terraform-provider-github#1694 makes it into the next gh provider release since they've been very responsive lately.

@galargh galargh marked this pull request as ready for review May 23, 2023 09:08
@galargh galargh requested a review from laurentsenta May 23, 2023 09:08
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.

1 participant