Skip to content

Conversation

@rakdutta
Copy link
Collaborator

@rakdutta rakdutta commented Jul 29, 2025

🐛 Bug-fix PR

📌 Summary

[Bug]: Gateway update fails silently in UI, backend throws ValidationInfo error

Replaced value.get() with value.data.get() in the GatewayUpdate class in schema.py to correctly access values from the ValidationInfo object.

Signed-off-by: RAKHI DUTTA <[email protected]>
@rakdutta rakdutta marked this pull request as ready for review July 29, 2025 09:47
@rakdutta rakdutta requested a review from crivetimihai as a code owner July 29, 2025 09:47
@rakdutta rakdutta changed the title pydantic error fix in GatewayUpdate class of schema.py ##630 Bugfix: Use values.data.get() in GatewayUpdate to Fix Pydantic Error Issue#630 Jul 29, 2025
@rakdutta rakdutta changed the title Bugfix: Use values.data.get() in GatewayUpdate to Fix Pydantic Error Issue#630 Use values.data.get() in GatewayUpdate to Fix Pydantic Error Issue#630 Jul 29, 2025
Copy link
Member

@crivetimihai crivetimihai left a comment

Choose a reason for hiding this comment

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

This addresses a backend validation bug that was causing silent failures when updating a Gateway through the UI.

The original issue stemmed from attempts to access data in a Pydantic v2 ValidationInfo object using .get(), which resulted in an AttributeError and prevented the frontend from displaying meaningful validation errors.

Your fix correctly updates all relevant instances to use values.data.get(...), aligning with the proper way to access submitted values in Pydantic v2 validators. This resolves the backend exception and ensures that validation failures will now propagate as intended, allowing the frontend to inform users of specific issues during Gateway updates.

Testing

  • make doctest test passed

@crivetimihai crivetimihai merged commit bb59e47 into IBM:main Jul 29, 2025
36 checks passed
vk-playground pushed a commit to vk-playground/mcp-context-forge that referenced this pull request Sep 14, 2025
Signed-off-by: RAKHI DUTTA <[email protected]>
Co-authored-by: RAKHI DUTTA <[email protected]>
vk-playground pushed a commit to vk-playground/mcp-context-forge that referenced this pull request Sep 14, 2025
Signed-off-by: RAKHI DUTTA <[email protected]>
Co-authored-by: RAKHI DUTTA <[email protected]>
vk-playground pushed a commit to vk-playground/mcp-context-forge that referenced this pull request Sep 16, 2025
Signed-off-by: RAKHI DUTTA <[email protected]>
Co-authored-by: RAKHI DUTTA <[email protected]>
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