Skip to content

fix(dbdr): resolve databases by name or ID - #1278

Open
WilliamK112 wants to merge 6 commits into
Scalingo:masterfrom
WilliamK112:fix/database-destroy-name-1273
Open

WilliamK112 wants to merge 6 commits into
Scalingo:masterfrom
WilliamK112:fix/database-destroy-name-1273

Conversation

@WilliamK112

@WilliamK112 WilliamK112 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • resolve every existing-database DR command by exact database ID or name
  • pass canonical database IDs to DR networking endpoints and canonical app/addon identifiers to firewall endpoints
  • update command help and add focused coverage for identifier and addon resolution

Closes #1273

Validation

  • go test ./...

  • go test -race ./dbdr ./cmd

  • go vet ./...

  • git diff --check

  • Add a changelog entry in the section "To Be Released" of CHANGELOG.md

AI assistance

Codex assisted with drafting the implementation and tests. I reviewed the diff and verified it with the full Go test suite, race detection for the affected packages, and go vet.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-28T23:01:20.404905Z 5cbc2b2 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@WilliamK112

Copy link
Copy Markdown
Contributor Author

@codex review

@WilliamK112
WilliamK112 force-pushed the fix/database-destroy-name-1273 branch from 5cbc2b2 to 596e9ae Compare October 30, 2026 15:57
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Ching-Wei Kang <ckang53@wisc.edu>
@EtienneM
EtienneM self-requested a review November 12, 2026 07:12

@EtienneM EtienneM left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For consistency purpose, I actually think that all DBNG commands should be able to use the DB name or the DB ID.

@WilliamK112

Copy link
Copy Markdown
Contributor Author

Fixed the goimports failure in dbng/destroy_test.go by moving the Scalingo import into the configured local-prefix group.

Validation: go test ./dbng and git diff --check both pass.

@WilliamK112 WilliamK112 changed the title fix(dbng): allow database-destroy by name fix(dbng): resolve databases by name or ID Nov 12, 2026
@WilliamK112

Copy link
Copy Markdown
Contributor Author

Expanded the fix as requested so every DBNG command that targets an existing database now accepts either its exact name or ID. The shared resolver supplies canonical IDs to info/config/upgrade/destroy and networking operations, while firewall commands resolve the corresponding app and addon identifiers. I also updated the help text and added addon-selection coverage.

Validation passed: go test ./..., go test -race ./dbng ./cmd, go vet ./..., and git diff --check.

# Conflicts:
#	cmd/databases_dr.go
#	cmd/databases_networking.go
#	cmd/firewall_rules.go
#	dbdr/database.go
#	dbdr/destroy_test.go
@WilliamK112 WilliamK112 changed the title fix(dbng): resolve databases by name or ID fix(dbdr): resolve databases by name or ID Nov 12, 2026
@WilliamK112

Copy link
Copy Markdown
Contributor Author

Merged the latest master package rename (dbng → dbdr), resolved the resulting conflicts, and reran the full validation successfully: go test ./..., go test -race ./dbdr ./cmd, go vet ./..., and git diff --check.

This branch has not been deployed

No deployments
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.

[database-destroy] Impossible to destroy a database that failed to start

2 participants