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

fix: error handling when creating TW #5631

Merged
merged 4 commits into from
Jul 3, 2024
Merged

Conversation

exu
Copy link
Member

@exu exu commented Jul 3, 2024

Pull request description

Checklist (choose whats happened)

  • breaking change! (describe)
  • tested locally
  • tested on cluster
  • added new dependencies
  • updated the docs
  • added a test

Breaking changes

Changes

Fixes

Copy link

netlify bot commented Jul 3, 2024

Deploy Preview for testkube-docs-preview canceled.

Name Link
🔨 Latest commit dbcb556
🔍 Latest deploy log https://app.netlify.com/sites/testkube-docs-preview/deploys/668558af01afc50008856011

@@ -67,7 +67,9 @@ func NewCreateTestWorkflowCmd() *cobra.Command {
}
}

workflow, _ := client.GetTestWorkflow(obj.Name)
workflow, err := client.GetTestWorkflow(obj.Name)
ui.ExitOnError("getting test workflow "+obj.Name+" in namespace "+obj.Namespace, err)
Copy link
Member

@rangoo94 rangoo94 Jul 3, 2024

Choose a reason for hiding this comment

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

That should not be there, as will disallow creating new TestWorkflows, unless you will replace err = nil in case of "404 Not Found" error

Copy link
Member

@rangoo94 rangoo94 left a comment

Choose a reason for hiding this comment

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

Not sure if debug message makes sense in case of lack of workflow during creation, but it's not critical issue so approving 👍

@exu
Copy link
Member Author

exu commented Jul 3, 2024

Not sure if debug message makes sense in case of lack of workflow during creation, but it's not critical issue so approving 👍

You'll get it only when passing --verbose flag

@exu exu merged commit 79bddc4 into develop Jul 3, 2024
11 checks passed
@exu exu deleted the TKC-2197/workflows-update-cli branch July 3, 2024 14:20
vsukhin pushed a commit that referenced this pull request Jul 3, 2024
* fix: error handling when creating TW

* fix: remove object.name update

* fix: move error to debug

* fix: handle error on update
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

3 participants