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

Chore: Fix DeepCopyInto for DataQuery #1081

Merged
merged 2 commits into from
Sep 11, 2024

Conversation

toddtreece
Copy link
Member

@toddtreece toddtreece commented Sep 10, 2024

What this PR does / why we need it:

This generated name retry function was added in 0.30.0. it adds a call to DeepCopyObject, which creates a copy of the object before passing it to storage. The copied object is missing properties due a bug in DataQuery.DeepCopyInto, but the bug was not obvious until the upstream changes triggered the bug.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

@@ -246,7 +246,7 @@ func (g *DataQuery) DeepCopyInto(out *DataQuery) {
out.additional = map[string]any{}
if len(g.additional) > 0 {
jj, err := json.Marshal(g.additional)
if err != nil {
if err == nil {
Copy link
Member

Choose a reason for hiding this comment

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

🤦🏻

@toddtreece toddtreece marked this pull request as ready for review September 11, 2024 00:22
@toddtreece toddtreece requested a review from a team as a code owner September 11, 2024 00:22
@toddtreece toddtreece requested review from wbrowne, marefr, oshirohugo and ryantxu and removed request for a team September 11, 2024 00:22
Copy link
Member

@ryantxu ryantxu left a comment

Choose a reason for hiding this comment

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

thank you thank you

@ryantxu ryantxu merged commit 71cd88b into main Sep 11, 2024
3 checks passed
@ryantxu ryantxu deleted the toddtreece/fix-query-additional-properties branch September 11, 2024 06:33
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.

2 participants