Skip to content

Conversation

rayluo
Copy link
Contributor

@rayluo rayluo commented Sep 3, 2022

Driven by this conversation, this PR implements instance_discovery=False based on internal design 6504. (Note: This PR does NOT contain known_authority_hosts, which was implemented in a different PR #492. The two features would co-exist when both PRs are merged in, but they can also work independently. Here they are implemented independently.)

As usual, the unit tests in this PR also serve as acceptance test for the aforementioned design.

@rayluo rayluo force-pushed the instance-discovery-endpoint branch from d314b11 to 027e820 Compare September 9, 2022 20:57
@rayluo rayluo changed the base branch from dev to known_authorities September 9, 2022 20:58
@rayluo rayluo force-pushed the instance-discovery-endpoint branch from 027e820 to 03fe109 Compare September 12, 2022 19:05
@rayluo rayluo force-pushed the instance-discovery-endpoint branch from 03fe109 to de8d4b2 Compare September 14, 2022 23:16
@rayluo rayluo changed the base branch from known_authorities to dev September 14, 2022 23:17
# when we would eventually want to add this feature to PCA in future.
exclude_scopes=None,
http_cache=None,
instance_discovery=None,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is instance_discovery=None here means default to False?

I guess we want the default value to be true?

Copy link
Contributor Author

@rayluo rayluo Sep 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, I think I am moving away from using True or False as the default value, because they would force downstream yet mid-tier libraries (such as Azure Identity) to also duplicate the same default value in their corresponding API surface.

I would instead use None as default value, and it just means default. It does NOT imply a boolean evaluation to make it a False.

And the actual default behavior will and only will be available via documentation. See line 419 in this PR, or read the rendered docs in the staging environment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the caller (me :)) can specify None as the input value of instance_discovery to say "use default"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants