[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5074: [New Scheduler] Manage container creation

2021-05-06 Thread GitBox


codecov-commenter edited a comment on pull request #5074:
URL: https://github.com/apache/openwhisk/pull/5074#issuecomment-834018480


   # 
[Codecov](https://codecov.io/gh/apache/openwhisk/pull/5074?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#5074](https://codecov.io/gh/apache/openwhisk/pull/5074?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (f8baf7a) into 
[master](https://codecov.io/gh/apache/openwhisk/commit/aa7e6e2af196ac017ae4b9ea36656bec868a9931?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (aa7e6e2) will **decrease** coverage by `3.74%`.
   > The diff coverage is `74.22%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/openwhisk/pull/5074/graphs/tree.svg?width=650=150=pr=l0YmsiSAso_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/openwhisk/pull/5074?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#5074  +/-   ##
   ==
   - Coverage   78.82%   75.07%   -3.75% 
   ==
 Files 213  217   +4 
 Lines   1046610774 +308 
 Branches  440  462  +22 
   ==
   - Hits 8250 8089 -161 
   - Misses   2216 2685 +469 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/openwhisk/pull/5074?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[.../apache/openwhisk/core/controller/Controller.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udHJvbGxlci9Db250cm9sbGVyLnNjYWxh)
 | `55.66% <ø> (ø)` | |
   | 
[...enwhisk/core/loadBalancer/InvokerSupervision.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbG9hZEJhbGFuY2VyL0ludm9rZXJTdXBlcnZpc2lvbi5zY2FsYQ==)
 | `88.81% <ø> (-0.46%)` | :arrow_down: |
   | 
[...che/openwhisk/core/loadBalancer/LoadBalancer.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbG9hZEJhbGFuY2VyL0xvYWRCYWxhbmNlci5zY2FsYQ==)
 | `90.00% <ø> (+13.07%)` | :arrow_up: |
   | 
[...e/loadBalancer/ShardingContainerPoolBalancer.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbG9hZEJhbGFuY2VyL1NoYXJkaW5nQ29udGFpbmVyUG9vbEJhbGFuY2VyLnNjYWxh)
 | `80.79% <ø> (ø)` | |
   | 
[...k/core/containerpool/v2/InvokerHealthManager.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC92Mi9JbnZva2VySGVhbHRoTWFuYWdlci5zY2FsYQ==)
 | `75.00% <ø> (-0.38%)` | :arrow_down: |
   | 
[.../org/apache/openwhisk/core/connector/Message.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29ubmVjdG9yL01lc3NhZ2Uuc2NhbGE=)
 | `60.62% <23.63%> (-9.67%)` | :arrow_down: |
   | 
[.../main/scala/org/apache/openwhisk/core/WarmUp.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvV2FybVVwLnNjYWxh)
 | `64.28% <64.28%> (ø)` | |
   | 

[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #4910: Document for prewarmed container

2021-05-06 Thread GitBox


codecov-commenter edited a comment on pull request #4910:
URL: https://github.com/apache/openwhisk/pull/4910#issuecomment-632586255


   # 
[Codecov](https://codecov.io/gh/apache/openwhisk/pull/4910?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#4910](https://codecov.io/gh/apache/openwhisk/pull/4910?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (ee9304f) into 
[master](https://codecov.io/gh/apache/openwhisk/commit/aa7e6e2af196ac017ae4b9ea36656bec868a9931?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (aa7e6e2) will **decrease** coverage by `3.50%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/openwhisk/pull/4910/graphs/tree.svg?width=650=150=pr=l0YmsiSAso_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/openwhisk/pull/4910?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#4910  +/-   ##
   ==
   - Coverage   78.82%   75.32%   -3.51% 
   ==
 Files 213  220   +7 
 Lines   1046610731 +265 
 Branches  440  444   +4 
   ==
   - Hits 8250 8083 -167 
   - Misses   2216 2648 +432 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/openwhisk/pull/4910?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[...core/database/cosmosdb/RxObservableImplicits.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvUnhPYnNlcnZhYmxlSW1wbGljaXRzLnNjYWxh)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[...ore/database/cosmosdb/cache/CacheInvalidator.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NhY2hlSW52YWxpZGF0b3Iuc2NhbGE=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[...e/database/cosmosdb/cache/ChangeFeedConsumer.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NoYW5nZUZlZWRDb25zdW1lci5zY2FsYQ==)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[...core/database/cosmosdb/CosmosDBArtifactStore.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJBcnRpZmFjdFN0b3JlLnNjYWxh)
 | `0.00% <0.00%> (-95.48%)` | :arrow_down: |
   | 
[...sk/core/database/cosmosdb/CosmosDBViewMapper.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJWaWV3TWFwcGVyLnNjYWxh)
 | `0.00% <0.00%> (-93.90%)` | :arrow_down: |
   | 
[...tabase/cosmosdb/cache/CacheInvalidatorConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NhY2hlSW52YWxpZGF0b3JDb25maWcuc2NhbGE=)
 | `0.00% <0.00%> (-92.31%)` | :arrow_down: |
   | 
[...enwhisk/connector/kafka/KamonMetricsReporter.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYW1vbk1ldHJpY3NSZXBvcnRlci5zY2FsYQ==)
 | `0.00% <0.00%> (-83.34%)` | :arrow_down: |
   | 

[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #4910: Document for prewarmed container

2021-05-06 Thread GitBox


codecov-commenter edited a comment on pull request #4910:
URL: https://github.com/apache/openwhisk/pull/4910#issuecomment-632586255


   # 
[Codecov](https://codecov.io/gh/apache/openwhisk/pull/4910?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#4910](https://codecov.io/gh/apache/openwhisk/pull/4910?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (ee9304f) into 
[master](https://codecov.io/gh/apache/openwhisk/commit/aa7e6e2af196ac017ae4b9ea36656bec868a9931?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (aa7e6e2) will **decrease** coverage by `3.54%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/openwhisk/pull/4910/graphs/tree.svg?width=650=150=pr=l0YmsiSAso_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/openwhisk/pull/4910?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#4910  +/-   ##
   ==
   - Coverage   78.82%   75.27%   -3.55% 
   ==
 Files 213  220   +7 
 Lines   1046610731 +265 
 Branches  440  444   +4 
   ==
   - Hits 8250 8078 -172 
   - Misses   2216 2653 +437 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/openwhisk/pull/4910?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[...core/database/cosmosdb/RxObservableImplicits.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvUnhPYnNlcnZhYmxlSW1wbGljaXRzLnNjYWxh)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[...ore/database/cosmosdb/cache/CacheInvalidator.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NhY2hlSW52YWxpZGF0b3Iuc2NhbGE=)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[...e/database/cosmosdb/cache/ChangeFeedConsumer.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NoYW5nZUZlZWRDb25zdW1lci5zY2FsYQ==)
 | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
   | 
[...core/database/cosmosdb/CosmosDBArtifactStore.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJBcnRpZmFjdFN0b3JlLnNjYWxh)
 | `0.00% <0.00%> (-95.48%)` | :arrow_down: |
   | 
[...sk/core/database/cosmosdb/CosmosDBViewMapper.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZGF0YWJhc2UvY29zbW9zZGIvQ29zbW9zREJWaWV3TWFwcGVyLnNjYWxh)
 | `0.00% <0.00%> (-93.90%)` | :arrow_down: |
   | 
[...tabase/cosmosdb/cache/CacheInvalidatorConfig.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb3Ntb3NkYi9jYWNoZS1pbnZhbGlkYXRvci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL29wZW53aGlzay9jb3JlL2RhdGFiYXNlL2Nvc21vc2RiL2NhY2hlL0NhY2hlSW52YWxpZGF0b3JDb25maWcuc2NhbGE=)
 | `0.00% <0.00%> (-92.31%)` | :arrow_down: |
   | 
[...enwhisk/connector/kafka/KamonMetricsReporter.scala](https://codecov.io/gh/apache/openwhisk/pull/4910/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2Nvbm5lY3Rvci9rYWZrYS9LYW1vbk1ldHJpY3NSZXBvcnRlci5zY2FsYQ==)
 | `0.00% <0.00%> (-83.34%)` | :arrow_down: |
   | 

[GitHub] [openwhisk] ningyougang commented on a change in pull request #4910: Document for prewarmed container

2021-05-06 Thread GitBox


ningyougang commented on a change in pull request #4910:
URL: https://github.com/apache/openwhisk/pull/4910#discussion_r627888346



##
File path: docs/prewarm.md
##
@@ -0,0 +1,106 @@
+
+
+# runtimes
+
+the runtime is the docker image for different language, e.g. nodejs:N, 
python:N, swift:N, etc.
+
+when user invokes actions, these relative activations are run on docker 
containers which base on
+these runtime docker images.
+
+# Prewarmed container without `reactive`
+
+Prewarmed containers are created when invoker starts, they are created 
according to runtimes.json's stemCells, e.g.

Review comment:
   Your description is more accurate, already updated accordingly.

##
File path: docs/prewarm.md
##
@@ -0,0 +1,106 @@
+
+
+# runtimes
+
+the runtime is the docker image for different language, e.g. nodejs:N, 
python:N, swift:N, etc.
+
+when user invokes actions, these relative activations are run on docker 
containers which base on
+these runtime docker images.
+
+# Prewarmed container without `reactive`

Review comment:
   Your description is more accurate, already updated accordingly.

##
File path: docs/prewarm.md
##
@@ -0,0 +1,106 @@
+
+
+# runtimes
+
+the runtime is the docker image for different language, e.g. nodejs:N, 
python:N, swift:N, etc.
+
+when user invokes actions, these relative activations are run on docker 
containers which base on
+these runtime docker images.
+
+# Prewarmed container without `reactive`
+
+Prewarmed containers are created when invoker starts, they are created 
according to runtimes.json's stemCells, e.g.
+
+```
+{
+"kind": "nodejs:10",
+"default": true,
+"image": {
+"prefix": "openwhisk",
+"name": "action-nodejs-v10",
+"tag": "nightly"
+},
+"deprecated": false,
+"attached": {
+"attachmentName": "codefile",
+"attachmentType": "text/plain"
+ },
+ "stemCells": [
+ {
+"initialCount": 2,
+ "memory": "256 MB"
+ }
+ ]
+}
+```
+Regarding above runtime(nodejs:10 kind + 256 MB memory), `2` prewarmed 
conatainrs will be created when invoker starts,
+and the number of prewarmed container is stable usually, when activation is 
scheduled on the prewarmed container,
+another new prewarmed container will be created at the same time, on the other 
hand, previous used prewarmed container
+is moved from `prewarmedPool` to `busyPool`.
+
+the activation will be scheduled on prewarmed container firstly, then 
subsequent activation will be scheduled on warmed containers.
+because prewarm container is already created in advance, so this can avoid 
`cold start`.
+
+# Prewarmed container with `reactive`

Review comment:
   Your description is more accurate, already updated accordingly.

##
File path: docs/prewarm.md
##
@@ -0,0 +1,106 @@
+
+
+# runtimes
+
+the runtime is the docker image for different language, e.g. nodejs:N, 
python:N, swift:N, etc.
+
+when user invokes actions, these relative activations are run on docker 
containers which base on
+these runtime docker images.
+
+# Prewarmed container without `reactive`
+
+Prewarmed containers are created when invoker starts, they are created 
according to runtimes.json's stemCells, e.g.
+
+```
+{
+"kind": "nodejs:10",
+"default": true,
+"image": {
+"prefix": "openwhisk",
+"name": "action-nodejs-v10",
+"tag": "nightly"
+},
+"deprecated": false,
+"attached": {
+"attachmentName": "codefile",
+"attachmentType": "text/plain"
+ },
+ "stemCells": [
+ {
+"initialCount": 2,
+ "memory": "256 MB"
+ }
+ ]
+}
+```
+Regarding above runtime(nodejs:10 kind + 256 MB memory), `2` prewarmed 
conatainrs will be created when invoker starts,
+and the number of prewarmed container is stable usually, when activation is 
scheduled on the prewarmed container,
+another new prewarmed container will be created at the same time, on the other 
hand, previous used prewarmed container
+is moved from `prewarmedPool` to `busyPool`.
+
+the activation will be scheduled on prewarmed container firstly, then 
subsequent activation will be scheduled on warmed containers.
+because prewarm container is already created in advance, so this can avoid 
`cold start`.
+
+# Prewarmed container with `reactive`
+
+`Adjust the prewarmed container resource dynamically` is supported by 
`reactive` configuration, e.g.
+```
+{
+"kind": "nodejs:10",
+"default": true,
+"image": {
+"prefix": "openwhisk",
+"name": "action-nodejs-v10",
+"tag": "nightly"
+},
+"deprecated": false,
+"attached": {
+"attachmentName": "codefile",
+"attachmentType": "text/plain"
+ },
+ "stemCells": [
+ {
+"initialCount": 2,
+ "memory": "256 MB",
+ "reactive": {
+ "minCount": 1,
+ "maxCount": 4,
+ "ttl": "2 minutes",
+ 

[GitHub] [openwhisk] ningyougang commented on a change in pull request #4910: Document for prewarmed container

2021-05-06 Thread GitBox


ningyougang commented on a change in pull request #4910:
URL: https://github.com/apache/openwhisk/pull/4910#discussion_r627888039



##
File path: docs/prewarm.md
##
@@ -0,0 +1,106 @@
+
+
+# runtimes

Review comment:
   Already moved to `actions.md`'s `## Languages and Runtimes` section.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [openwhisk] ningyougang commented on a change in pull request #4910: Document for prewarmed container

2021-05-06 Thread GitBox


ningyougang commented on a change in pull request #4910:
URL: https://github.com/apache/openwhisk/pull/4910#discussion_r627887835



##
File path: docs/prewarm.md
##
@@ -0,0 +1,106 @@
+
+
+# runtimes
+
+the runtime is the docker image for different language, e.g. nodejs:N, 
python:N, swift:N, etc.
+
+when user invokes actions, these relative activations are run on docker 
containers which base on
+these runtime docker images.
+
+# Prewarmed container without `reactive`
+
+Prewarmed containers are created when invoker starts, they are created 
according to runtimes.json's stemCells, e.g.
+
+```
+{
+"kind": "nodejs:10",
+"default": true,
+"image": {
+"prefix": "openwhisk",
+"name": "action-nodejs-v10",
+"tag": "nightly"
+},
+"deprecated": false,
+"attached": {
+"attachmentName": "codefile",
+"attachmentType": "text/plain"
+ },
+ "stemCells": [
+ {
+"initialCount": 2,
+ "memory": "256 MB"
+ }
+ ]
+}
+```
+Regarding above runtime(nodejs:10 kind + 256 MB memory), `2` prewarmed 
conatainrs will be created when invoker starts,
+and the number of prewarmed container is stable usually, when activation is 
scheduled on the prewarmed container,
+another new prewarmed container will be created at the same time, on the other 
hand, previous used prewarmed container
+is moved from `prewarmedPool` to `busyPool`.
+
+the activation will be scheduled on prewarmed container firstly, then 
subsequent activation will be scheduled on warmed containers.
+because prewarm container is already created in advance, so this can avoid 
`cold start`.
+
+# Prewarmed container with `reactive`
+
+`Adjust the prewarmed container resource dynamically` is supported by 
`reactive` configuration, e.g.
+```
+{
+"kind": "nodejs:10",
+"default": true,
+"image": {
+"prefix": "openwhisk",
+"name": "action-nodejs-v10",
+"tag": "nightly"
+},
+"deprecated": false,
+"attached": {
+"attachmentName": "codefile",
+"attachmentType": "text/plain"
+ },
+ "stemCells": [
+ {
+"initialCount": 2,
+ "memory": "256 MB",
+ "reactive": {
+ "minCount": 1,
+ "maxCount": 4,
+ "ttl": "2 minutes",
+ "threshold": 1,
+ "increment": 1
+ }
+ ]
+}
+```
+`reactive` fields explanation:
+* minCount: exist at least `minCount` prewarmed containers.
+* maxCount: can't create more than `maxCount`prewarmed containers.
+* ttl: the prewarmed conainers will be deleted due to expiration, because they 
are not used in ttl time.
+* threshold and increment: these two fileds are used together to calculate the 
new created number of prewarmed containers.
+
+How to support `adjust the prewarmed container resource dynamically`
+
+* Some prewarmed containers will be deleted if they are expiration, this can 
save some memory resource.
+* Create a certain range prewarmed conainers according to the cold start in 
same kind on next schedule time, e.g.
+  - cold start number = 2, number of prewarmed container will be created = 
cold start number(2)/threshold(2) * increment(1) = 1

Review comment:
   I moved the prewarm.md's content to `actions.md`.
   Regarding `Isn't threshold 1 in the above example?`
   I changed like below
   ```
"stemCells": [
{
   "initialCount": 2,
"memory": "256 MB",
"reactive": {
"minCount": 1,
"maxCount": 4,
"ttl": "2 minutes",
"threshold": 2,   # here, changed from 1 to 2, need to keep the 
same.
"increment": 1
}
]
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5074: [New Scheduler] Manage container creation

2021-05-06 Thread GitBox


codecov-commenter edited a comment on pull request #5074:
URL: https://github.com/apache/openwhisk/pull/5074#issuecomment-834018480


   # 
[Codecov](https://codecov.io/gh/apache/openwhisk/pull/5074?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#5074](https://codecov.io/gh/apache/openwhisk/pull/5074?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (f8baf7a) into 
[master](https://codecov.io/gh/apache/openwhisk/commit/aa7e6e2af196ac017ae4b9ea36656bec868a9931?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (aa7e6e2) will **decrease** coverage by `4.33%`.
   > The diff coverage is `74.22%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/openwhisk/pull/5074/graphs/tree.svg?width=650=150=pr=l0YmsiSAso_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/openwhisk/pull/5074?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#5074  +/-   ##
   ==
   - Coverage   78.82%   74.49%   -4.34% 
   ==
 Files 213  217   +4 
 Lines   1046610774 +308 
 Branches  440  462  +22 
   ==
   - Hits 8250 8026 -224 
   - Misses   2216 2748 +532 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/openwhisk/pull/5074?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[.../apache/openwhisk/core/controller/Controller.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udHJvbGxlci9Db250cm9sbGVyLnNjYWxh)
 | `55.66% <ø> (ø)` | |
   | 
[...enwhisk/core/loadBalancer/InvokerSupervision.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbG9hZEJhbGFuY2VyL0ludm9rZXJTdXBlcnZpc2lvbi5zY2FsYQ==)
 | `88.81% <ø> (-0.46%)` | :arrow_down: |
   | 
[...che/openwhisk/core/loadBalancer/LoadBalancer.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbG9hZEJhbGFuY2VyL0xvYWRCYWxhbmNlci5zY2FsYQ==)
 | `90.00% <ø> (+13.07%)` | :arrow_up: |
   | 
[...e/loadBalancer/ShardingContainerPoolBalancer.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbG9hZEJhbGFuY2VyL1NoYXJkaW5nQ29udGFpbmVyUG9vbEJhbGFuY2VyLnNjYWxh)
 | `80.79% <ø> (ø)` | |
   | 
[...k/core/containerpool/v2/InvokerHealthManager.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC92Mi9JbnZva2VySGVhbHRoTWFuYWdlci5zY2FsYQ==)
 | `75.00% <ø> (-0.38%)` | :arrow_down: |
   | 
[.../org/apache/openwhisk/core/connector/Message.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29ubmVjdG9yL01lc3NhZ2Uuc2NhbGE=)
 | `57.51% <23.63%> (-12.78%)` | :arrow_down: |
   | 
[.../main/scala/org/apache/openwhisk/core/WarmUp.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvV2FybVVwLnNjYWxh)
 | `64.28% <64.28%> (ø)` | |
   | 

[GitHub] [openwhisk] codecov-commenter commented on pull request #5074: [New Scheduler] Manage container creation

2021-05-06 Thread GitBox


codecov-commenter commented on pull request #5074:
URL: https://github.com/apache/openwhisk/pull/5074#issuecomment-834018480


   # 
[Codecov](https://codecov.io/gh/apache/openwhisk/pull/5074?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#5074](https://codecov.io/gh/apache/openwhisk/pull/5074?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (f8baf7a) into 
[master](https://codecov.io/gh/apache/openwhisk/commit/aa7e6e2af196ac017ae4b9ea36656bec868a9931?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (aa7e6e2) will **decrease** coverage by `46.64%`.
   > The diff coverage is `74.22%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/openwhisk/pull/5074/graphs/tree.svg?width=650=150=pr=l0YmsiSAso_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/openwhisk/pull/5074?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#5074   +/-   ##
   ===
   - Coverage   78.82%   32.17%   -46.65% 
   ===
 Files 213  217+4 
 Lines   1046610774  +308 
 Branches  440  462   +22 
   ===
   - Hits 8250 3467 -4783 
   - Misses   2216 7307 +5091 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/openwhisk/pull/5074?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[.../apache/openwhisk/core/controller/Controller.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udHJvbGxlci9Db250cm9sbGVyLnNjYWxh)
 | `0.00% <ø> (-55.67%)` | :arrow_down: |
   | 
[...enwhisk/core/loadBalancer/InvokerSupervision.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbG9hZEJhbGFuY2VyL0ludm9rZXJTdXBlcnZpc2lvbi5zY2FsYQ==)
 | `0.00% <ø> (-89.27%)` | :arrow_down: |
   | 
[...che/openwhisk/core/loadBalancer/LoadBalancer.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbG9hZEJhbGFuY2VyL0xvYWRCYWxhbmNlci5zY2FsYQ==)
 | `0.00% <ø> (-76.93%)` | :arrow_down: |
   | 
[...e/loadBalancer/ShardingContainerPoolBalancer.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9jb250cm9sbGVyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvbG9hZEJhbGFuY2VyL1NoYXJkaW5nQ29udGFpbmVyUG9vbEJhbGFuY2VyLnNjYWxh)
 | `0.00% <ø> (-80.80%)` | :arrow_down: |
   | 
[...k/core/containerpool/v2/InvokerHealthManager.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC92Mi9JbnZva2VySGVhbHRoTWFuYWdlci5zY2FsYQ==)
 | `75.00% <ø> (-0.38%)` | :arrow_down: |
   | 
[.../org/apache/openwhisk/core/connector/Message.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29ubmVjdG9yL01lc3NhZ2Uuc2NhbGE=)
 | `27.46% <23.63%> (-42.83%)` | :arrow_down: |
   | 
[.../main/scala/org/apache/openwhisk/core/WarmUp.scala](https://codecov.io/gh/apache/openwhisk/pull/5074/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvV2FybVVwLnNjYWxh)
 | `64.28% <64.28%> (ø)` | |
   | 

[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5102: [New Scheduler] Implement FunctionPullingContainerPool

2021-05-06 Thread GitBox


codecov-commenter edited a comment on pull request #5102:
URL: https://github.com/apache/openwhisk/pull/5102#issuecomment-828138461


   # 
[Codecov](https://codecov.io/gh/apache/openwhisk/pull/5102?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#5102](https://codecov.io/gh/apache/openwhisk/pull/5102?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (7a2aca4) into 
[master](https://codecov.io/gh/apache/openwhisk/commit/aa7e6e2af196ac017ae4b9ea36656bec868a9931?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (aa7e6e2) will **decrease** coverage by `4.05%`.
   > The diff coverage is `75.77%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/openwhisk/pull/5102/graphs/tree.svg?width=650=150=pr=l0YmsiSAso_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/openwhisk/pull/5102?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#5102  +/-   ##
   ==
   - Coverage   78.82%   74.77%   -4.06% 
   ==
 Files 213  214   +1 
 Lines   1046610913 +447 
 Branches  440  469  +29 
   ==
   - Hits 8250 8160  -90 
   - Misses   2216 2753 +537 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/openwhisk/pull/5102?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[...k/core/containerpool/v2/InvokerHealthManager.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC92Mi9JbnZva2VySGVhbHRoTWFuYWdlci5zY2FsYQ==)
 | `75.37% <ø> (ø)` | |
   | 
[.../org/apache/openwhisk/core/connector/Message.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29ubmVjdG9yL01lc3NhZ2Uuc2NhbGE=)
 | `63.21% <36.36%> (-7.08%)` | :arrow_down: |
   | 
[...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh)
 | `77.11% <50.00%> (-8.82%)` | :arrow_down: |
   | 
[...ontainerpool/v2/FunctionPullingContainerPool.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC92Mi9GdW5jdGlvblB1bGxpbmdDb250YWluZXJQb29sLnNjYWxh)
 | `80.53% <80.53%> (ø)` | |
   | 
[...penwhisk/core/containerpool/ContainerFactory.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJGYWN0b3J5LnNjYWxh)
 | `88.88% <100.00%> (+1.38%)` | :arrow_up: |
   | 
[...ala/org/apache/openwhisk/core/entity/DocInfo.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L0RvY0luZm8uc2NhbGE=)
 | `95.12% <100.00%> (+13.30%)` | :arrow_up: |
   | 
[.../scala/org/apache/openwhisk/core/entity/Size.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L1NpemUuc2NhbGE=)
 | `79.10% <100.00%> (ø)` | |
   | 

[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5102: [New Scheduler] Implement FunctionPullingContainerPool

2021-05-06 Thread GitBox


codecov-commenter edited a comment on pull request #5102:
URL: https://github.com/apache/openwhisk/pull/5102#issuecomment-828138461


   # 
[Codecov](https://codecov.io/gh/apache/openwhisk/pull/5102?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#5102](https://codecov.io/gh/apache/openwhisk/pull/5102?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (7a2aca4) into 
[master](https://codecov.io/gh/apache/openwhisk/commit/aa7e6e2af196ac017ae4b9ea36656bec868a9931?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (aa7e6e2) will **decrease** coverage by `4.46%`.
   > The diff coverage is `75.77%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/openwhisk/pull/5102/graphs/tree.svg?width=650=150=pr=l0YmsiSAso_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/openwhisk/pull/5102?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@Coverage Diff @@
   ##   master#5102  +/-   ##
   ==
   - Coverage   78.82%   74.36%   -4.47% 
   ==
 Files 213  214   +1 
 Lines   1046610913 +447 
 Branches  440  469  +29 
   ==
   - Hits 8250 8115 -135 
   - Misses   2216 2798 +582 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/openwhisk/pull/5102?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[...k/core/containerpool/v2/InvokerHealthManager.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC92Mi9JbnZva2VySGVhbHRoTWFuYWdlci5zY2FsYQ==)
 | `75.37% <ø> (ø)` | |
   | 
[.../org/apache/openwhisk/core/connector/Message.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29ubmVjdG9yL01lc3NhZ2Uuc2NhbGE=)
 | `60.62% <36.36%> (-9.67%)` | :arrow_down: |
   | 
[...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh)
 | `77.11% <50.00%> (-8.82%)` | :arrow_down: |
   | 
[...ontainerpool/v2/FunctionPullingContainerPool.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC92Mi9GdW5jdGlvblB1bGxpbmdDb250YWluZXJQb29sLnNjYWxh)
 | `80.53% <80.53%> (ø)` | |
   | 
[...penwhisk/core/containerpool/ContainerFactory.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJGYWN0b3J5LnNjYWxh)
 | `88.88% <100.00%> (+1.38%)` | :arrow_up: |
   | 
[...ala/org/apache/openwhisk/core/entity/DocInfo.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L0RvY0luZm8uc2NhbGE=)
 | `95.12% <100.00%> (+13.30%)` | :arrow_up: |
   | 
[.../scala/org/apache/openwhisk/core/entity/Size.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L1NpemUuc2NhbGE=)
 | `79.10% <100.00%> (ø)` | |
   | 

[GitHub] [openwhisk] codecov-commenter edited a comment on pull request #5102: [New Scheduler] Implement FunctionPullingContainerPool

2021-05-06 Thread GitBox


codecov-commenter edited a comment on pull request #5102:
URL: https://github.com/apache/openwhisk/pull/5102#issuecomment-828138461


   # 
[Codecov](https://codecov.io/gh/apache/openwhisk/pull/5102?src=pr=h1_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#5102](https://codecov.io/gh/apache/openwhisk/pull/5102?src=pr=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (7a2aca4) into 
[master](https://codecov.io/gh/apache/openwhisk/commit/aa7e6e2af196ac017ae4b9ea36656bec868a9931?el=desc_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 (aa7e6e2) will **decrease** coverage by `46.42%`.
   > The diff coverage is `74.66%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/openwhisk/pull/5102/graphs/tree.svg?width=650=150=pr=l0YmsiSAso_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/openwhisk/pull/5102?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
   
   ```diff
   @@ Coverage Diff @@
   ##   master#5102   +/-   ##
   ===
   - Coverage   78.82%   32.40%   -46.43% 
   ===
 Files 213  214+1 
 Lines   1046610913  +447 
 Branches  440  469   +29 
   ===
   - Hits 8250 3536 -4714 
   - Misses   2216 7377 +5161 
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/openwhisk/pull/5102?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[...k/core/containerpool/v2/InvokerHealthManager.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC92Mi9JbnZva2VySGVhbHRoTWFuYWdlci5zY2FsYQ==)
 | `75.37% <ø> (ø)` | |
   | 
[...e/openwhisk/core/containerpool/ContainerPool.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJQb29sLnNjYWxh)
 | `53.72% <16.66%> (-42.69%)` | :arrow_down: |
   | 
[.../org/apache/openwhisk/core/connector/Message.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29ubmVjdG9yL01lc3NhZ2Uuc2NhbGE=)
 | `30.05% <36.36%> (-40.24%)` | :arrow_down: |
   | 
[...in/scala/org/apache/openwhisk/common/Logging.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvbW1vbi9Mb2dnaW5nLnNjYWxh)
 | `70.64% <50.00%> (-15.29%)` | :arrow_down: |
   | 
[...ontainerpool/v2/FunctionPullingContainerPool.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29yZS9pbnZva2VyL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC92Mi9GdW5jdGlvblB1bGxpbmdDb250YWluZXJQb29sLnNjYWxh)
 | `80.53% <80.53%> (ø)` | |
   | 
[...penwhisk/core/containerpool/ContainerFactory.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvY29udGFpbmVycG9vbC9Db250YWluZXJGYWN0b3J5LnNjYWxh)
 | `83.33% <100.00%> (-4.17%)` | :arrow_down: |
   | 
[...ala/org/apache/openwhisk/core/entity/DocInfo.scala](https://codecov.io/gh/apache/openwhisk/pull/5102/diff?src=pr=tree_medium=referral_source=github_content=comment_campaign=pr+comments_term=The+Apache+Software+Foundation#diff-Y29tbW9uL3NjYWxhL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvb3BlbndoaXNrL2NvcmUvZW50aXR5L0RvY0luZm8uc2NhbGE=)
 | `82.92% <100.00%> (+1.10%)` | :arrow_up: |
   | 

[GitHub] [openwhisk] ningyougang commented on a change in pull request #5102: [New Scheduler] Implement FunctionPullingContainerPool

2021-05-06 Thread GitBox


ningyougang commented on a change in pull request #5102:
URL: https://github.com/apache/openwhisk/pull/5102#discussion_r622878434



##
File path: 
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/v2/FunctionPullingContainerPool.scala
##
@@ -0,0 +1,857 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.containerpool.v2
+
+import java.util.concurrent.atomic.AtomicInteger
+
+import akka.actor.{Actor, ActorRef, ActorRefFactory, Cancellable, Props}
+import org.apache.kafka.clients.producer.RecordMetadata
+import org.apache.openwhisk.common._
+import org.apache.openwhisk.core.connector.ContainerCreationError._
+import org.apache.openwhisk.core.connector.{
+  ContainerCreationAckMessage,
+  ContainerCreationMessage,
+  ContainerDeletionMessage
+}
+import org.apache.openwhisk.core.containerpool.{
+  AdjustPrewarmedContainer,
+  BlackboxStartupError,
+  ColdStartKey,
+  ContainerPool,
+  ContainerPoolConfig,
+  ContainerRemoved,
+  PrewarmingConfig,
+  WhiskContainerStartupError
+}
+import org.apache.openwhisk.core.entity._
+import org.apache.openwhisk.core.entity.size._
+import org.apache.openwhisk.http.Messages
+
+import scala.annotation.tailrec
+import scala.collection.concurrent.TrieMap
+import scala.collection.immutable
+import scala.concurrent.Future
+import scala.concurrent.duration._
+import scala.util.{Random, Try}
+import scala.collection.immutable.Queue
+
+case class CreationContainer(creationMessage: ContainerCreationMessage, 
action: WhiskAction)
+case class DeletionContainer(deletionMessage: ContainerDeletionMessage)
+case object Remove
+case class Keep(timeout: FiniteDuration)
+case class PrewarmContainer(maxConcurrent: Int)
+
+/**
+ * A pool managing containers to run actions on.
+ *
+ * This pool fulfills the other half of the ContainerProxy contract. Only
+ * one job (either Start or Run) is sent to a child-actor at any given
+ * time. The pool then waits for a response of that container, indicating
+ * the container is done with the job. Only then will the pool send another
+ * request to that container.
+ *
+ * Upon actor creation, the pool will start to prewarm containers according
+ * to the provided prewarmConfig, iff set. Those containers will **not** be
+ * part of the poolsize calculation, which is capped by the poolSize parameter.
+ * Prewarm containers are only used, if they have matching arguments
+ * (kind, memory) and there is space in the pool.
+ *
+ * @param childFactory method to create new container proxy actor
+ * @param prewarmConfig optional settings for container prewarming
+ * @param poolConfig config for the ContainerPool
+ */
+class FunctionPullingContainerPool(
+  childFactory: ActorRefFactory => ActorRef,
+  invokerHealthService: ActorRef,
+  poolConfig: ContainerPoolConfig,
+  instance: InvokerInstanceId,
+  prewarmConfig: List[PrewarmingConfig] = List.empty,
+  sendAckToScheduler: (SchedulerInstanceId, ContainerCreationAckMessage) => 
Future[RecordMetadata])(
+  implicit val logging: Logging)
+extends Actor {
+  import ContainerPoolV2.memoryConsumptionOf
+
+  implicit val ec = context.system.dispatcher
+
+  private var busyPool = immutable.Map.empty[ActorRef, Data]
+  private var inProgressPool = immutable.Map.empty[ActorRef, Data]
+  private var warmedPool = immutable.Map.empty[ActorRef, WarmData]
+  private var prewarmedPool = immutable.Map.empty[ActorRef, PreWarmData]
+  private var prewarmStartingPool = immutable.Map.empty[ActorRef, (String, 
ByteSize)]
+
+  private var shuttingDown = false
+
+  private val creationMessages = TrieMap[ActorRef, ContainerCreationMessage]()
+
+  private var preWarmScheduler: Option[Cancellable] = None
+  private var prewarmConfigQueue = Queue.empty[(CodeExec[_], ByteSize, 
Option[FiniteDuration])]
+  private val prewarmCreateFailedCount = new AtomicInteger(0)

Review comment:
   This is for retry logic.
   
   Let's assume the max retry limit is `5`,
   * If 1th, 2th, 3th creation prewarm failed, but the 4th creation prewarm 
success, the prewarmCreateFailedCount would be reset to 0. (the count would be 
reinitialized when creation is succeeded at any time.)
   * If 1th, 2th, 3th, 4th, 5th creation 

[GitHub] [openwhisk] ningyougang commented on a change in pull request #5102: [New Scheduler] Implement FunctionPullingContainerPool

2021-05-06 Thread GitBox


ningyougang commented on a change in pull request #5102:
URL: https://github.com/apache/openwhisk/pull/5102#discussion_r627863269



##
File path: core/invoker/src/main/resources/application.conf
##
@@ -60,9 +60,13 @@ whisk {
 user-memory: 1024 m
 concurrent-peek-factor: 0.5 #factor used to limit message peeking: 0 < 
factor <= 1.0 - larger number improves concurrent processing, but increases 
risk of message loss during invoker crash
 akka-client:  false # if true, use PoolingContainerClient for HTTP from 
invoker to action container (otherwise use ApacheBlockingContainerClient)
-prewarm-expiration-check-interval: 1 minute # period to check for prewarm 
expiration
+prewarm-expiration-check-init-delay: 10 minute # the init delay time for 
the first check
+prewarm-expiration-check-interval: 10 minute # period to check for prewarm 
expiration
 prewarm-expiration-check-interval-variance: 10 seconds # varies expiration 
across invokers to avoid many concurrent expirations
 prewarm-expiration-limit: 100 # number of prewarms to expire in one 
expiration cycle (remaining expired will be considered for expiration in next 
cycle)
+prewarm-max-retry-limit: 5 # max retry limit for create prewarm
+prewarm-promotion: false # if true, action can take prewarm container 
which has bigger memory

Review comment:
   Yes, but for `prewarm-promotion`, is used in 
FunctionPullingContainerPool only, and the configuration is `false` which mean, 
didn't take prewarm container which has bigger memory




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [openwhisk] ningyougang commented on a change in pull request #5102: [New Scheduler] Implement FunctionPullingContainerPool

2021-05-06 Thread GitBox


ningyougang commented on a change in pull request #5102:
URL: https://github.com/apache/openwhisk/pull/5102#discussion_r627862698



##
File path: core/invoker/src/main/resources/application.conf
##
@@ -60,9 +60,13 @@ whisk {
 user-memory: 1024 m
 concurrent-peek-factor: 0.5 #factor used to limit message peeking: 0 < 
factor <= 1.0 - larger number improves concurrent processing, but increases 
risk of message loss during invoker crash
 akka-client:  false # if true, use PoolingContainerClient for HTTP from 
invoker to action container (otherwise use ApacheBlockingContainerClient)
-prewarm-expiration-check-interval: 1 minute # period to check for prewarm 
expiration
+prewarm-expiration-check-init-delay: 10 minute # the init delay time for 
the first check
+prewarm-expiration-check-interval: 10 minute # period to check for prewarm 
expiration
 prewarm-expiration-check-interval-variance: 10 seconds # varies expiration 
across invokers to avoid many concurrent expirations
 prewarm-expiration-limit: 100 # number of prewarms to expire in one 
expiration cycle (remaining expired will be considered for expiration in next 
cycle)
+prewarm-max-retry-limit: 5 # max retry limit for create prewarm

Review comment:
   Already changed the comment to `max subsequent retry limit to create 
prewarm containers`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [openwhisk] bdoyle0182 commented on pull request #5065: Upgrade to Akka 2.6.12

2021-05-06 Thread GitBox


bdoyle0182 commented on pull request #5065:
URL: https://github.com/apache/openwhisk/pull/5065#issuecomment-833800326


   @vrann 
   
   1. If you're upgrading to akka 2.6, you first need to upgrade to akka 
2.6.2-2.6.4 to perform a rolling restart upgrade for cluster remoting 
serialization otherwise you need to do a new cluster to go directly to 2.6.5 or 
later. This is independent of the artery change from classic remoting. The 
artery stuff shouldn't be blocking we can upgrade that once we're on 2.6. You 
can then upgrade to latest patch version from there. Explained here:
   "Rolling updates are possible without shutting down all nodes of the Akka 
Cluster, but will require configuration adjustments as described in the 
Remoting section of this migration guide. Due to the changed serialization of 
the Cluster messages in Akka 2.6.2 a rolling update from 2.5.x must first be 
made to Akka 2.6.2 and then a second rolling update can change to Akka 2.6.3 or 
later."
   
https://doc.akka.io/docs/akka/current/project/rolling-update.html#2-6-2-clustermessageserializer-manifests-change
   2. However, there is an infinite loop tls bug in earlier versions of akka 
2.6 that would crash our service. So we should have a commit for 2.6.2-2.6.4 
and a commit with latest so people can immediately upgrade to latest once 
they've done the rolling restart to 2.6.2.
   3. There's a new automatic passivation feature that runs by default that has 
caused us trouble where an fsm is stopped if it doesn't receive a message after 
some time. This caused us some problems so we had to update the config so the 
timeout was large enough it would never passivate. However, I think openwhisk 
does not use cluster sharding anywhere for its fsm's so I don't think we have 
to worry about this


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [openwhisk] style95 commented on a change in pull request #5102: [New Scheduler] Implement FunctionPullingContainerPool

2021-05-06 Thread GitBox


style95 commented on a change in pull request #5102:
URL: https://github.com/apache/openwhisk/pull/5102#discussion_r627261946



##
File path: core/invoker/src/main/resources/application.conf
##
@@ -60,9 +60,13 @@ whisk {
 user-memory: 1024 m
 concurrent-peek-factor: 0.5 #factor used to limit message peeking: 0 < 
factor <= 1.0 - larger number improves concurrent processing, but increases 
risk of message loss during invoker crash
 akka-client:  false # if true, use PoolingContainerClient for HTTP from 
invoker to action container (otherwise use ApacheBlockingContainerClient)
-prewarm-expiration-check-interval: 1 minute # period to check for prewarm 
expiration
+prewarm-expiration-check-init-delay: 10 minute # the init delay time for 
the first check
+prewarm-expiration-check-interval: 10 minute # period to check for prewarm 
expiration
 prewarm-expiration-check-interval-variance: 10 seconds # varies expiration 
across invokers to avoid many concurrent expirations
 prewarm-expiration-limit: 100 # number of prewarms to expire in one 
expiration cycle (remaining expired will be considered for expiration in next 
cycle)
+prewarm-max-retry-limit: 5 # max retry limit for create prewarm
+prewarm-promotion: false # if true, action can take prewarm container 
which has bigger memory

Review comment:
   Are these following two configurations used?

##
File path: 
core/invoker/src/main/scala/org/apache/openwhisk/core/containerpool/v2/FunctionPullingContainerPool.scala
##
@@ -0,0 +1,866 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.openwhisk.core.containerpool.v2
+
+import akka.actor.{Actor, ActorRef, ActorRefFactory, Cancellable, Props}
+import org.apache.kafka.clients.producer.RecordMetadata
+import org.apache.openwhisk.common._
+import org.apache.openwhisk.core.connector.ContainerCreationError._
+import org.apache.openwhisk.core.connector.{
+  ContainerCreationAckMessage,
+  ContainerCreationMessage,
+  ContainerDeletionMessage
+}
+import org.apache.openwhisk.core.containerpool.{
+  AdjustPrewarmedContainer,
+  BlackboxStartupError,
+  ColdStartKey,
+  ContainerPool,
+  ContainerPoolConfig,
+  ContainerRemoved,
+  PrewarmingConfig,
+  WhiskContainerStartupError
+}
+import org.apache.openwhisk.core.entity._
+import org.apache.openwhisk.core.entity.size._
+import org.apache.openwhisk.http.Messages
+
+import scala.annotation.tailrec
+import scala.collection.concurrent.TrieMap
+import scala.collection.immutable
+import scala.concurrent.Future
+import scala.concurrent.duration._
+import scala.util.{Random, Try}
+import scala.collection.immutable.Queue
+
+case class Creation(creationMessage: ContainerCreationMessage, action: 
WhiskAction)
+case class Deletion(deletionMessage: ContainerDeletionMessage)
+case object Remove
+case class Keep(timeout: FiniteDuration)
+case class PrewarmContainer(maxConcurrent: Int)
+
+/**
+ * A pool managing containers to run actions on.
+ *
+ * This pool fulfills the other half of the ContainerProxy contract. Only
+ * one job (either Start or Run) is sent to a child-actor at any given
+ * time. The pool then waits for a response of that container, indicating
+ * the container is done with the job. Only then will the pool send another
+ * request to that container.
+ *
+ * Upon actor creation, the pool will start to prewarm containers according
+ * to the provided prewarmConfig, iff set. Those containers will **not** be
+ * part of the poolsize calculation, which is capped by the poolSize parameter.
+ * Prewarm containers are only used, if they have matching arguments
+ * (kind, memory) and there is space in the pool.
+ *
+ * @param childFactory method to create new container proxy actor
+ * @param prewarmConfig optional settings for container prewarming
+ * @param poolConfig config for the ContainerPool
+ */
+class FunctionPullingContainerPool(
+  childFactory: ActorRefFactory => ActorRef,
+  invokerHealthService: ActorRef,
+  poolConfig: ContainerPoolConfig,
+  instance: InvokerInstanceId,
+  prewarmConfig: List[PrewarmingConfig] = List.empty,
+  sendAckToScheduler: (SchedulerInstanceId, ContainerCreationAckMessage) => 

[GitHub] [openwhisk] style95 commented on pull request #5074: [New Scheduler] Manage container creation

2021-05-06 Thread GitBox


style95 commented on pull request #5074:
URL: https://github.com/apache/openwhisk/pull/5074#issuecomment-833315470


   > I wrote a document: 
https://cwiki.apache.org/confluence/display/OPENWHISK/ContainerManager
   
   Can we add a section about warmup?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [openwhisk] KeonHee commented on pull request #5074: [New Scheduler] Manage container creation

2021-05-06 Thread GitBox


KeonHee commented on pull request #5074:
URL: https://github.com/apache/openwhisk/pull/5074#issuecomment-833307836


   I wrote a document: 
https://cwiki.apache.org/confluence/display/OPENWHISK/ContainerManager
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [openwhisk] Deklin edited a comment on pull request #4986: Implement action versioning

2021-05-06 Thread GitBox


Deklin edited a comment on pull request #4986:
URL: https://github.com/apache/openwhisk/pull/4986#issuecomment-833305103


   Just to add some comments to this.
   It would be beneficial to be able to run an action with a @version tag as 
specified
   
   e.g. /helloworld@1.0.0
   
   However it is also important that /helloworld and perhaps helloworld/@latest 
always run the latest published version. I believe other FAAS services like 
fission do versioning this way and it makes contractual binding from consumers 
much easier.
   
   I can either point to a specific version if I am in a strictly controlled 
environment, or can always point to @latest to get the latest published version 
of the code.
   
   --edit
   
   It does look like the design document handles this scenario in the invoker 
:) Thank you
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [openwhisk] Deklin commented on pull request #4986: Implement action versioning

2021-05-06 Thread GitBox


Deklin commented on pull request #4986:
URL: https://github.com/apache/openwhisk/pull/4986#issuecomment-833305103


   Just to add some comments to this.
   It would be beneficial to be able to run an action with a @version tag as 
specified
   
   e.g. /helloworld@1.0.0
   
   However it is also important that /helloworld and perhaps helloworld/@latest 
always run the latest published version. I believe other FAAS services like 
fission do versioning this way and it makes contractual binding from consumers 
much easier.
   
   I can either point to a specific version if I am in a strictly controlled 
environment, or can always point to @latest to get the latest published version 
of the code.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [openwhisk] style95 merged pull request #5062: Add prefix for topics

2021-05-06 Thread GitBox


style95 merged pull request #5062:
URL: https://github.com/apache/openwhisk/pull/5062


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org