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

Nil handling tweaks #2260

Merged
merged 1 commit into from
Aug 1, 2023
Merged

Nil handling tweaks #2260

merged 1 commit into from
Aug 1, 2023

Conversation

DrJosh9000
Copy link
Contributor

@DrJosh9000 DrJosh9000 commented Jul 31, 2023

  • Someone could write env: null, and this should be handled appropriately.
  • Most of Steps.unmarshalAny should be skipped if o == nil, not just if *s == nil also.
  • ToMap should handle nil receiver (like all the other methods).

Copy link
Contributor

@triarius triarius left a comment

Choose a reason for hiding this comment

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

LGTM, but you should write a test case for this

@DrJosh9000 DrJosh9000 force-pushed the nils-and-nulls branch 4 times, most recently from 50d11d3 to af9a377 Compare July 31, 2023 23:43
@DrJosh9000
Copy link
Contributor Author

LGTM, but you should write a test case for this

Added a parser test for env: null and a ToMap test.

The other thing I found while doing that is defensive/an unlikely edge case (Pipeline.Steps would have to be non-nil before parsing, which we don't do).

@DrJosh9000 DrJosh9000 merged commit 85ad110 into main Aug 1, 2023
1 check was pending
@DrJosh9000 DrJosh9000 deleted the nils-and-nulls branch August 1, 2023 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants