Skip to content

fix: CI/CD tests sometimes fail if deployment takes longer than default Task timeout#540

Merged
eob merged 4 commits intomainfrom
fix-project-structure-timeout
Sep 1, 2023
Merged

fix: CI/CD tests sometimes fail if deployment takes longer than default Task timeout#540
eob merged 4 commits intomainfrom
fix-project-structure-timeout

Conversation

@eob
Copy link
Copy Markdown
Contributor

@eob eob commented Aug 30, 2023

This PR introduces a wait_forever method on Task, and then uses it for Package & Plugin deployments within tests.

The hope is that some of the occasional deployment timeout failures can be avoided by simply extending the wait time.

(In response to a PR earlier today in which a single failure related to deployment timeouts happened.)

@eob eob requested a review from douglas-reid August 30, 2023 16:10
douglas-reid
douglas-reid previously approved these changes Aug 30, 2023
@douglas-reid
Copy link
Copy Markdown
Contributor

@eob do you think this is an indication that we should add something like either: task.wait_forever() or task.until_succeed_or_failed() ?

@eob
Copy link
Copy Markdown
Contributor Author

eob commented Aug 30, 2023

@douglas-reid I sat on it for the day to see if I had an opinion, and I think I'm completely agnostic.

It's just a few LoC change -- LMK if you think that's a better route and I'll update this PR to be that instead.

If yes, my vote between the two would be wait_forever with the implicit semantics of throwing on failure or returning on success.

@douglas-reid
Copy link
Copy Markdown
Contributor

@douglas-reid I sat on it for the day to see if I had an opinion, and I think I'm completely agnostic.

It's just a few LoC change -- LMK if you think that's a better route and I'll update this PR to be that instead.

If yes, my vote between the two would be wait_forever with the implicit semantics of throwing on failure or returning on success.

No worries. I've just run across this before personally, and always end up writing something like:

   state = task.state
   while state not in [TaskState.succeeded, TaskState.failed]:
        try:
            task.wait()
            state = task.state
        except:
           ...

or whatever and have thought about adding a shorthand for that if others started stumbling too.

@eob eob added this pull request to the merge queue Sep 1, 2023
@eob eob removed this pull request from the merge queue due to a manual request Sep 1, 2023
@eob eob merged commit ce0a6e4 into main Sep 1, 2023
@eob eob deleted the fix-project-structure-timeout branch September 1, 2023 20:42
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