Skip to content

Commit

Permalink
[@Azure/eventgrid] Fix the Push Issue with the PublishCloudEvents API (
Browse files Browse the repository at this point in the history
…#26307)

### Packages impacted by this PR
@Azure/eventgrid

### Issues associated with this PR
N/A

### Describe the problem that is addressed by this PR
In the EventGrid V2 Beta Version, we have an API called
`publishCloudEvents`. In this API, each of the event (from parameters)
must be converted and pushed to the `eventsWireModel` array. Now, while
pushing it, a wrong method is called on the array. Instead of calling
`push` method, `concat` method is called which causes the array to be
empty and causes issue. This PR changes the method to `push`.

Integration Test Cases have been added for each API in EventGrid Client.
The associated recordings have been added to the PR.

**Note: Since this is a Bug Fix release, I have updated the Version from
`4.13.0-beta.1` to `4.13.0-beta.2`.**

### 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?
The design is simple and straightforward. No special concern.

### Are there test cases added in this PR? _(If not, why?)_
Yes. The test cases have been added for each API of the EventGrid
client.

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

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

### Checklists
- [X] 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)_
- [X] Added a changelog (if necessary)

@ellismg @xirzec @jeremymeng  Please review and approve the PR.

@lmazuel FYI....
  • Loading branch information
sarangan12 authored Jun 23, 2023
1 parent 3cb426d commit 5a5295f
Show file tree
Hide file tree
Showing 19 changed files with 2,857 additions and 7 deletions.
6 changes: 6 additions & 0 deletions sdk/eventgrid/eventgrid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 4.13.0-beta.2 (2023-06-26)

### Bugs Fixed

- Fixed a bug with `publishCloudEvents` API. To add the elements to the array, `push` method should be called instead of `concat` method.

## 4.13.0-beta.1 (2023-05-22)

### Features Added
Expand Down
5 changes: 5 additions & 0 deletions sdk/eventgrid/eventgrid/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ module.exports = function (config) {
"EVENT_GRID_CLOUD_EVENT_SCHEMA_ENDPOINT",
"EVENT_GRID_CLOUD_EVENT_SCHEMA_API_KEY",
"RECORDINGS_RELATIVE_PATH",
"EVENT_GRID_V2_ENDPOINT",
"EVENT_GRID_V2_KEY",
"EVENT_SUBSCRIPTION_NAME",
"TOPIC_NAME",
"MAX_DELIVERY_COUNT",
],

// test results reporter to use
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventgrid/eventgrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sdk-type": "client",
"author": "Microsoft Corporation",
"description": "An isomorphic client library for the Azure Event Grid service.",
"version": "4.13.0-beta.1",
"version": "4.13.0-beta.2",
"keywords": [
"node",
"azure",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5a5295f

Please sign in to comment.