Skip to content

chore: update examples, tests, ci/cd env vars#668

Merged
anitarua merged 20 commits intomainfrom
v2example
Dec 20, 2025
Merged

chore: update examples, tests, ci/cd env vars#668
anitarua merged 20 commits intomainfrom
v2example

Conversation

@alubbad
Copy link
Contributor

@alubbad alubbad commented Dec 17, 2025

No description provided.

Copy link
Contributor

@anitarua anitarua left a comment

Choose a reason for hiding this comment

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

my IDE had some trouble finding the auth package too, but one of the suggested actions was to "go get" it and it seemed to work. just fyi in case your IDE also has the same issue

Copy link
Contributor

@anitarua anitarua left a comment

Choose a reason for hiding this comment

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

looking good! couple of notes:

  1. make sure to set MOMENTO_ENDPOINT to alpha (cell-alpha-dev.preprod.a.momentohq.com) in the github workflow files that run tests so that the envVarV2 methods succeed
  2. we still want keep test coverage for v1 api keys, so will need to use auth.NewEnvMomentoTokenProvider("V1_API_KEY") in momento/test_helpers/shared_context.go and add the V1_API_KEY env var to the github workflow files
  3. to provide coverage for v2 api keys, let's create a new suite of tests. Can probably just copy-paste over the happy path test cases from the various test files into a single new test file

README.md Outdated

Momento Cache is a fast, simple, pay-as-you-go caching solution without any of the operational overhead
required by traditional caching solutions. This repo contains the source code for the Momento client library for Go.
required by traditional caching solutions. This repo contains the source code for the Momento client library for Go.
Copy link
Contributor

Choose a reason for hiding this comment

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

did not expect changes to the readme, which is generated from a template file in ci/ci, make sure to revert changes here and instead change the template

@anitarua anitarua marked this pull request as ready for review December 19, 2025 21:21
@anitarua anitarua changed the title chore: update examples chore: update examples, tests, ci/cd env vars Dec 20, 2025
}

credentialProvider, err := auth.NewStringMomentoTokenProvider(authToken)
endpoint := "https://api.cache.cell-4-us-west-2-1.prod.a.momentohq.com"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be hardcoded in the example, and should it be declared in the const block at the top of the file? I'm not too familiar with Go idioms.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it probably depends on one's use case. Idk if many users would really set more than one endpoint, and was easier in this update to make it hardcoded, but good call on making it a const instead

@anitarua anitarua self-requested a review December 20, 2025 01:25
@anitarua anitarua merged commit b200088 into main Dec 20, 2025
8 checks passed
@anitarua anitarua deleted the v2example branch December 20, 2025 01:26
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