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

FR: Allow configuration of the exit code on failure #168

Open
petemounce opened this issue Jul 21, 2020 · 1 comment
Open

FR: Allow configuration of the exit code on failure #168

petemounce opened this issue Jul 21, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@petemounce
Copy link
Contributor

If the checkout fails for some reason, that's quite likely to be a systemic failure (whether persistent like p4 being down, or transient like a network interruption on a large asset) rather than a user-level failure.

We would like to be able to set up auto-retry on BK jobs so that such failures are automatically retried, but while the exit code for such is 1 we cannot distinguish that from other user-level job failures.

We'd like to be able to specify the exit code that p4 checkouts fail with so that we can distinguish that and match it to the exit codes we use for auto-retry.

@petemounce petemounce added the enhancement New feature or request label Jul 21, 2020
@ca-johnson
Copy link
Contributor

ca-johnson commented Aug 5, 2020

The main thing I would suggest here really would be improving the reliability of the Perforce server - this is enterprise grade software that should not really be having transient errors.

If theres a genuine reason why such errors are expected and unavoidable, I would suggest turning on retries for 1 exitcodes in the jobs that use this plugin and instead customising the exitcodes of your user code (assuming you want to avoid retrying user errors).

This allows the problem to be solved more flexibly, for your specific case, rather than in shared code for a problem that doesn't appear to be shared.

Generally, I would be hesitant to add a configuration option, or add exit-codes specific to the sync operation since:

  • This increases the complexity of code and configuration scope, making the code cost more to reason about, improve and maintain
  • Most people would not need to make use of this feature - it provides no practical improvement to core functionality
  • Introduces scope for bugs where some errors are not handled and given the alternative exitcode
  • Difficult to test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants