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

[web-pubsub-client] isDuplicated always returned as true in WebPubSubClient #24901

Closed
om-ha opened this issue Feb 17, 2023 · 1 comment
Closed
Assignees
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team WebPubSub

Comments

@om-ha
Copy link

om-ha commented Feb 17, 2023

Making a PR out of this.

Current Incorrect Code:

if (message.success || (message.error && message.error.name === "Duplicate")) {
  entity.resolve({ ackId: message.ackId, isDuplicated: true } as WebPubSubResult);
} 

Fixed Code:

const isDuplicated: boolean =
  message.error != null && message.error.name === 'Duplicate';
if (message.success || isDuplicated) {
  entity.resolve({
    ackId: message.ackId,
    isDuplicated: isDuplicated,
  } as WebPubSubResult);
}

Source:

entity.resolve({ ackId: message.ackId, isDuplicated: true } as WebPubSubResult);

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 17, 2023
@om-ha om-ha changed the title [web-pubsub-client] isDuplicated always returned as true [web-pubsub-client] isDuplicated always returned as true in WebPubSubClient Feb 17, 2023
@om-ha om-ha changed the title [web-pubsub-client] isDuplicated always returned as true in WebPubSubClient [web-pubsub-client] isDuplicated always returned as true in WebPubSubClient Feb 17, 2023
om-ha added a commit to om-ha/azure-sdk-for-js that referenced this issue Feb 17, 2023
@xirzec xirzec added Client This issue points to a problem in the data-plane of the library. WebPubSub labels Feb 17, 2023
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 17, 2023
ghost pushed a commit that referenced this issue Mar 27, 2023
### Packages impacted by this PR
@azure/web-pubsub-client

### Issues associated with this PR
#24901
#24902 try to fix this issue but blocked by format. 

### Describe the problem that is addressed by this PR
`IsDuplicated` always return true in WebPubSubResult.

### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?


### Are there test cases added in this PR? _(If not, why?)_


### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_

### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_
- [ ] Added a changelog (if necessary)
@xirzec xirzec added bug This issue requires a change to an existing behavior in the product in order to be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Mar 30, 2023
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Mar 30, 2023
@xirzec
Copy link
Member

xirzec commented Mar 30, 2023

Fix appears to already have been merged

@xirzec xirzec closed this as completed Mar 30, 2023
ghost pushed a commit that referenced this issue Apr 10, 2023
### Packages impacted by this PR
@azure/web-pubsub-client

### Issues associated with this PR
#24901

### Describe the problem that is addressed by this PR


### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?


### Are there test cases added in this PR? _(If not, why?)_


### Provide a list of related PRs _(if any)_


### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_

### Checklists
- [ ] Added impacted package name to the issue description
- [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_
- [ ] Added a changelog (if necessary)
@github-actions github-actions bot locked and limited conversation to collaborators Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team WebPubSub
Projects
None yet
Development

No branches or pull requests

3 participants