-
Notifications
You must be signed in to change notification settings - Fork 927
[BUG] Ensure github_emu_group_mapping behaves correctly if mapping changes upstream
#3118
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
base: main
Are you sure you want to change the base?
[BUG] Ensure github_emu_group_mapping behaves correctly if mapping changes upstream
#3118
Conversation
|
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with |
stevehipwell
left a comment
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've added some review comments, but please could you remove the new deps. I don't think we should be introducing new dependencies with functional changes and I'm not sold on the value of doing something like this especially where we get a whole old copy of go-github in the vendor dir.
| module github.com/integrations/terraform-provider-github/v6 | ||
|
|
||
| go 1.24.0 | ||
| go 1.24.4 |
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.
| go 1.24.4 | |
| go 1.24 |
Regarding
Regarding I would propose we keep both package additions as neither should be posing a risk for the functionality of the provider, while trying to make maintenance simpler |
|
RE RE |
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
…alGroupsForTeamBySlug` to ensure we match state and reality Signed-off-by: Timo Sand <timo.sand@f-secure.com>
…nnecessary code Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
- Adds `github.com/migueleliasweb/go-github-mock` package for mocking go-github endpoints - Adds `github.com/go-test/deep` package for better error messages when types of fields differ Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
… `ForceNew` Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
8af4f04 to
705b3b0
Compare
…ice. We need to directly lookup TeamID Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
@stevehipwell Thanks for the |
stevehipwell
left a comment
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, but I'm not following the point of matchTeamID()? Given that the team ID can't change without recreating the resource I'd only expect there to be a call to client.Teams.GetTeamBySlug() in create, to set it into the schema, and also in the diff if the slug changes. Other than that there shouldn't be any need to call that API during the general lifecycle.
FYI I like the addition of team_id to the schema, I'll add that into my team changes.
@stevehipwell My idea with But I just realize that in You're right. it's unnecessary! |
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Before the change?
Readwould not check if the Team and External Group we're still connected to each othergroup_idwould not force a new resource, potentially leaving dangling connectionsCreateandUpdateshared same functionality, leading to potentially wasted API callsAfter the change?
<team_id>:<team_slug>:<group_id>Readproperly checks that Team ID ofteam_slugand any Team mapped togroup_idmatchgroup_idforces new resource creationCreateandUpdateto allow fine-grained control inUpdateteam_slugchange to vlaidate if it's a team rename or switchPull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!