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

Tweak repo add behavior #538

Merged
merged 1 commit into from
Jun 27, 2024
Merged

Conversation

linsword13
Copy link
Collaborator

@linsword13 linsword13 commented Jun 26, 2024

Now when doing ramble repo add <repo-path>, it won't error out if the
repo does not contain all object types.

Behavior with the change:

  • Complains when specified type not found (same as previous)
$ ramble repo create test-repo
$ ls test-repo
applications  modifiers  repo.yaml

$ rm -r test-repo/modifiers/
$ ramble repo add -t modifiers test-repo
==> Error: Failed to find valid repo with type ObjectTypes.modifiers
  • Do not complain when no type is specified (changed from previous)
$ ramble repo add test-repo
==> Added applications repo with namespace 'test-repo'.
  • Complain if no valid repo is found
$ rm -r test-repo/applications/
$ ramble repo add test-repo
==> Error: The given path test-repo is not a valid repo for any object types

@linsword13 linsword13 requested a review from rfbgo June 26, 2024 00:24
Now when doing `ramble repo add <repo-path>`, it won't error out if the
repo does not contain all object types.

Behavior with the change:

* Complains when specified type not found (same as previous)

```sh
$ ramble repo create test-repo
$ ls test-repo
applications  modifiers  repo.yaml

$ rm -r test-repo/modifiers/
$ ramble repo add -t modifiers test-repo
==> Error: Failed to find valid repo with type ObjectTypes.modifiers
```

* Do not complain when no type is specified (changed from previous)

```sh
$ ramble repo add test-repo
==> Added applications repo with namespace 'test-repo'.
```

* Complain if no valid repo is found

```sh
$ rm -r test-repo/applications/
$ ramble repo add test-repo
==> Error: The given path test-repo is not a valid repo for any object types
```
@rfbgo rfbgo merged commit d2ba74e into GoogleCloudPlatform:develop Jun 27, 2024
11 checks passed
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.

2 participants