Skip to content

Comments

Check for existing modules before attempting to create new ones#4189

Merged
doriable merged 5 commits intomainfrom
allow-existing-repos-push-precondition
Nov 25, 2025
Merged

Check for existing modules before attempting to create new ones#4189
doriable merged 5 commits intomainfrom
allow-existing-repos-push-precondition

Conversation

@doriable
Copy link
Member

@doriable doriable commented Nov 25, 2025

This PR makes a fix to check modules first, before attempting
to create the modules when the --create flag is set for buf push.

This is because if a module already exists, we shouldn't bother to
attempt to create it, and we should allow users to continue pushing
to it.

This also allows users that have pre-existing user-owned modules
on registries that now disallow creating new user-owned modules
to continue to push to their modules.

Fixes #4157

This changes the logic to first check the modules before attempting to
create. This is because if a module already exists, we should not bother
to attempt to create it.

This also allows users that have pre-existing user-owned modules on
servers that now disallow creating new user-owned modules to continue
pushing to their modules.
@doriable doriable requested a review from emcfarlane November 25, 2025 20:39
@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedNov 25, 2025, 8:54 PM

Co-authored-by: Edward McFarlane <3036610+emcfarlane@users.noreply.github.com>
@doriable doriable merged commit ab11524 into main Nov 25, 2025
10 checks passed
@doriable doriable deleted the allow-existing-repos-push-precondition branch November 25, 2025 21:03
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.

Failure: failed_precondition: feature "user-owned repository" is not enabled on the server

2 participants