Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

Ganga4060
Copy link
Contributor

@Ganga4060 Ganga4060 commented Sep 8, 2025

What does this PR do?

This PR removes the strict ValueError check for conflicting header names from the __init__ method of the ToolboxTool class.

Why is this change needed?

The strict check during initialization was contradictory to the actual runtime behavior in the __call__ method. The __call__ method already contains a safe and predictable override logic.
This change removes the initial check, making the "override" behavior the consistent and officially supported feature.

Redundancy of the Removed Check

The ValueError check was redundant because the override logic in the __call__ method already provides a clear and safe way to handle conflicts. The auth token headers are processed after the client headers, allowing them to take precedence.
Link for strict check tool.py

@Ganga4060 Ganga4060 requested a review from a team as a code owner September 8, 2025 05:59
@twishabansal twishabansal assigned twishabansal and unassigned kurtisvg Sep 8, 2025
@twishabansal
Copy link
Contributor

Please add a description. More about this change as we discussed offline. It would be nice to mention how it is redundant (link to the code as well).

@twishabansal
Copy link
Contributor

/gcbrun

@twishabansal
Copy link
Contributor

/gcbrun

@twishabansal twishabansal changed the title feat(core): Removes the strict duplicate header check during initiali… chore: remove the strict duplicate header check during initialisation Sep 10, 2025
@twishabansal twishabansal changed the title chore: remove the strict duplicate header check during initialisation chore: remove duplicate header check during initialisation Sep 10, 2025
@twishabansal
Copy link
Contributor

@Ganga4060 can you make sure that the tests pass?

@Ganga4060 Ganga4060 changed the title chore: remove duplicate header check during initialisation chore: remove duplicate header check during initialization Sep 10, 2025
@twishabansal
Copy link
Contributor

/gcbrun

@twishabansal twishabansal merged commit 888170b into googleapis:main Sep 12, 2025
20 checks passed
@release-please release-please bot mentioned this pull request Sep 12, 2025
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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.