-
Notifications
You must be signed in to change notification settings - Fork 244
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
Refactor genericclioptions.Context #5198
Refactor genericclioptions.Context #5198
Conversation
62da028
to
5807d37
Compare
/test unit |
5807d37
to
d26d0b4
Compare
2902959
to
3d1474b
Compare
✔️ Deploy Preview for odo-docusaurus-preview ready! 🔨 Explore the source changes: 5e029f7 🔍 Inspect the deploy log: https://app.netlify.com/sites/odo-docusaurus-preview/deploys/6194a8a81dbdd10008042b76 😎 Browse the preview: https://deploy-preview-5198--odo-docusaurus-preview.netlify.app |
f5eb35a
to
2fbfab3
Compare
/test psi-kubernetes-integration-e2e |
8c9c6b6
to
05b657c
Compare
if err != nil { | ||
util.LogErrorAndExit(err, "") | ||
} |
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.
Can we fix this function to return the error as well so that we can avoid abrupt exit calls?
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.
This function is called during completion, and I'm not sure if we can modify its signature easily. I would prefer the change is part of another PR concerning completion.
pkg/odo/genericclioptions/context.go
Outdated
return CreateParameters{cmd: cmd} | ||
} | ||
|
||
func (o CreateParameters) CheckRouteAvailability() CreateParameters { |
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.
Optional: Can we rename this method to something like RequireRouteAvailability
? I understand your reasoning behind naming it CheckRouteAvailability
, but I still find it a little non-intuitive. Intuitively I think it would be a function that checks if the route is available to use.
05b657c
to
5e029f7
Compare
SonarCloud Quality Gate failed.
|
/test v4.9-integration-e2e
|
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.
Thank you for this PR :)
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: valaparthvi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
* Make context.project immutable * Make context.application immutable * Make context.outputFlag immutable * Make context.ComponentContext immutable + dont store command * Doc + kclient/occlient * Refactor New* * More refactoring * Remove DevfilePath parameter * genericclioptions.NewCreateParameters * private consts * Refactor use of context * Make CreateParameters exported * Refactor build-images * Remove SetComponentcontext * resolveProjectAndNamespace * temp fix * Rename RequireRouteAvailability
What type of PR is this?
/kind cleanup
What does this PR do / why we need it:
Which issue(s) this PR fixes:
Fixes #5176
PR acceptance criteria:
Unit test
Integration test
Documentation
I have read the test guidelines
How to test changes / Special notes to the reviewer: