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

bug: Adding a repository with non-existent branch returns error stating main is invalid branch. #5713

Open
FragmentedPacket opened this issue Feb 11, 2025 · 0 comments · May be fixed by #5714
Labels
type/bug Something isn't working as expected

Comments

@FragmentedPacket
Copy link
Contributor

Component

API Server / GraphQL

Infrahub version

1.1.6

Current Behavior

If you add a repository with a different ref/default_branch other than main that does not exist, the import fails, but provides an error message stating that main is not a valid branch for the repository.

Image

This seems to be limited to a CoreReadOnlyRepository as we get the expected error message on a CoreRepository.

Image

Expected Behavior

Proper branch in the final error message and maybe a cleaner error message rather than a traceback (This might be due to additional logging I have setup using dev.start).

Steps to Reproduce

  1. invoke demo.start
  2. infrahubctl repository add test https://github.com/opsmill/infrahub-demo-dc-fabric.git --ref develop --read-only or manually create the read-only repository in the UI with a branch that doesn't exist.

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working as expected
Projects
None yet
1 participant