Skip to content

Commit

Permalink
fix(stacks.api): correct filter on value, not path
Browse files Browse the repository at this point in the history
Signed-off-by: Braden Mars <[email protected]>
  • Loading branch information
BradenM committed Aug 8, 2023
1 parent 4853445 commit 5a6dfb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/stacks/api/src/addons/crisiscleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ export class CrisisCleanupAddOn implements blueprints.ClusterAddOn {
{ path: 'host', objectAlias: 'POSTGRES_HOST' },
]

const externalDbKeys = dbSecretPaths.map(({ path }) =>
['postgres', path].join('.'),
const externalDbAliases = dbSecretPaths.map(
({ objectAlias }) => objectAlias,
)
const secretPaths: blueprints.JmesPathObject[] = Object.entries(secretKeys)
.filter(([key, _]) => !externalDbKeys.includes(key))
.filter(([_, value]) => !externalDbAliases.includes(value))
.map(([key, value]) => ({
path: ['api', 'secrets', key].join('.'),
objectAlias: value,
Expand Down
4 changes: 2 additions & 2 deletions packages/stacks/api/test/__snapshots__/main.spec.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5a6dfb8

Please sign in to comment.