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: pass parsed versionKey to Tracker #211

Merged
merged 1 commit into from
Dec 5, 2024
Merged

Conversation

cwaldren-ld
Copy link
Contributor

@cwaldren-ld cwaldren-ld commented Dec 5, 2024

The AI client wasn't passing the parsed _ldMeta.versionKey into newly created Trackers. The tests didn't catch it because the default value of strings are "", and that's what the tests asserted against.

I've updated the tests to pass in a non-default string to make sure it is being plumbed through.

@cwaldren-ld cwaldren-ld requested a review from a team as a code owner December 5, 2024 20:15
@cwaldren-ld cwaldren-ld changed the title fix: pass versionKey explicitly to Tracker fix: pass parsed versionKey to Tracker Dec 5, 2024
@@ -76,13 +76,13 @@ func (c *Client) Config(
// empty object.)
if result.Type() != ldvalue.ObjectType {
c.logConfigWarning(key, "unmarshalling failed, expected JSON object but got %s", result.Type().String())
return defaultValue, newTracker(key, c.sdk, &defaultValue, context, c.logger)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we agreed on "empty string for version key in default value".

@cwaldren-ld cwaldren-ld merged commit 215116a into v7 Dec 5, 2024
23 checks passed
@cwaldren-ld cwaldren-ld deleted the cw/sdk-937-versionkey branch December 5, 2024 21:41
cwaldren-ld pushed a commit that referenced this pull request Dec 5, 2024
🤖 I have created a release *beep* *boop*
---


## 0.1.0 (2024-12-05)


### Features

* pass tracker's config into TrackRequest
([#210](#210))
([8321db6](8321db6))


### Bug Fixes

* pass parsed versionKey to Tracker
([#211](#211))
([215116a](215116a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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