Skip to content
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

[CDAP-21089] OAuthHandler should not return 5xx on 4xx errors to skip retries and throw errors for invalid macros based on stage validation request. #15758

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

vikasrathee-cs
Copy link
Contributor

@vikasrathee-cs vikasrathee-cs commented Dec 9, 2024

CDAP-21089 OAuthHandler should not return 5xx on 4xx errors to skip retries. Also added a doNotSkipInvalidMacroForFunctions in StageValidationRequest method to throw error in case provided macros are invalid.

can be used like namespaces/system/apps/pipeline/services/studio/methods/v1/contexts/default/validations/stage?doNotSkipInvalidMacroForFunctions=oauthAccessToken,oauth

Before Adding doNotSkipInvalidMacroForFunctions, it was not throwing any error

Screenshot 2024-12-19 at 9 26 35 PM

After Adding doNotSkipInvalidMacroForFunctions, it was throwing below error

Screenshot 2024-12-19 at 9 24 54 PM

@itsankit-google itsankit-google added the build Triggers github actions build label Dec 9, 2024
@vikasrathee-cs vikasrathee-cs force-pushed the oauth-macro-issue branch 2 times, most recently from 5623990 to 04bf38c Compare December 18, 2024 12:08
@vikasrathee-cs vikasrathee-cs changed the title [CDAP-21089] OAuthHandler should not return 5xx on 4xx errors to skip retries. [CDAP-21089] OAuthHandler should not return 5xx on 4xx errors to skip retries and throw errors for invalid macros based on query param. Dec 18, 2024
Copy link
Member

@itsankit-google itsankit-google left a comment

Choose a reason for hiding this comment

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

Add unit test for the newly added option in MacroParser.

Additionally add screenshot as evidence of testing done for the new option in cdap sandbox.

Overall looks good.

Copy link
Member

@itsankit-google itsankit-google left a comment

Choose a reason for hiding this comment

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

Please add unit test for MacroParser for the newly added option.

@vikasrathee-cs vikasrathee-cs force-pushed the oauth-macro-issue branch 2 times, most recently from 6954d43 to 0c6c1f3 Compare December 19, 2024 15:50
@vikasrathee-cs vikasrathee-cs changed the title [CDAP-21089] OAuthHandler should not return 5xx on 4xx errors to skip retries and throw errors for invalid macros based on query param. [CDAP-21089] OAuthHandler should not return 5xx on 4xx errors to skip retries and throw errors for invalid macros based on stage validation request. Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Triggers github actions build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants