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

fix when consul is used as a name resolution component problem #1793

Closed
wants to merge 25 commits into from
Closed

fix when consul is used as a name resolution component problem #1793

wants to merge 25 commits into from

Conversation

shiling02404
Copy link
Contributor

Description

In the absence of an id, different instances of the same service registered to consul will be overwritten.
So, new id is added to distinguish them.

Issue reference

#1513
#1199

@@ -243,13 +243,13 @@ func getRegistrationConfig(cfg configSpec, props map[string]string) (*consul.Age
} else if _, err := strconv.ParseUint(httpPort, 10, 0); err != nil {
return nil, fmt.Errorf("error parsing %s: %w", nr.DaprHTTPPort, err)
}

ID := appID + "-" + host + "-" + httpPort
Copy link
Member

Choose a reason for hiding this comment

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

lowercase id

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

ItalyPaleAle and others added 25 commits June 20, 2022 02:45
This commit is related to dapr/dapr#4624. As noted there, we have an issue in the runtime where all components are shut down after the grace period, when the app is likely already stopped. Because of that, certain input components (the subscribe part of pubsub and the input part of bindings - the latter not in scope of this PR), can continue bringing new work when it's known to fail.

In order to fix the issue linked above properly, we need to implement a way for PubSub components to have the "publish" part closed before the "subscribe" one (and in the future that will need to be done for input bindings too).

This commit achieves precisely that by adding a context in the Subscribe method. When that context is canceled (which can be at any time), the subscription is removed.

PS: This API change was implemented so it can one day be used for dapr/dapr#814 too, as it allows canceling individual subscriptions by using a different context. Although that's not possible today because it requires more work on the runtime, it does implement everything that's needed in the pubsub components already.
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
* Bumped dapr/dapr in cert tests

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Updated interface

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Added missing go.mod

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* More fixes

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Fix eventhubs not closing on context cancelation

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
Signed-off-by: Pravin Pushkar <ppushkar@microsoft.com>

Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
#1751)

* Updated sendgrid binding to add the option to add names for the to and from addresses. This commit relates to #1749

Signed-off-by: Adam Rahja <adam@resolve.com>

* Updated sendgrid binding from code suggestion.

Signed-off-by: Adam Rahja <adam@resolve.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
* Add redis certification test

Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>

* Adding Test Plan in ReadMe

Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>

* Adding redis state cert test to workflow

Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>

* Overwrite open telemetry dependency

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
* Add additional Event Hub topics for certification tests

Signed-off-by: GitHub <noreply@github.com>

* Apply EventHubs changes for pubsub and binding cert tests

Signed-off-by: GitHub <noreply@github.com>

* Remove partitions from EHs because we don't want to pay for premium

Signed-off-by: GitHub <noreply@github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
* Add postgresql certification test + connection idle time

Signed-off-by: yaron2 <schneider.yaron@live.com>

* change flow name

Signed-off-by: yaron2 <schneider.yaron@live.com>

* go mod tidy

Signed-off-by: yaron2 <schneider.yaron@live.com>

* add to workflow

Signed-off-by: yaron2 <schneider.yaron@live.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
* fix: dubbo binding enhancement

Signed-off-by: LaurenceLiZhixin <382673304@qq.com>

* fix: tidy all

Signed-off-by: LaurenceLiZhixin <382673304@qq.com>

* mod tidy

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Pin couchbaselabs/gojcbmock to commit with LICENSE

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* modtidy again

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* commit to retrigger tests

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
* Added `publishConfirm` option to RabbitMQ

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Changed to publisherConfirm per feedback

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
* Bump github.com/open-policy-agent/opa from 0.23.2 to 0.40.0

Bumps [github.com/open-policy-agent/opa](https://github.com/open-policy-agent/opa) from 0.23.2 to 0.40.0.
- [Release notes](https://github.com/open-policy-agent/opa/releases)
- [Changelog](https://github.com/open-policy-agent/opa/blob/main/CHANGELOG.md)
- [Commits](open-policy-agent/opa@v0.23.2...v0.40.0)

---
updated-dependencies:
- dependency-name: github.com/open-policy-agent/opa
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update go mods

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
* Make Service Bus attempt to reconnect forever in case of issues

With exponential back-off configurable between min and max time. Fixes #1612

Also includes fixes:

- Binding: make sure it actually retries to connect forever
- Binding: add delay (exponential backoff) before reconnecting
- PubSub: better handling of failures such as topics disabled or other non-connection issues

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* 💄

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Added warning for deprecated metadata options

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* 💄

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
… same time (#1750)

* Add metadata property to configure BatchingMaxSize&batchingMaxMessages in Pulsar
Signed-off-by: saberwang <saberwang@hotmail.com>

* sort field
Signed-off-by: saberwang <saberwang@hotmail.com>

* [pubsub]fix unit test bug
Signed-off-by: saberwang <saberwang@hotmail.com>

* remove unrelated changes
Signed-off-by: saberwang <saberwang@hotmail.com>

* Delete hard coded Metadata
Signed-off-by: saberwang <saberwang@hotmail.com>

* remove  .history

Signed-off-by: saberwang <saberwang@hotmail.com>

* restore .gitignore

Signed-off-by: saberwang <saberwang@hotmail.com>

* Hard coding default values and adding 'BatchingMaxPublishDelay' metadata

Signed-off-by: saberwang <saberwang@hotmail.com>

* fix code format

Signed-off-by: saberwang <saberwang@hotmail.com>

* formatting code

Signed-off-by: saberwang <saberwang@hotmail.com>

* [pubsub][rabbitmq]Add support for binding multiple routingkeys at the same time

Signed-off-by: saberwang <saberwang@hotmail.com>

* add TestSubscribeBindRoutingKeys

Signed-off-by: saberwang <saberwang@hotmail.com>

* fix: Infof to Debugf

Signed-off-by: saberwang <saberwang@hotmail.com>

* Update pubsub/rabbitmq/rabbitmq_test.go

Co-authored-by: Looong Dai <long.dai@intel.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
Signed-off-by: yaron2 <schneider.yaron@live.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
* middleware: add wasm basic

Signed-off-by: Loong <loong.dai@intel.com>

* Update middleware/http/wasm/basic/basic.go

* Update middleware/http/wasm/basic/basic.go

Co-authored-by: Taction <zchao9100@gmail.com>
Co-authored-by: Yaron Schneider <schneider.yaron@live.com>
Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
…#1784)

* add `Pinger` interface.

Signed-off-by: chanyong.moon <dev.chanyongmoon@gmail.com>

* Convert Ping fuction to optional

Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>

* Removing unrequired Ping implementations

Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>

* Addressing comments

Signed-off-by: Deepanshu Agarwal <deepanshu.agarwal1984@gmail.com>

Co-authored-by: chanyong.moon <dev.chanyongmoon@gmail.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
Signed-off-by: Christian Kaps <ck-github@mohiva.com>

Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
Signed-off-by: yaron2 <schneider.yaron@live.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
…mosDB Table API support (#1792)

* Upgrade to Azure Table Storage Track 2 SDK in State Store

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* make modtidy-all

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* don't panic

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* fix error parsing

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Adds support for empty rowKeys again

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Pin aztables v1.0.1

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Add support for Cosmos DB Table API

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Add Azure Table Storage CosmosDB conformance test

Signed-off-by: GitHub <noreply@github.com>

* Address code review

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Create Table Storage State store subtests

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Address linter issue

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* context instead of ctx

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* load state store in conf tests

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* use cosmosDB mode in cosmosDB test

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Add Azure AD support for Table Storage

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* remove shadow declaration

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* make accountKey optional

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* Add options to skip table creation

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
… and pubsub (#1791)

* Moved ASB subscription code to a shared package

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Moved ASBQ binding to use the shared ASB implementation

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>

* Updating Azure Service Bus SDK version

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
* update imports for Fossa and Certification test

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>

* modtidy

Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Signed-off-by: wisdom 郭智勇 <guozy66@cn.midea.com>
@codecov
Copy link

codecov bot commented Jun 20, 2022

Codecov Report

Merging #1793 (1cdda68) into master (4322a22) will increase coverage by 0.26%.
The diff coverage is 23.34%.

@@            Coverage Diff             @@
##           master    #1793      +/-   ##
==========================================
+ Coverage   36.59%   36.86%   +0.26%     
==========================================
  Files         177      179       +2     
  Lines       16222    16264      +42     
==========================================
+ Hits         5937     5995      +58     
+ Misses       9617     9576      -41     
- Partials      668      693      +25     
Impacted Files Coverage Δ
authentication/azure/auth.go 38.12% <0.00%> (ø)
...indings/azure/servicebusqueues/servicebusqueues.go 2.02% <0.00%> (-8.67%) ⬇️
bindings/redis/redis.go 18.18% <0.00%> (-2.88%) ⬇️
bindings/zeebe/client.go 27.27% <ø> (ø)
bindings/zeebe/command/command.go 87.50% <ø> (ø)
bindings/zeebe/command/complete_job.go 64.70% <ø> (ø)
bindings/zeebe/command/create_instance.go 77.77% <ø> (ø)
bindings/zeebe/command/update_job_retries.go 71.42% <ø> (ø)
bindings/zeebe/jobworker/jobworker.go 11.34% <ø> (ø)
pubsub/azure/servicebus/message.go 48.10% <0.00%> (+1.75%) ⬆️
... and 32 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 55888c0...1cdda68. Read the comment docs.

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.

None yet