Closed dacut closed 2 years ago
@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: aws-cli/2.7.4 Python/3.9.13 Darwin/21.5.0 source/arm64 prompt/off
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
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
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