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(3226): refactor verify method to throw an error when pod is in the unknown waiting state #199

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

VonnyJap
Copy link
Member

Context

_verify method fails to provide proper error handling during a situation when the pod is not in a running condition hence missing the retry mechanism and causing the build stuck in a dangling situation.

Objective

_verify method refactoring to throw an error if the pod is not running or succeeded, enabling a retry mechanism, i.e. when pod is initializing or in a state of waiting.

References

screwdriver-cd/screwdriver#3226

License

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@VonnyJap VonnyJap changed the title Refactor _verify method to throw an error when pod is in the unknown waiting state fix(3226): Refactor _verify method to throw an error when pod is in the unknown waiting state Oct 28, 2024
@VonnyJap VonnyJap changed the title fix(3226): Refactor _verify method to throw an error when pod is in the unknown waiting state fix(3226): refactor _verify method to throw an error when pod is in the unknown waiting state Oct 28, 2024
@VonnyJap VonnyJap changed the title fix(3226): refactor _verify method to throw an error when pod is in the unknown waiting state fix(3226): refactor verify method to throw an error when pod is in the unknown waiting state Oct 28, 2024

waitingReason = hoek.reach(p, CONTAINER_WAITING_REASON_PATH);
if (status === 'running' || status === 'succeeded') {
Copy link
Contributor

Choose a reason for hiding this comment

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

message value is set but will never be used


// data is not undefined when desired status or waitingReason met
// hence no error needs to be thrown
if (data !== undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we want to fix this inconsistent return from the function, consider returning an obj with message and verify status and use it in worker to decide retry plus log the message

Copy link
Contributor

@pritamstyz4ever pritamstyz4ever left a comment

Choose a reason for hiding this comment

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

needs some rework

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.

2 participants