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

Event Grid Namespaces client (tracking) #20936

Closed
8 of 9 tasks
richardpark-msft opened this issue Jun 1, 2023 · 1 comment
Closed
8 of 9 tasks

Event Grid Namespaces client (tracking) #20936

richardpark-msft opened this issue Jun 1, 2023 · 1 comment
Assignees
Milestone

Comments

@richardpark-msft
Copy link
Member

richardpark-msft commented Jun 1, 2023

Just filing some of the issues that have come up when auto-generating an Event Grid client:

  • To accomodate the multitude of packages we're going to have for Event Grid
    we're going to move 'azeventgrid' to create space for a new package
    (Event Grid Namespaces) and to split out system events into their
    own package (azsystemevents). This also implies we'll have to create publishing pipelines for each of those areas.
  • Authentication header format is SharedAccessKey <shared key. I'm able to use a PerRetry policy to add this but we do need a credential type for this. It appears other libraries have defined a custom credential type for their individual packages.
  • PublishCloudEvents is supposed to set the Content-Type to application/cloudevents-batch+json; charset=utf-8, but instead just sets it to application/json.
  • Create a CloudEvent type into azcore, for use with messaging SDKs #20970
  • There are some fields in CloudEvent that have to be filled out but I'm not sure if there's intended to be a constraint or not, as other languages don't seem to require them all (and are probably filling them out with defaults). (Specversion, ID)
  • ClientPublishCloudEventsResponse an embedded field called Interface of type any:
    // ClientPublishCloudEventsResponse contains the response from method Client.PublishCloudEvents.
    type ClientPublishCloudEventsResponse struct {
      // Anything
      Interface any
    }
  • AcknowledgeCloudEvents has an argument that represents the lockTokens but the type is AcknowledgeOptions:
       AcknowledgeCloudEvents(ctx context.Context, 
         topicName string, 
         eventSubscriptionName string, 
         // <-- This parameter here --> 
         lockTokens AcknowledgeOptions, 
         options *ClientAcknowledgeCloudEventsOptions)
  • ReceiveCloudEvents has an explicit MaxWaitTime parameter. It's possible for us to say "we can just use the deadline of the context" but we might need some wiggle room, as the "timeout" in this case is actually a response from the service.
  • When receiving the CloudEvent the 'Data' field appears to be a base64 encoded version of the data, rather than just being whatever the data was (in my case, it was a string).
    --
    Note these all came out of the client generated from this rev of the swagger: link
@richardpark-msft richardpark-msft self-assigned this Jun 1, 2023
@richardpark-msft richardpark-msft added this to the 2024-02 milestone Jan 27, 2024
@richardpark-msft richardpark-msft changed the title Event Grid client (tracking) Event Grid Namespaces client (tracking) Jan 27, 2024
@RickWinter RickWinter modified the milestones: 2024-02, 2024-03 Mar 6, 2024
@richardpark-msft
Copy link
Member Author

Going to close this out as the one outstanding issue (supporting binary mode) is filed as it's own standalone issue (#22304)

@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants