-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Support full resource names in autokey_config.folder #11413
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
Conversation
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 38 Click here to see the affected service packages
View the build log |
Hello! I am a robot. Tests will require approval from a repository maintainer to run. @SarahFrench, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look. You can help make sure that review is quick by doing a self-review and by running impacted tests locally. |
Can I just check, is this PR to help with a situation where a user might set the |
You are spot on, this is to support the full resource name too in the |
I'm afraid I'm a HashiCorp employee so I can't see Google internal docs. Does the internal discussion mention making changes to validation on the field so that users are only able to pass in values without the |
ooops, apologies, my bad :) As a summary:
Hope this helps, let me know if something doesn't make sense. @melinath and @zli82016 have chimed in on the internal discussions and can probably help here. |
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.
Some quick comments, including a required code change to re-add a sweeper to the Beta version of the provider.
url = strings.Replace(url, "folders/folders/", "folders/", 1) | ||
folderValue := d.Get("folder").(string) | ||
folderValue = strings.Replace(folderValue, "folders/", "", 1) | ||
d.Set("folder", folderValue) |
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.
Is it necessary to re-set (via d.Set) the value to be the original string with "folders/" removed? Is could be sufficient to just perform replacements of "folders/folders/" with "folders/" whenever a URL is being constructed using the folder
value.
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.
Nope, you're absolutely right, this was leftover from my initial attempt :) removed
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.
The id issue raised below can be solved by this, like you said here. I can restore this on the PR for you
Add pre_* custom code to drop the 'folders/' prefix from API requests, as well as a diff suppressor for the same reason. The ID also needs to be adjusted on post_create. Side change: add a time delay after setting the autokey_config in the basic example, to try to address test flakiness (#18935)
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 38 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
@SarahFrench re: test failure, this is a known issue, and apparently my attempt at fixing this by adding a timeout is not sufficient / the right approach? :( let me know if you notice something else that might need to be tweaked. I can try adding an even longer wait time, though I thought 15s would be enough.. |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 38 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
@SarahFrench alright, now that I've added back the sweeper, I've noticed that I'm probably handling the id incorrectly. What I'm doing right now is updating the Thoughts? |
One more note: I have a feeling the leftover change I had before (ie. modifying the |
Sorry, I've been pretty busy this past week! I'll review this PR on Monday |
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Tests analyticsTotal tests: 40 Click here to see the affected service packages
View the build log |
@SarahFrench thank you! Anything else I should change or double-check to make sure everything works correctly? |
Nope, nothing more, I'll approve and merge. Thanks! |
…form#11413) Co-authored-by: Sarah French <[email protected]>
…form#11413) Co-authored-by: Sarah French <[email protected]>
Add pre_* custom code to drop the 'folders/' prefix from API requests, as well as a diff suppressor for the same reason. The ID also needs to be adjusted on post_create.
Side change: add a time delay after setting the autokey_config in the basic example, to try to address test flakiness (#18935)
NOTE: looking at the debug logs, I see the following error:
looking for guidance on whether my current approach is fine, or if this should be addressed in a different way.
Thank you!
Release Note Template for Downstream PRs (will be copied)