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

Omit empty deployment context fields #2903

Merged
merged 3 commits into from
Dec 13, 2024
Merged

Conversation

sjberman
Copy link
Contributor

@sjberman sjberman commented Dec 13, 2024

Problem: If an optional deployment context field wasn't set, an empty value would still be sent and cause the reporting server to return a 400.

Solution: Use pointers on the optional fields to omit them from the context if they're empty.

Testing: Verified that empty fields in the context still result in a successful report.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.


Problem: If an optional deployment context field wasn't set, an empty value would still be sent and cause the reporting server to return a 400.

Solution: Use pointers on the optional fields to omit them from the context if they're empty.
@sjberman sjberman requested a review from a team as a code owner December 13, 2024 17:48
@github-actions github-actions bot added the bug Something isn't working label Dec 13, 2024
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.74%. Comparing base (4cd0621) to head (5f8fbff).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2903   +/-   ##
=======================================
  Coverage   89.74%   89.74%           
=======================================
  Files         109      109           
  Lines       11150    11150           
  Branches       50       50           
=======================================
  Hits        10007    10007           
  Misses       1083     1083           
  Partials       60       60           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sjberman sjberman enabled auto-merge (squash) December 13, 2024 18:57
@sjberman sjberman merged commit bd653dc into main Dec 13, 2024
42 checks passed
@sjberman sjberman deleted the fix/empty-deployment-ctx branch December 13, 2024 21:16
sjberman added a commit that referenced this pull request Dec 13, 2024
Problem: If an optional deployment context field wasn't set, an empty value would still be sent and cause the reporting server to return a 400.

Solution: Use pointers on the optional fields to omit them from the context if they're empty.
sjberman added a commit that referenced this pull request Dec 13, 2024
Problem: If an optional deployment context field wasn't set, an empty value would still be sent and cause the reporting server to return a 400.

Solution: Use pointers on the optional fields to omit them from the context if they're empty.
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
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants