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

Add ZOOKEEPER_HOSTS as an optional property #5435

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

style95
Copy link
Member

@style95 style95 commented Aug 14, 2023

Description

As ZOOKEEPER_HOSTS is removed from the required properties, it is no longer transformed into the whisk config from the environment variables.
But when the instance id assigned is used, the zookeeper host becomes a required property.
This change is to make it an optional property.

Related issue and scope

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 Aug 14, 2023

Codecov Report

Merging #5435 (731eb8b) into master (951ce58) will increase coverage by 18.08%.
The diff coverage is 50.00%.

❗ Current head 731eb8b differs from pull request most recent head a066119. Consider uploading reports for the commit a066119 to get more accurate results

@@             Coverage Diff             @@
##           master    #5435       +/-   ##
===========================================
+ Coverage   58.52%   76.60%   +18.08%     
===========================================
  Files         241      241               
  Lines       14632    14634        +2     
  Branches      616      607        -9     
===========================================
+ Hits         8563    11211     +2648     
+ Misses       6069     3423     -2646     
Files Changed Coverage Δ
...la/org/apache/openwhisk/core/invoker/Invoker.scala 71.60% <50.00%> (+1.98%) ⬆️

... and 135 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -186,7 +188,8 @@ object Invoker {

// --uniqueName is defined with a valid value, id is empty, assign an id via zookeeper
case CmdLineArgs(Some(unique), None, _, overwriteId) =>
if (config.zookeeperHosts.startsWith(":") || config.zookeeperHosts.endsWith(":")) {
if (config.zookeeperHosts.startsWith(":") || config.zookeeperHosts.endsWith(":") ||
config.zookeeperHosts.equals("")) {
Copy link
Member Author

Choose a reason for hiding this comment

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

It will make sure zookeeper hosts are configured when the ID assignor is used.

@style95
Copy link
Member Author

style95 commented Aug 16, 2023

Without this change, invokers with the ID assignor can not be deployed.

@style95 style95 requested a review from upgle August 17, 2023 00:53
@ningyougang
Copy link
Contributor

LGTM 👍

@style95 style95 merged commit 6375c96 into apache:master Sep 15, 2023
6 checks passed
mtt-merz pushed a commit to mtt-merz/openwhisk that referenced this pull request Oct 22, 2023
* Add ZOOKEEPER_HOSTS as an optional property

* Check if zookeeper hosts are empty

* Apply scalaFmt

(cherry picked from commit 6375c96)
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.

3 participants