-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: Add optional file flags for cli view add command #3314
base: develop
Are you sure you want to change the base?
feat: Add optional file flags for cli view add command #3314
Conversation
Hi @najeal. Thank you for contributing this PR. The pattern in your implementation is clever but makes it hard for users to understand easily how to use the command as mixes ordered args and unordered flags. I would recommend switching entirely to flags like we do with some of our other commands. Cobra has some functionality to do an exclusif or on a set of flags so we could easily do.
Once/if you decide to do the change, please update the command usage description accordingly :) |
Hi @fredcarle ! I will do the changes 👍 |
Changes are done 👍 |
3a91ed6
to
e3a3bd3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution @najeal! Sorry for the delay in approving this. We've been at work on other priorities. I'll be merging your PR once the CI completes its required workflows.
@fredcarle no problem ! If you see any good first issue I could look, let me know ! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3314 +/- ##
===========================================
- Coverage 78.47% 77.18% -1.29%
===========================================
Files 396 396
Lines 37333 37355 +22
===========================================
- Hits 29295 28830 -465
- Misses 6352 6857 +505
+ Partials 1686 1668 -18
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 53 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI raised an issue with integration tests using the CLI as a client. Could you please update tests/clients/cli/wrapper.go#wrapper.AddView
to fit the changes that you made.
You can run the following command to see the result of one of the failing tests locally. They all have the same issue so fixing that one should fix the others too.
DEFRA_CLIENT_CLI=true go test -run ^TestView_Simple_GQLIntrospectionTest$ ./tests/integration/view/simple
Relevant issue(s)
Resolves #3280
Description
This PR adds add optional way to provide query and sdl data from a file when using cli
view add
command.Tasks
How has this been tested?
It has been tested adding new unit tests.
Specify the platform(s) on which this was tested: