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: Expand contract tests to support persistent data stores #199

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

keelerm84
Copy link
Member

No description provided.

@keelerm84 keelerm84 requested a review from a team as a code owner October 11, 2024 17:27
@keelerm84 keelerm84 force-pushed the mk/sdk-753/data-system-tests branch from aae906f to 39b39bd Compare October 31, 2024 14:26
@keelerm84 keelerm84 changed the title chore: Add contract test persistence test support for redis chore: Expand contract tests to support persistent data stores Oct 31, 2024
@keelerm84 keelerm84 removed the request for review from a team October 31, 2024 14:26
@keelerm84 keelerm84 force-pushed the mk/sdk-753/data-system-tests branch 5 times, most recently from 02ebdc5 to fa709be Compare October 31, 2024 19:38
@keelerm84 keelerm84 force-pushed the mk/sdk-753/data-system-tests branch from a3215f0 to 2bf606d Compare October 31, 2024 20:30
@keelerm84 keelerm84 requested a review from a team October 31, 2024 20:32
@keelerm84 keelerm84 changed the base branch from feat/persistent-data-store-tests to v7 November 1, 2024 13:45
dynamodb:
image: amazon/dynamodb-local
ports:
- 8000:8000
Copy link
Contributor

Choose a reason for hiding this comment

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

Kinda surprised they "took" port 8000 for dynamodb.

awsconfig.WithRegion("us-east-1"),
awsconfig.WithCredentialsProvider(credentials.NewStaticCredentialsProvider("dummy", "dummy", "dummy")),
)
if err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

The function that calls makeSDKConfig is capable of returning an error, so it would be good to change the signature here so we can bubble this back up

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

}

builder = ldcomponents.PersistentDataStore(dsBuilder)
default: // TODO: We should probably fail here.
Copy link
Contributor

Choose a reason for hiding this comment

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

This could also return an error

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@@ -246,7 +249,7 @@ func main() {
loggers := ldlog.NewDefaultLoggers()
loggers.SetMinLevel(logLevelFromName(os.Getenv("LD_LOG_LEVEL")))

port := "8000"
port := "10000"
Copy link
Contributor

Choose a reason for hiding this comment

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

Was changing the dynamo port a no-go, rather than changing the test service's port?

Copy link
Member Author

Choose a reason for hiding this comment

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

I could have changed the dynamodb port. But since every other SDK is going to have to override it (and then each of us will when doing local work), I thought it might be better to try and get those ports on the standard ones, and then maybe we can align on an SDK test harness port.

CapabilityClientPrereqEvents = "client-prereq-events"
CapabilityPersistentDataStoreRedis = "persistent-data-store-redis"
CapabilityPersistentDataStoreConsul = "persistent-data-store-consul"
CapabilityPersistentDataStoreDynamoDB = "persistent-data-store-dynamodb"
Copy link
Contributor

Choose a reason for hiding this comment

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

Not for this PR: I think we really don't need constants for these things.

@cwaldren-ld
Copy link
Contributor

Awesome work!

@keelerm84 keelerm84 merged commit 289af6b into v7 Nov 5, 2024
19 checks passed
@keelerm84 keelerm84 deleted the mk/sdk-753/data-system-tests branch November 5, 2024 18:58
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