-
Notifications
You must be signed in to change notification settings - Fork 251
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
Inconsistent ChangeId format in Route 53 #554
Comments
@dacut Thanks for submitting this issue, I'm going to see how this compares to other SDKs and the CLI. |
Hi @Velfi. It worked in the CLI for me, but I suspect that's because the CLI leverages Boto under the hood. My CLI version: |
It's buried in my wall of text above 😀, but this is the relevant bit from Boto3: https://github.com/boto/botocore/blob/develop/botocore/handlers.py#L621-L642 |
I'm working on tickling smithy to fix this and I should have a PR soon |
|
Describe the bug
When using the Route 53 client, you currently need to alter the change id coming out of the
change_resource_record_sets()
call when callingget_change()
. The former returns change ids prefixed with/change/
, while the latter expects this prefix to be omitted.For example (pseudocode), this is what's required:
Expected Behavior
I expect to be able to pass the change id from one API call to the next unaltered.
Current Behavior
The call fails unless I remove
/change/
from the change id.The problem can be seen on line 518 of the attached
run.log
: it creates a URI of the form/2013-04-01/change/%252Fchange%252F<raw-id>
.In the call that succeeds, the URI is of the form
/2013-04-01/change/<raw-id>
.I have redacted the hosted zone id from the logs.
run.log
Reproduction Steps
Attached is a small program that reproduces this issue. I've (again) redacted the Route 53 hosted zone id.
main.rs.txt
The output is:
I would expect the second line (
Route 53 GetChange failed
) to not be present, and the mutating logic on lines 32-35 to not be needed.Possible Solution
Boto doesn't seem to have this problem; it looks like they have some custom logic in a hook to munge the ids.
Looking at the botocore model file, GetChange looks like this:
So they're just passing in the raw part of the id.
Then, in a global list of API mungers, they inject
fix_route53_ids
into a step calledbefore-parameter-build
for Route 53.Some quick skimming suggests this is already being generated (?!) for
/hostedzone/
ids inhosted_zone_preprocessor.rs
. Maybe something needs to be tickled to tell the Smithy generator to do this for change ids, as well?Additional Information/Context
No response
Version
0.13.0
Environment details (OS name and version, etc.)
MacOS 12.4, M1 (uname -a: Darwin dacBook2021.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:37 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T6000 arm64)
Logs
See above
The text was updated successfully, but these errors were encountered: