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

feat: add ScyllaDB module #2992

Merged
merged 58 commits into from
Feb 25, 2025
Merged

Conversation

mdelapenya
Copy link
Member

@mdelapenya mdelapenya commented Feb 20, 2025

What does this PR do?

This PR adds ScyllaDB as a module, written on top of #2919 (it was submitted from the main branch, so I cannot add commits on top, that's why I'm submitting a new PR).

Why is it important?

New modules, cool!

Related issues

danielhe4rt and others added 30 commits December 13, 2024 13:33
Co-authored-by: Steven Hartland <stevenmhartland@gmail.com>
* main: (34 commits)
  deps: update go version from 1.22.0 to 1.23.0 (testcontainers#2985)
  feat(redpanda): add bootstrap user account option (testcontainers#2975)
  chore(ollama): bump default version to 0.5.7 (testcontainers#2966)
  feat!: log package for consistent output (testcontainers#2979)
  docs: remove duplicated options in the customisers lists (testcontainers#2989)
  chore: exclude "modules/k6" from the build (testcontainers#2987)
  chore: enable var-naming from revive (private vars only) (testcontainers#2978)
  chore(deps): bump actions/checkout from 4.1.7 to 4.2.2 (testcontainers#2971)
  chore(deps): bump release-drafter/release-drafter from 6.0.0 to 6.1.0 (testcontainers#2970)
  chore!: remove variadic arguments from nats ConnectionString (testcontainers#2967)
  fix(ci): use same condition for sonar steps (testcontainers#2974)
  fix: return unique modified modules (testcontainers#2973)
  chore(deps): bump golangci/golangci-lint-action from 6.2.0 to 6.3.0 (testcontainers#2969)
  chore(ci): run lint in a separate build before running the tests (testcontainers#2876)
  fix(deps): update to github.com/shirou/gopsutil/v4 (testcontainers#2964)
  fix(valkey): fix port race (testcontainers#2962)
  chore(deps): bump golang.org/x/net in /modules/pinecone (testcontainers#2963)
  chore(deps): bump golang.org/x/net from 0.26.0 to 0.33.0 (testcontainers#2961)
  deps(fix): include modulegen templates dir in dependabot updates (testcontainers#2956)
  chore(deps): bump docker/setup-docker-action from 4.0.0 to 4.1.0 (testcontainers#2959)
  ...
Applied to the dynamoDB module too
@mdelapenya
Copy link
Member Author

@danielhe4rt I took your original branch and added the commits from the review process we did on #2919 on top of yours.

I'd appreciate a final review from you here 🙏

Copy link
Contributor

@stevenh stevenh left a comment

Choose a reason for hiding this comment

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

Done an initial pass, skipping examples as depending on the results they might need changing.

@mdelapenya
Copy link
Member Author

@stevenh I think I addressed all your comments 🙏

@mdelapenya mdelapenya requested a review from stevenh February 21, 2025 11:51

const (
port = "9042/tcp"
shardAwarePort = "19042/tcp"
Copy link
Member Author

Choose a reason for hiding this comment

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

@danielhe4rt in the Java implementation, the alternator port is a constant set to 8000. In Go, we allow customising this port. We'd like to align both implementations, so I'd like you to help us understand the rationale behind making it fixed Vs dynamic. 🙏

Copy link
Member Author

Choose a reason for hiding this comment

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

@eddumelendez I noticed the SSL implementation in Java is hardcoding the paths for the certificates and trustStore: https://github.com/testcontainers/testcontainers-java/blob/5af66d700e942474afabd8e550bf089196fdb5f9/modules/scylladb/src/main/java/org/testcontainers/scylladb/ScyllaDBContainer.java#L77-L83 But those values are set in a test file, the scylladb config: https://github.com/testcontainers/testcontainers-java/blob/5af66d700e942474afabd8e550bf089196fdb5f9/modules/scylladb/src/test/resources/scylla-test-ssl/scylla.yaml#L463-L468

If users have different paths set in their test files, then they cannot update them in the code. Is this a potential bug?

Copy link
Member Author

Choose a reason for hiding this comment

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

@danielhe4rt @eddumelendez I'm taking the decision of pinning the alternator port to the 8000 default port, not allowing its customisation. This is how the Java implementation is done, so I'm aligning with that.

PLMK if you have any concern about it, specially if you prefer it to be configurable (as it was in this current state)

Copy link
Member

Choose a reason for hiding this comment

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

About the port, there is no specific reason. IIRC I used 8000 because is the one used in scylladb docs. Regarding to the certificates and truststore, I think there is one issue with it now because we are forcing format instead to be open.

@mdelapenya
Copy link
Member Author

@eddumelendez regarding the SSL example, I'd make progress merging the module as soon it's ready, and contribute the SSL support as a new feature. Wdyt?

Copy link
Contributor

@stevenh stevenh 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, a few questions and one suggestion

@mdelapenya mdelapenya requested a review from stevenh February 22, 2025 11:30
@mdelapenya mdelapenya merged commit acffeed into testcontainers:main Feb 25, 2025
17 checks passed
@mdelapenya mdelapenya deleted the scylladb-support branch February 25, 2025 23:55
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Mar 13, 2025
* main:
  chore(deps): bump github.com/opencontainers/image-spec from 1.1.0 to 1.1.1, dario.cat/mergo from 1.0.0 to 1.0.1 (testcontainers#3030)
  chore(deps): bump github/codeql-action from 3.28.0 to 3.28.11 (testcontainers#3014)
  chore(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1 (testcontainers#3013)
  chore: readd dependabot, including a way to refresh the project files for all the modules (testcontainers#2997)
  docs: refine texts on how to set the module image (testcontainers#3012)
  feat(modules): add dind module (testcontainers#3004)
  docs: correct container variable (testcontainers#3010)
  chore: update Weaviate version to v1.29.0 and Weaviate Go client to v5.0.2 (testcontainers#3006)
  chore(deps): bump docker/setup-docker-action from 4.1.0 to 4.2.0 (testcontainers#3002)
  docs: fix typo in Grafana lgtm module (testcontainers#2999)
  feat: add ScyllaDB module (testcontainers#2992)
  feat(mssql): add WithInitSQL function (testcontainers#2988)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality or new behaviors on the existing one
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants