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(hcm): made all fields/subfields nullable #7041

Merged
merged 2 commits into from
Aug 30, 2022

Conversation

gunnar-solo
Copy link
Contributor

@gunnar-solo gunnar-solo commented Aug 26, 2022

Description

Users utilizing the previously-released #6414, users were able to provide hcm configuration to a DelegatedHttpGateway and have it be inherited by any number of matchable http gateways. This "mostly worked", but had a pretty noticeable bug: non-nullable fields could not be overridden with a zero value.

For example:

Screen Shot 2022-08-30 at 10 54 07 AM

This PR resolves said issue by recursively tracking down and eliminating non-nullable fields across hcm.proto. It also then goes about resolving the misc. type changes necessary for code to compile/tests to pass.

Checklist:

  • I included a concise, user-facing changelog (for details, see https://github.com/solo-io/go-utils/tree/master/changelogutils) which references the issue that is resolved.
  • If I updated APIs (our protos) or helm values, I ran make -B install-go-tools generated-code to ensure there will be no code diff
  • I followed guidelines laid out in the Gloo Edge contribution guide
  • I opened a draft PR or added the work in progress label if my PR is not ready for review
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@github-actions github-actions bot added the keep pr updated signals bulldozer to keep pr up to date with base branch label Aug 26, 2022
@gunnar-solo gunnar-solo removed the keep pr updated signals bulldozer to keep pr up to date with base branch label Aug 26, 2022
@gunnar-solo gunnar-solo changed the title initial efforts; sharable commit 0-value HCM overrides Aug 26, 2022
@gunnar-solo gunnar-solo force-pushed the hcm-0-value-overrides branch 4 times, most recently from b18144c to 0fa6b39 Compare August 29, 2022 14:20
@gunnar-solo gunnar-solo marked this pull request as ready for review August 29, 2022 18:52
@gunnar-solo gunnar-solo requested a review from a team as a code owner August 29, 2022 18:52
@gunnar-solo gunnar-solo added the keep pr updated signals bulldozer to keep pr up to date with base branch label Aug 29, 2022
@solo-changelog-bot
Copy link

Issues linked to changelog:
#6476

@github-actions
Copy link

github-actions bot commented Aug 29, 2022

Visit the preview URL for this PR (updated for commit 3d42e13):

https://gloo-edge--pr7041-hcm-0-value-override-drn4jxxd.web.app

(expires Tue, 06 Sep 2022 14:46:33 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@gunnar-solo gunnar-solo changed the title 0-value HCM overrides fix(hcm): made all fields/subfields nullable Aug 30, 2022
Copy link
Contributor

@elcasteel elcasteel left a comment

Choose a reason for hiding this comment

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

lgtm!

@soloio-bulldozer soloio-bulldozer bot merged commit 5c81840 into master Aug 30, 2022
@soloio-bulldozer soloio-bulldozer bot deleted the hcm-0-value-overrides branch August 30, 2022 21:53
gunnar-solo added a commit that referenced this pull request Sep 2, 2022
Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
soloio-bulldozer bot added a commit that referenced this pull request Sep 2, 2022
* fix(hcm): made all fields/subfields nullable (#7041)

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>

* fix(hcm): 2nd passthrough of subfields to make nullable

special care taken with `Duration` and `ResourceRef` object types.

Co-authored-by: soloio-bulldozer[bot] <48420018+soloio-bulldozer[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep pr updated signals bulldozer to keep pr up to date with base branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants