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

deps(apiops): bump to v0.1.28 adds 'namespace' command #1179

Merged
merged 6 commits into from
Jan 24, 2024
Merged

Conversation

Tieske
Copy link
Member

@Tieske Tieske commented Jan 22, 2024

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2024

Codecov Report

Attention: 109 lines in your changes are missing coverage. Please review.

Comparison is base (bfd04d2) 5.76% compared to head (6247e51) 5.57%.

Files Patch % Lines
cmd/file_namespace.go 0.00% 108 Missing ⚠️
cmd/root.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #1179      +/-   ##
========================================
- Coverage   5.76%   5.57%   -0.19%     
========================================
  Files         31      32       +1     
  Lines       3229    3338     +109     
========================================
  Hits         186     186              
- Misses      3033    3142     +109     
  Partials      10      10              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

`,
RunE: executeNamespace,
Example: `# Apply namespace to a deckfile
deck file namespace --namespace=/my-namespace --state=deckfile.yaml
Copy link
Collaborator

Choose a reason for hiding this comment

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

The example does not contain a selector, but is required (IIUC).

@rspurgeon
Copy link
Collaborator

The error text here may be confusing:

./deck file namespace --path-prefix kong --state $GOPATH/src/github.com/Kong/go-apiops/docs/mock-a-rena-kong.yml --selector '$.services[*].routes[*]'
Error: failed to apply the namespace: invalid namespace; the namespace MUST start with '/', and cannot be empty, got: 'kong'

The error should indicate that the path-prefix value must start with '/' and not be empty.

- fixed example in cli
- updated error message on invalid path-prefix
@Tieske Tieske marked this pull request as ready for review January 24, 2024 16:01
@Tieske Tieske requested a review from a team as a code owner January 24, 2024 16:01
GGabriele
GGabriele previously approved these changes Jan 24, 2024
rspurgeon
rspurgeon previously approved these changes Jan 24, 2024
Copy link
Collaborator

@rspurgeon rspurgeon left a comment

Choose a reason for hiding this comment

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

LGTM

@Tieske Tieske merged commit 221be5c into main Jan 24, 2024
39 checks passed
@Tieske Tieske deleted the bump/apiops branch January 24, 2024 18:15
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.

None yet

5 participants