Skip to content

Commit

Permalink
Fix teardown & output error message from Neon api call (#2246)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleAMathews authored Jan 22, 2025
1 parent d0b4b83 commit 6943949
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/teardown_examples_pr_stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
pnpm sst remove --stage "pr-$PR_NUMBER"
- name: Remove NextJs example
working-directory: examples/nextjs-example
working-directory: examples/nextjs
run: |
export PR_NUMBER=${{ github.event.number }}
echo "Removing stage pr-$PR_NUMBER"
Expand Down
10 changes: 5 additions & 5 deletions examples/linearlite-read-only/sst.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default $config({
try {
databaseUri
.apply(async (dbUri) => {
await applyMigrations(dbUri)
applyMigrations(dbUri)
return dbUri
})
.apply(loadData)
Expand Down Expand Up @@ -188,16 +188,16 @@ function createNeonDb({
"name": "'$DATABASE_NAME'",
"owner_name": "${ownerName}"
}
}' \
&& echo " SUCCESS" || echo " FAILURE"`
}' 2>&1 \
&& echo " SUCCESS" || echo " FAILURE - Response: $?"`

const updateCommand = `echo "Cannot update Neon database with this provisioning method SUCCESS"`

const deleteCommand = `curl -f -v -X 'DELETE' \
"https://console.neon.tech/api/v2/projects/$PROJECT_ID/branches/$BRANCH_ID/databases/$DATABASE_NAME" \
-H 'Accept: application/json' \
-H "Authorization: Bearer $NEON_API_KEY" \
&& echo " SUCCESS" || echo " FAILURE"`
-H "Authorization: Bearer $NEON_API_KEY" 2>&1 \
&& echo " SUCCESS" || echo " FAILURE - Response: $?"`

const result = new command.local.Command(`neon-db-command:${dbName}`, {
create: createCommand,
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs/sst.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default $config({
pooled: false,
})
try {
pooledDatabaseUri.apply(applyMigrations)
databaseUri.apply(applyMigrations)

const electricInfo = databaseUri.apply((uri) =>
addDatabaseToElectric(uri)
Expand Down

0 comments on commit 6943949

Please sign in to comment.