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

[New Scheduler] Add a centralized watcher for etcd data #5069

Merged
merged 4 commits into from
Feb 25, 2021

Conversation

jiangpengcheng
Copy link
Contributor

@jiangpengcheng jiangpengcheng commented Feb 18, 2021

Description

The FPC scheduler will use etcd to store and share some data, and some components need to get noticed for some data when they are changed(inserted, updated or removed), this PR implements a centralized watcher for them, which will watch all changes on etcd and distribute them to subscribers

design document: https://cwiki.apache.org/confluence/display/OPENWHISK/WatcherService

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-io
Copy link

codecov-io commented Feb 18, 2021

Codecov Report

Merging #5069 (eb62d01) into master (4a13303) will decrease coverage by 53.36%.
The diff coverage is 89.58%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #5069       +/-   ##
===========================================
- Coverage   81.72%   28.36%   -53.37%     
===========================================
  Files         210      204        -6     
  Lines       10167     9950      -217     
  Branches      440      447        +7     
===========================================
- Hits         8309     2822     -5487     
- Misses       1858     7128     +5270     
Impacted Files Coverage Δ
...apache/openwhisk/core/service/WatcherService.scala 89.58% <89.58%> (ø)
.../main/scala/org/apache/openwhisk/utils/Retry.scala 0.00% <0.00%> (-100.00%) ⬇️
...n/scala/org/apache/openwhisk/utils/JsHelpers.scala 0.00% <0.00%> (-100.00%) ⬇️
...a/org/apache/openwhisk/common/ConfigMapValue.scala 0.00% <0.00%> (-100.00%) ⬇️
...g/apache/openwhisk/common/ResizableSemaphore.scala 0.00% <0.00%> (-100.00%) ⬇️
...pache/openwhisk/http/LenientSprayJsonSupport.scala 0.00% <0.00%> (-100.00%) ⬇️
.../apache/openwhisk/core/controller/Namespaces.scala 0.00% <0.00%> (-100.00%) ⬇️
...pache/openwhisk/core/controller/CorsSettings.scala 0.00% <0.00%> (-100.00%) ⬇️
...che/openwhisk/core/entitlement/RateThrottler.scala 0.00% <0.00%> (-100.00%) ⬇️
...he/openwhisk/core/entitlement/KindRestrictor.scala 0.00% <0.00%> (-100.00%) ⬇️
... and 155 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 4a13303...eb62d01. Read the comment docs.

Copy link
Member

@style95 style95 left a comment

Choose a reason for hiding this comment

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

This is given from #5063

isPrefix: Boolean,
name: String,
listenEvents: Set[EtcdEvent] = Set.empty)
case class UnWatchEndpoint(watchKey: String, isPrefix: Boolean, watchName: String, needFeedback: Boolean = false)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
case class UnWatchEndpoint(watchKey: String, isPrefix: Boolean, watchName: String, needFeedback: Boolean = false)
case class UnwatchEndpoint(watchKey: String, isPrefix: Boolean, watchName: String, needFeedback: Boolean = false)

@ningyougang
Copy link
Contributor

LGTM

@KeonHee
Copy link
Member

KeonHee commented Feb 22, 2021

Referring to review #5068 (review), you need to add org/apache/openwhisk/core/service/** to REQUIRE_SCHEDULER to run the test in CI .

@bdoyle0182
Copy link
Contributor

LGTM

@style95 style95 merged commit ed58b23 into apache:master Feb 25, 2021
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.

6 participants