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(1961): Retry with new request package #2570

Merged
merged 1 commit into from
Sep 14, 2021
Merged

fix(1961): Retry with new request package #2570

merged 1 commit into from
Sep 14, 2021

Conversation

tkyi
Copy link
Member

@tkyi tkyi commented Sep 14, 2021

Context

Retry was not working as expected in functional tests.

21:29:18 1) Scenario: Create an event when user starts a job (attempt 3) # features/events.feature:34
21:29:18    ✔ Before # features/step_definitions/events.js:9
21:29:18    ✔ Given an existing pipeline with the workflow: # features/step_definitions/events.js:18
21:29:18        | job  | triggers |
21:29:18        | main | publish  |
21:29:18    ✔ And "calvin" has admin permission to the pipeline # features/step_definitions/events.js:22
21:29:18    ✔ And "calvin" is logged in # features/step_definitions/authorization.js:20
21:29:18    ✔ When the "main" job is started # features/step_definitions/secrets.js:48
21:29:18    ✔ Then an event is created # features/step_definitions/events.js:24
21:29:18    ✖ And the "main" build succeeds # features/step_definitions/events.js:34
21:29:18        AssertionError: expected 'QUEUED' to equal 'SUCCESS'
21:29:18            at /sd/workspace/src/github.com/screwdriver-cd/screwdriver/features/step_definitions/events.js:36:16
21:29:18            at runMicrotasks (<anonymous>)
21:29:18            at processTicksAndRejections (internal/process/task_queues.js:97:5)
21:29:18    - And the "publish" build succeeds with the same eventId as the "main" build # features/step_definitions/events.js:41

Objective

This PR:

  • renames from retryOptions => retry
  • throws error in retry strategy in afterResponse hook to correctly trigger retries

References

Related to #1961

License

I confirm that this contribution is made under a BSD license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@tkyi tkyi merged commit 81e2d87 into master Sep 14, 2021
@tkyi tkyi deleted the retry branch September 14, 2021 19:58
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