-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat(webapp): Vercel / Slack integrations improvements #3108
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
Draft
0ski
wants to merge
5
commits into
main
Choose a base branch
from
oskar/feat-vercel-improvements-tweaks
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f4b70b0
feat(settings+vercel): route & UX fixes
0ski 6cfa074
feat(alerts): include deployment integration metadata in alerts
0ski c292f81
feat(webapp): add Vercel integration entry in org settings menu
0ski 73e0229
feat(vercel): send Loops event when install starts
0ski 25b54a3
feat(slack): add Slack integration settings page and uninstall
0ski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { VercelLogo } from "./VercelLogo"; | ||
| import { LinkButton } from "~/components/primitives/Buttons"; | ||
| import { SimpleTooltip } from "~/components/primitives/Tooltip"; | ||
|
|
||
| export function VercelLink({ vercelDeploymentUrl }: { vercelDeploymentUrl: string }) { | ||
| return ( | ||
| <SimpleTooltip | ||
| button={ | ||
| <LinkButton | ||
| variant="minimal/small" | ||
| LeadingIcon={<VercelLogo className="size-3.5" />} | ||
| iconSpacing="gap-x-1" | ||
| to={vercelDeploymentUrl} | ||
| className="pl-1" | ||
| > | ||
| Vercel | ||
| </LinkButton> | ||
| } | ||
| content="View on Vercel" | ||
| /> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| import { z } from "zod"; | ||
|
|
||
| // Valid section IDs that can have their collapsed state toggled | ||
| export const SideMenuSectionIdSchema = z.enum(["manage", "metrics"]); | ||
| export const SideMenuSectionIdSchema = z.enum(["manage", "metrics", "project-settings"]); | ||
|
|
||
| // Inferred type from the schema | ||
| export type SideMenuSectionId = z.infer<typeof SideMenuSectionIdSchema>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🔴 Non-atomic delete-then-create in syncApiKeysToVercel can permanently lose TRIGGER_SECRET_KEY env vars on partial failure
In
syncApiKeysToVercel, the new code first deletes ALLTRIGGER_SECRET_KEYenv vars from Vercel viaremoveAllVercelEnvVarsByKey, and then attempts to recreate them viabatchUpsertVercelEnvVars. If the delete succeeds but the subsequent create/upsert fails (e.g., Vercel API outage, rate limiting, network error), allTRIGGER_SECRET_KEYenvironment variables are permanently lost from the Vercel project with no automatic recovery.Root Cause and Impact
Before this change,
syncApiKeysToVercelonly calledbatchUpsertVercelEnvVars, which safely found existing env vars and updated them in place, or created new ones if missing. This was an atomic-per-variable approach.The new code at
apps/webapp/app/models/vercelIntegration.server.ts:978-983adds aremoveAllVercelEnvVarsByKeycall before the upsert:The
batchUpsertVercelEnvVarsat line 1419 makes another API call tofilterProjectEnvswhich will find no matching vars (since they were just deleted), then callscreateProjectEnvto create them. If this create call fails, the secret keys are gone from Vercel.Impact: Production, staging, and preview Vercel deployments would lose their
TRIGGER_SECRET_KEYenvironment variable, causing Trigger.dev task execution to fail for all affected environments until the keys are manually re-synced.Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.