Skip to content

Conversation

@maxmetcalfe
Copy link

What kind of change does this PR introduce?

API improvement

What is the current behavior?

Currently, running network-restrictions update will replace all existing restrictions with the provided list. This makes it easy to wipe all existing restrictions when adding a new one.

What is the new behavior?

network-restrictions update will now add the provided restrictions to the existing list. This matches the behavior of the "Add restriction" in the Supabase UI.

@maxmetcalfe maxmetcalfe requested a review from a team as a code owner November 7, 2025 16:13
@coveralls
Copy link

coveralls commented Nov 7, 2025

Pull Request Test Coverage Report for Build 19432739386

Details

  • 56 of 70 (80.0%) changed or added relevant lines in 2 files are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.07%) to 55.15%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/restrictions.go 0 2 0.0%
internal/restrictions/update/update.go 56 68 82.35%
Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 19427598841: 0.07%
Covered Lines: 6548
Relevant Lines: 11873

💛 - Coveralls

Copy link
Contributor

@sweatybridge sweatybridge left a comment

Choose a reason for hiding this comment

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

This would be a breaking change for those who rely on the current behaviour. Could you introduce a new --append flag to the update command instead?

@maxmetcalfe
Copy link
Author

thanks @sweatybridge. updated!

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