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

[Scheduler Enhancement] Increase the retention timeout for the blackbox action. #5266

Merged
merged 12 commits into from
Jul 12, 2022

Conversation

style95
Copy link
Member

@style95 style95 commented Jul 4, 2022

Description

For the blackbox actions, it may take more than 20 seconds which is a default in-progress timeout, to pull an image and it makes the activation timed out.
A memory queue no longer drop black-box activations in such a case with this change.

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.

@codecov-commenter
Copy link

codecov-commenter commented Jul 5, 2022

Codecov Report

Merging #5266 (fa77904) into master (8843579) will decrease coverage by 14.37%.
The diff coverage is 12.06%.

@@             Coverage Diff             @@
##           master    #5266       +/-   ##
===========================================
- Coverage   80.09%   65.71%   -14.38%     
===========================================
  Files         238      238               
  Lines       14080    14122       +42     
  Branches      576      589       +13     
===========================================
- Hits        11277     9280     -1997     
- Misses       2803     4842     +2039     
Impacted Files Coverage Δ
...in/scala/org/apache/openwhisk/common/Logging.scala 70.17% <0.00%> (-16.61%) ⬇️
.../core/scheduler/container/CreationJobManager.scala 0.00% <0.00%> (-83.08%) ⬇️
...e/openwhisk/core/scheduler/queue/MemoryQueue.scala 0.00% <0.00%> (-84.62%) ⬇️
.../scala/org/apache/openwhisk/core/WhiskConfig.scala 95.95% <100.00%> (+0.02%) ⬆️
...ontainerpool/v2/FunctionPullingContainerPool.scala 82.87% <100.00%> (+0.21%) ⬆️
...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%) ⬇️
... and 41 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 8843579...fa77904. Read the comment docs.

stay using data.copy(activeDuringFlush = false)
else
cleanUpActorsAndGotoRemoved(data)

case Event(GracefulShutdown, data: FlushingData) =>
completeAllActivations(data.reason, ContainerCreationError.whiskErrors.contains(data.error))
completeAllActivations(data.reason, isWhiskError(data.error))
Copy link
Contributor

@ningyougang ningyougang Jul 5, 2022

Choose a reason for hiding this comment

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

Our downstream didn't have this statement

completeAllActivations(data.reason, isWhiskError(data.error))

So, just add completeAllActivations, is it for safe?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice catch. I added the case back.

@bdoyle0182
Copy link
Contributor

LGTM

@style95 style95 merged commit 8d31e96 into apache:master Jul 12, 2022
JesseStutler pushed a commit to JesseStutler/openwhisk that referenced this pull request Jul 13, 2022
…ox action. (apache#5266)

* Increase the retention timeout for the blackbox action.

* Fix test cases.

* Apply scalaFmt.

* Add GracefulShutdown case back.

* Increase the blackbox timeout for test cases.

* Access the private method directly.

* Replace Thread.sleep with awaitAssert

* Add the missing configuration.

* Enhance the test code.

* Remove thread.sleep.

* Fix test cases.

* Fix test cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants