Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmd/pipeline/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ type statusResponse struct {

type ConvertCmd struct {
File string `help:"Path to the pipeline file to convert (required)" short:"F" required:""`
Vendor string `help:"CI/CD vendor (auto-detected if not specified)" short:"v"`
Vendor string `help:"CI/CD vendor (auto-detected if the file name matches vendor path and name - otherwise, needs to be specified)" short:"v"`
Output string `help:"Custom path to save the converted pipeline (default: .buildkite/pipeline.<vendor>.yml)" short:"o"`
Timeout int `help:"Timeout in seconds for conversion" default:"300"`
Timeout int `help:"Timeout in seconds for conversion (increase for large pipelines, decrease to fail conversion on timeout)" default:"300"`
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if it's clear to me what's the intent of the current wording, especially around decreasing the timeout value.

Copy link
Author

Choose a reason for hiding this comment

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

@omehegan we might need your assistance here as I tried to convey your explanation to the best of my ability, and it didn't seem to have worked.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I don't know that this needs a change, maybe I'm biased here as I know what timeout is, but I think it's generally accepted as a term and function?

decrease to fail conversion on timeout, what happens if I set to 0?

Copy link
Author

Choose a reason for hiding this comment

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

@mcncl if the timeout is set to zero, same thing happens as when the timeout is shorter than the conversion needs to run - "panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x10 pc=0x104d337d0]"

Copy link
Author

Choose a reason for hiding this comment

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

Should we add a warning to advise users against setting the timeout to zero, to be on the safe side?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, that should be handled in the code

Copy link
Contributor

Choose a reason for hiding this comment

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

Fixed in #655

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, @mcncl!

Hey, @omehegan could you please take a look here and help us out with a better explanation of time-outs?

}

func (c *ConvertCmd) Help() string {
Expand All @@ -61,7 +61,7 @@ Supported vendors:
- harness (Harness CI) (beta)
- bitrise (Bitrise) (beta)

The command will automatically detect the vendor based on the file name if not specified.
The command will automatically detect the vendor based on the file path and name if not specified.

By default, the converted pipeline is saved to .buildkite/pipeline.<vendor>.yml.
Use the --output flag to specify a custom output path.
Expand Down