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

Make docker init script respect COCKROACH_DATABASE when processing SQL files #140650

Conversation

mecab
Copy link
Contributor

@mecab mecab commented Feb 7, 2025

This PR makes the docker init script run the SQL files in docker-entrypoint-initdb.d against the database specified by COCKROACH_DATABASE.

The behaviour is aligned to Postgres's init script, and I believe it is beneficial for the most of use cases.

Should close #137735

@mecab mecab requested a review from a team as a code owner February 7, 2025 00:39
Copy link

blathers-crl bot commented Feb 7, 2025

Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR.

Before a member of our team reviews your PR, I have some potential action items for you:

  • Please ensure your git commit message contains a release note.
  • When CI has completed, please ensure no errors have appeared.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@blathers-crl blathers-crl bot added the O-community Originated from the community label Feb 7, 2025
@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Feb 7, 2025

CLA assistant check
All committers have signed the CLA.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jlinder jlinder requested review from a team and removed request for a team February 10, 2025 19:33
@kenliu-crl kenliu-crl added T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) and removed T-dev-inf labels Feb 11, 2025
Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

thanks for your contribution! this looks good to me. i will merge it once the tests complete.

@rafiss
Copy link
Collaborator

rafiss commented Feb 20, 2025

bors r+

@craig craig bot merged commit 3e38c33 into cockroachdb:master Feb 20, 2025
22 checks passed
@mecab mecab deleted the feature/137735-docker-init-script-respect-COCKROACH_DATABASE branch February 20, 2025 09:29
@mecab
Copy link
Contributor Author

mecab commented Feb 20, 2025

Thanks @rafiss and the team for handling and merging it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-community Originated from the community T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) target-release-25.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker init script does not respect COCKROACH_DATABASE when running sql files in docker-entrypoint-initdb.d
4 participants