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: pull-endpoint setting for async subscribers #1883

Merged
merged 2 commits into from
May 23, 2023
Merged

Conversation

meltsufin
Copy link
Member

Fixes: #1882.

subscriberStubSettings.setEndpoint(this.pullEndpoint);
} else {
applyGlobalPullEndpoint(subscriberStubSettings);
String endpoint =
Copy link
Member Author

Choose a reason for hiding this comment

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

Unrelated change for consistency sake, removing the need for applyGlobalPullEndpoint().

Comment on lines +387 to +388
.hasFieldOrPropertyWithValue("numPullers", 2)
.hasFieldOrPropertyWithValue("subStubSettings.endpoint", "test.endpoint");
Copy link
Contributor

Choose a reason for hiding this comment

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

It may also be worth covering this in our integration tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added and also found some unrelated bug accidentally.

@meltsufin meltsufin requested a review from mpeddada1 May 23, 2023 00:52
@sonarcloud
Copy link

sonarcloud bot commented May 23, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@@ -184,7 +184,7 @@ public FlowControl computeSubscriberFlowControlSettings(ProjectSubscriptionName
*/
public Integer computeParallelPullCount(String subscriptionName, String projectId) {
Integer parallelPullCount =
getSubscriptionProperties(ProjectSubscriptionName.of(projectId, subscriptionName))
getSubscriptionProperties(PubSubSubscriptionUtils.toProjectSubscriptionName(subscriptionName, projectId))
Copy link
Contributor

Choose a reason for hiding this comment

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

Great catch

Copy link
Contributor

@mpeddada1 mpeddada1 left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you for also fixing the bug with the subscription name!

@meltsufin meltsufin merged commit f0c5d4c into main May 23, 2023
28 checks passed
@meltsufin meltsufin deleted the pull-endpoint branch May 23, 2023 15:19
meltsufin added a commit that referenced this pull request May 23, 2023
* fix: pull-endpoint setting for async subscribers

* add integration test and fix fqn subscription usage

Fixes: #1882.
meltsufin added a commit that referenced this pull request May 23, 2023
…1892

* fix: pull-endpoint setting for async subscribers

* add integration test and fix fqn subscription usage

Fixes: #1882.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pull-endpoint setting not working for async subscribers
2 participants