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

Fix double json.parse and context default value #69

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

agrare
Copy link
Member

@agrare agrare commented Jul 20, 2023

The Context initialize already handles parsing the input if it is a
string and fix the (unreachable) ||= {"global" => {}} that would
return the wrong type of object.

The Context initialize already handles parsing the input if it is a
string and fix the (unreachable) `||= {"global" => {}}` that would
return the wrong type of object.
@agrare agrare requested a review from Fryguy as a code owner July 20, 2023 16:24
@agrare agrare added the bug Something isn't working label Jul 20, 2023
context = JSON.parse(context) if context.kind_of?(String)
credentials = JSON.parse(credentials) if credentials.kind_of?(String)
Copy link
Member Author

Choose a reason for hiding this comment

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

Context#initialize already does JSON.parse if the payload is a string

@miq-bot
Copy link
Member

miq-bot commented Jul 20, 2023

Checked commit agrare@4603847 with ruby 2.6.10, rubocop 1.28.2, haml-lint 0.35.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. ⭐

@Fryguy Fryguy merged commit 7f6417a into ManageIQ:master Jul 20, 2023
5 checks passed
@Fryguy Fryguy assigned Fryguy and unassigned kbrock Jul 20, 2023
@agrare agrare deleted the fix_context_default_value branch July 20, 2023 16:59
agrare added a commit that referenced this pull request Jul 24, 2023
Fixed
- Don't pick up real KUBECONFIG for tests (#73)
- Fix double json.parse and context default value (#69)

Added
- Configure Renovate (#46)

Changed
- Simplify next state handling (#66)
- Refactor Input/Output path handling (#68)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants