-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
examples: add public deployment of LinearLite #1929
Conversation
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aa5bbf6
to
dce24ba
Compare
|
||
- name: Initialize SST environment | ||
run: | | ||
sudo apt install -y tini |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the tini stuff was an experiment I did to see if it'd help sst gracefully shut down (i.e. save it's state correctly when github actions kills it). It didn't seem to work actually so what is needed is concurrency controls so only one action can run at a time & running ones don't get killed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually looking at the deploy logs — it's already gotten into a bad state because of github killing an action. The "resource already exists" error happens when SST creates a resource but doesn't save it in its state file before getting killed. The only solution is to manually go into aws and remove the resource and try the deploy again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah. I am trying to figure this out. I thought it could be something I've done locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha yeah — i've spent a lot of time sorting through this error — you just gotta click around AWS' console looking for the resource(s) mentioned and delete them manually.
Then at the top of file you want:
concurrency:
group: prod-deploy-group
ec2f6a5
to
1f68c74
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Excited to see examples go live!
Another nice feature in the future would be posting comments w/ URLs to the sites — there's a good example here: https://github.com/taylorfsteele/TSS/blob/920d33974685280743fce243043099f3d45a4261/.github/workflows/pull-request.yml#L125C2-L168C14
run: | | ||
export PR_NUMBER=${{ github.event.number }} | ||
echo "Removing stage pr-$PR_NUMBER" | ||
pnpm sst remove --stage "pr-$PR_NUMBER" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use $DEPLOY_ENV here to be consistent with other workflow?
return $interpolate`postgresql://${passwordOutput.roleName}:${passwordOutput.password}@${project.databaseHost}/${db.name}?sslmode=require` | ||
} | ||
|
||
async function addDatabaseToElectric( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fine for now but in a future PR moving all these common helper functions into a common lib would be good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be using hono client!
Examples |
Took changes from #1915 on top of main