NCC-28 make sure that we are loading the tank when choosing the dev s… - #4
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR tightens safety and observability around which Neotoma database and DataCite environment a minting run is actually using, with special handling for the deployed dev stack where DBAUTH may point at the holding tank.
Changes:
- Update
ndbdoi.pyto print the actual target database (parsed fromDBAUTH/DBAUTH_TEST) instead of inferring it from--tank. - Update
entrypoint.shto forceGATE_ONLY=1whenNEOTOMA_ENVIRONMENT=dev, preventing any production DataCite mint from the dev stack.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ndbdoi.py | Adds _database_name() and updates the run banner to show the real DB target derived from env/.env. |
| entrypoint.sh | Forces gate-only behavior in dev environment to prevent production DataCite minting from dev stack runs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| secrets = {**dotenv_values(), **os.environ} | ||
| try: | ||
| conn = json.loads(secrets[key]) | ||
| return f"{conn.get('database', '?')} on {conn.get('host', '?')}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…tack