Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Issue

  • resolve: N/A

Why is this change needed?

This change removes the seed.sql file which contains a hardcoded GitHub App installationId. When the GitHub App is updated, this ID changes, causing issues in local development environments.

What would you like reviewers to focus on?

Confirm that removing this file is the correct approach to prevent local environment issues with GitHub App authentication.

Testing Verification

Verified that the file has been successfully removed.

Additional Notes

This PR only removes the seed.sql file as requested, with no other changes.

Link to Devin run: https://app.devin.ai/sessions/11ec8e3b59fd471ab71b71af7172309b
Requested by: noritaka.ikeda@route06.co.jp

…ents

Co-Authored-By: noritaka.ikeda@route06.co.jp <noritaka.ikeda@route06.co.jp>
@changeset-bot
Copy link

changeset-bot bot commented Mar 27, 2025

⚠️ No Changeset found

Latest commit: abc8e45

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Mar 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
liam-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2025 11:50am
liam-erd-sample ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2025 11:50am
4 Skipped Deployments
Name Status Preview Comments Updated (UTC)
liam-docs ⬜️ Ignored (Inspect) Visit Preview Mar 27, 2025 11:50am
test-liam-app ⬜️ Ignored (Inspect) Mar 27, 2025 11:50am
test-liam-docs ⬜️ Ignored (Inspect) Mar 27, 2025 11:50am
test-liam-erd-sample ⬜️ Ignored (Inspect) Mar 27, 2025 11:50am

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@supabase
Copy link

supabase bot commented Mar 27, 2025

Updates to Preview Branch (devin/1743075606-remove-seed-sql) ↗︎

Deployments Status Updated
Database Thu, 27 Mar 2025 11:43:09 UTC
Services Thu, 27 Mar 2025 11:43:09 UTC
APIs Thu, 27 Mar 2025 11:43:09 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Thu, 27 Mar 2025 11:43:14 UTC
Migrations Thu, 27 Mar 2025 11:43:15 UTC
Seeding Thu, 27 Mar 2025 11:43:15 UTC
Edge Functions Thu, 27 Mar 2025 11:43:15 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

Copy link
Member

@NoritakaIkeda NoritakaIkeda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I'd love for others to take a look as well!

@devin-ai-integration devin-ai-integration bot marked this pull request as ready for review March 27, 2025 11:49
@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner March 27, 2025 11:49
@devin-ai-integration devin-ai-integration bot requested review from FunamaYukina, MH4GF, hoshinotsuyoshi and junkisai and removed request for a team March 27, 2025 11:49
@MH4GF
Copy link
Contributor

MH4GF commented Mar 28, 2025

@junkisai cc @NoritakaIkeda It is certainly different from the installation ID of the Local GitHub App, so we should consider supporting it.
Maybe we can adjust it with this setting.
https://supabase.com/docs/guides/deployment/branching#remote-specific-configuration

Copy link
Member

@junkisai junkisai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MH4GF @NoritakaIkeda
I see, is my understanding correct as follows? 👀

  • seed.sql is also applied to the Preview branch
  • Changing the GitHub App settings will cause the installationId to change

@NoritakaIkeda
Copy link
Member

@junkisai
My understanding of the latter is the same!

Changing the GitHub App settings will cause the installationId to change

@@ -1,19 +0,0 @@
INSERT INTO "Project"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits

If you plan to add similar data inserts again in the future, I’d recommend wrapping them in a BEGIN ... COMMIT transaction and using RETURNING to fetch the inserted IDs instead of hardcoding them.

That way, you can avoid relying on fixed IDs and ensure the data stays consistent even if something fails in the middle of the process.

Example for future reference:

BEGIN;

WITH inserted_project AS (
  INSERT INTO "Project" (name, "updatedAt")
  VALUES ('liam', now())
  RETURNING id
),
inserted_repository AS (
  INSERT INTO "Repository" (name, owner, "installationId", "updatedAt")
  VALUES ('liam', 'liam-hq', 62899121, now())
  RETURNING id
)
INSERT INTO "ProjectRepositoryMapping" ("projectId", "repositoryId", "updatedAt")
SELECT inserted_project.id, inserted_repository.id, now()
FROM inserted_project, inserted_repository;

INSERT INTO "WatchSchemaFilePattern" (pattern, "projectId", "updatedAt")
SELECT 'frontend/packages/db/prisma/**', id, now()
FROM inserted_project;

COMMIT;

No need to change anything this time, just something to keep in mind when adding this kind of data setup again!

@NoritakaIkeda
Copy link
Member

@junkisai
The seed.sql file is also applied to the Preview branch, where Supabase automatically runs migrations and seeds for temporary database environments. Since changing GitHub App settings (e.g. reinstalling the app or updating permissions) generates a new installationId.

I'll merge it for now — we can update the seed file later

@NoritakaIkeda NoritakaIkeda added this pull request to the merge queue Mar 28, 2025
Merged via the queue into main with commit b81fa88 Mar 28, 2025
22 checks passed
@NoritakaIkeda NoritakaIkeda deleted the devin/1743075606-remove-seed-sql branch March 28, 2025 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants