Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Deprecate ssl common name #7114
Deprecate ssl common name #7114
Changes from all commits
ce2d62c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Could you elaborate on the raitonale on why
before-building-argument-table-parser
was chosen for this handler? I think the main concerns right now are:parsed_globals
) to the event. As a rule of thumb, new arguments are added if they make sense and are needed.aws rds wait db-cluster-available
command. Fortunately it looks like the handler is idempotent but it would be nice if we did not have to rely on that.before-building-argument-table-parser
is for updating the argument table prior to parsing and I'm not sure it logically fits with setting values on the parsed globals.I have not come up with a good alternative yet, but I just wanted to put some initial thoughts down.
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 know we had originally agreed upon
building-command-table
, but upon diving into the code, this seemed by far to be the less invasive approach. I do see now that it runs twice, once for the service and then for the operation, which is definitely behavior that should be avoided even if the handler is idempotent.The trouble is figuring out a clean implementation of passing
parsed_globals
to that event. TheServiceOperation
object only gets that variable when its invoked in aServiceCommand
object's__call__
method, which is afterbuilding-command-table
has run. I think its definitely doable, but would require a larger refactor, which I wanted to avoid for something that is pretty core behavior to the CLI.The easiest way that is occurring to me now would be to pass
parsed_globals
to_get_command_table
, which would pass it in turn to_create_command_table
. Then it could be added to the event. Let me know what you think of that approach and if you have any concerns with it. Happy to investigate further, but if you do come up with any suggestions let me know.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 think originally I had two different potential events in mind:
top-level-args-parsed
- This is the event for when the global args get parsed. It seemed suiting as we would just immediately set the global argument of--endpoint-url
at that stage and we can keep endpoint url mutations isolated to that stage. The only issue with that approach is that the session had technically not been initialized yet, so there may be unintended consequences/configuration resolution if we try to grab the region before that. This event also happens before even logging is enabled so that is a concern as well if we are trying to do any tracing of it.session-initialized
- This seemed like the next best event to use as the session was initialized there. The only problem I saw in using this event is that we could not 100% capture correctly the service being used. Specifically, for CLI aliases the command that gets parsed is represented as the alias and not the underlying service command at that point. So we would be using the wrong endpoint if the command was under an alias.This all being said. I don't know if I have a clear preference between
building-command-table
andbefore-building-argument-table-parser
. They both share similar concerns, but it seems like we need an event lower into the stack to get this to work appropriately and I do not want to be adding a new event for this. I think for now let's just stick withbefore-building-argument-table-parser
unless we get a better idea.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.
Ok cool sounds good Kyle. I'll keep the behavior as is. I'll be adding the additional services that were missed in my script that you caught in yours shortly.
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.
So when running the CLI manually with these hard coded endpoints, I'm getting the following error for non-us-east-1 regions when using
health
:It looks like the reason this is happening is that
health
is defined as a non-regionalized service and thus has a default credentialScope ofus-east-1
for theaws
partition. We are going to have to adjust the logic here so that we also set the region to the default credential scope forhealth
as well as the endpoint url. I would not worry about generalizing it too much. It should be just:If we find we need to set the endpoint url for health:
session.get_partition_for_region()
for the provided region to determine the partition we are working in.us-east-1
,cn-northwest-1
)parsed_globals
or via thesession.set_config_variable()
method, whatever does the job of making sure we use the correct credential scope for the region.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.
alright i shot up a fix. i was getting the same error before making the fix, but a different one. not sure how to handle it since it was a subscription error but as far as i can tell there are no subscriptions in aws health.