Skip to content
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

fix: use custom network for local database when starting pg-meta #2064

Merged
merged 5 commits into from
Mar 21, 2024

Conversation

etzelc
Copy link
Contributor

@etzelc etzelc commented Mar 19, 2024

What kind of change does this PR introduce?

Bug fix for #2046. Inspired by #1836.

What is the current behavior?

pg-meta is started using host network. This does not work using Bitbucket SaaS runners, because Bitbucket pipeline enables user namespace for docker daemon, which doesn't allow host network mode. https://community.atlassian.com/t5/Bitbucket-articles/Changes-to-make-your-containers-more-secure-on-Bitbucket/ba-p/998464

What is the new behavior?

When connecting to local database, join the existing custom network instead.

Additional

  1. fix(test): support bitbucket pipeline for pgtap tests #1836 also changed config.Host = utils.DbAliases[0] and config.Port = 5432. Is this also necessary for this fix here?
  2. internal/db/diff/migra.go and internal/db/dump.go also use host network.

@etzelc etzelc requested a review from a team as a code owner March 19, 2024 10:28
@coveralls
Copy link

coveralls commented Mar 19, 2024

Pull Request Test Coverage Report for Build 8368686178

Details

  • 13 of 13 (100.0%) changed or added relevant lines in 2 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.003%) to 58.985%

Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 11.76%
Totals Coverage Status
Change from base Build 8355384002: 0.003%
Covered Lines: 6263
Relevant Lines: 10618

💛 - Coveralls

@etzelc
Copy link
Contributor Author

etzelc commented Mar 20, 2024

Thanks for taking over. 👍

@sweatybridge sweatybridge changed the title Use custom network for local database when starting pg-meta fix: use custom network for local database when starting pg-meta Mar 21, 2024
@sweatybridge sweatybridge merged commit efa43f3 into supabase:develop Mar 21, 2024
9 checks passed
@sweatybridge
Copy link
Contributor

Thanks for the contribution. This should be available in v1.150.3.

I will also make a patch for db diff and db dump.

@github-actions github-actions bot mentioned this pull request Mar 26, 2024
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.

3 participants