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 marshaling of StringVariable to match unmarshaling #19

Merged
merged 2 commits into from
Mar 23, 2021

Conversation

benhoyt
Copy link
Contributor

@benhoyt benhoyt commented Mar 21, 2021

When I added "pebble plan" to fetch the plan, I didn't add a custom
MarshalYAML function on plan.StringVariable, so it marshaled like so:

environment:
    - name: FOO
      value: bar

This changes it to matching the unmarshaling, like so:

environment:
    - FOO: bar

Corresponding Python Operator Framework issue:
canonical/operator#486

When I added "pebble plan" to fetch the plan, I didn't add a custom
MarshalYAML function on plan.StringVariable, so it marshaled like so:

environment:
    - name: FOO
      value: bar

This changes it to matching the unmarshaling, like so:

environment:
    - FOO: bar

Corresponding Python Operator Framework issue:
canonical/operator#486
Copy link
Member

@hpidcock hpidcock left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

Copy link
Contributor

@niemeyer niemeyer left a comment

Choose a reason for hiding this comment

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

LGTM. Just one suggestion:

internal/plan/plan_test.go Outdated Show resolved Hide resolved
@benhoyt benhoyt merged commit e7f5987 into canonical:master Mar 23, 2021
@benhoyt benhoyt deleted the env-marshaller branch March 23, 2021 01:41
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