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

Retry on any errors. #5280

Merged
merged 2 commits into from
Jul 15, 2022
Merged

Retry on any errors. #5280

merged 2 commits into from
Jul 15, 2022

Conversation

style95
Copy link
Member

@style95 style95 commented Jul 12, 2022

Description

Sometimes, requests against CouchDB failed.

    stdout: Failed to create subject ([Errno 110] Connection timed out)
.
.
.
    stdout: The subject you want to edit is blocked

It is harmless to retry not only for the network error, but also for any errors.

Related issue and scope

  • I opened an issue to propose and discuss this change (#????)

My changes affect the following components

  • API
  • Controller
  • Message Bus (e.g., Kafka)
  • Loadbalancer
  • Scheduler
  • Invoker
  • Intrinsic actions (e.g., sequences, conductors)
  • Data stores (e.g., CouchDB)
  • Tests
  • Deployment
  • CLI
  • General tooling
  • Documentation

Types of changes

  • Bug fix (generally a non-breaking change which closes an issue).
  • Enhancement or new feature (adds new functionality).
  • Breaking change (a bug fix or enhancement which changes existing behavior).

Checklist:

  • I signed an Apache CLA.
  • I reviewed the style guides and followed the recommendations (Travis CI will check :).
  • I added tests to cover my changes.
  • My changes require further changes to the documentation.
  • I updated the documentation where necessary.

it should "not retry commands if failure is not retriable" in {
Seq(MISUSE_EXIT, ERROR_EXIT, SUCCESS_EXIT).foreach { code =>
it should "retry commands if any failure is happen" in {
Seq(MISUSE_EXIT, ERROR_EXIT).foreach { code =>
cmdCount = 0

rr = Some(TestRunResult(code))
noException shouldBe thrownBy {
cli(Seq.empty, expectedExitCode = DONTCARE_EXIT, retriesOnNetworkError = 3)
Copy link
Member

Choose a reason for hiding this comment

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

It seems the retriesOnNetworkError variable name also needs to be updated.

@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2022

Codecov Report

Merging #5280 (ca0b07d) into master (a7fecfb) will decrease coverage by 17.02%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master    #5280       +/-   ##
===========================================
- Coverage   80.04%   63.01%   -17.03%     
===========================================
  Files         238      238               
  Lines       14091    14122       +31     
  Branches      598      589        -9     
===========================================
- Hits        11279     8899     -2380     
- Misses       2812     5223     +2411     
Impacted Files Coverage Δ
...che/openwhisk/core/invoker/LogStoreCollector.scala 0.00% <0.00%> (-100.00%) ⬇️
...nwhisk/core/scheduler/queue/ContainerCounter.scala 0.00% <0.00%> (-100.00%) ⬇️
...hisk/core/scheduler/message/ContainerMessage.scala 0.00% <0.00%> (-100.00%) ⬇️
...core/database/cosmosdb/RxObservableImplicits.scala 0.00% <0.00%> (-100.00%) ⬇️
...ore/database/cosmosdb/cache/CacheInvalidator.scala 0.00% <0.00%> (-100.00%) ⬇️
...e/database/cosmosdb/cache/ChangeFeedConsumer.scala 0.00% <0.00%> (-100.00%) ⬇️
...core/scheduler/queue/SchedulingDecisionMaker.scala 0.00% <0.00%> (-98.80%) ⬇️
...sk/core/scheduler/container/ContainerManager.scala 0.00% <0.00%> (-96.90%) ⬇️
...core/database/cosmosdb/CosmosDBArtifactStore.scala 0.00% <0.00%> (-95.85%) ⬇️
.../openwhisk/core/scheduler/FPCSchedulerServer.scala 0.00% <0.00%> (-95.84%) ⬇️
... and 60 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7fecfb...ca0b07d. Read the comment docs.

@style95 style95 merged commit 4a69be2 into apache:master Jul 15, 2022
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.

5 participants