Repository navigation
feat!: add extensions for postgres database credentials - #192
erika-wallace wants to merge 2 commits into
Conversation
jdodson
left a comment
There was a problem hiding this comment.
Hey,
AI found some blockers:
-
Essential-tier regression: getUrl and rotateCredential reject named credentials only on legacy Essential databases. Current Essential databases can reach the API instead. src/resources/data/postgres-database/credentials.ts:186-187,281-283
-
Required SDK helper missing: This PR does not add data.database.listAttachments(dbInput, {appIdentity}). The existing data.postgresDatabase.listAttachments is a different, Advanced-tier-only method. src/resources/data/database.ts:113-138; existing method: src/resources/data/postgres-database/index.ts:174-188
-
Credential API arguments don’t match the requested SDK contract: Methods take appIdentity positionally and accept addonIdentity in options, rather than raw database input with {appIdentity} options. src/resources/data/postgres-database/credentials.ts:594-597,654-665
Thanks for the review. This was my reasoning for each, but I can change any of them if necessary. Essential-tier regression: The original CLI commands being migrated here ( Required SDK helper missing: Credential API arguments don't match the requested SDK contract: |
Summary
This PR splits classic-tier (Essential/Standard/Premium) Postgres credential management out of
postgres-database.tsinto a new sibling module,src/resources/data/postgres-database/credentials.ts.postgres-database.tstopostgres-database/index.ts(renamed, now a directory). The resource/attachment/destroy logic stays here; credential-specific logic moves to the newcredentials.ts.postgres-database/credentials.tswithcreateCredentials,repairDefault,deleteCredential,getUrl, androtateCredential.database-credential/get-url.ts,database-credential/index.ts,internal/postgres-utils.ts/.test.ts, andlink.tsto point at the newpostgres-database/index.js/postgres-database/credentials.jslocations.extensions/data.tsfrompostgres-database/credentials.js, plusCredentialConnectionInfofromdatabase-credential/index.js../resources/data/postgres-databasesubpath export topackage.json.examples/pg.ts'slistCredentialscall site to match the new options-object signature.Breaking Change:
listCredentialsnow returns{addon, credentials}instead of a bareCredentialInfo[], and takes an options object ({addonIdentity, signal}) instead of a positionaladdonIdentityargument.Type of Change
Breaking Changes (major semver update)
!after your change type to denote a change that breaks current behaviorFeature Additions (minor semver update)
Patch Updates (patch semver update)
Testing
Notes:
Steps:
Screenshots (if applicable)
Related Issues
GUS work item: W-23386493