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

AvroEventFormatter in incorrect namespace #219

Closed
squanbeck opened this issue Jun 29, 2022 · 2 comments · Fixed by #220 or #237
Closed

AvroEventFormatter in incorrect namespace #219

squanbeck opened this issue Jun 29, 2022 · 2 comments · Fixed by #220 or #237
Assignees
Labels
bug Something isn't working

Comments

@squanbeck
Copy link

AvroEventFormatter is currently found in the CloudNative.CloudEvents namespace.

using System.Net.Mime;
namespace CloudNative.CloudEvents
{
/// <summary>

To keep things consistent, as with both protobuf and json (first two other examples I looked at), the AvroEventFormatter should be found in CloudNative.CloudEvents.Avro namespace.

Reference to SystemTextJson and Protobuf EventFormatters below.

using static CloudNative.CloudEvents.V1.CloudEvent.Types.CloudEventAttributeValue;
namespace CloudNative.CloudEvents.Protobuf
{
// TODO: Derived type which expects to only receive protobuf message data with a particular message type,

using System.Threading.Tasks;
namespace CloudNative.CloudEvents.SystemTextJson
{
/// <summary>

@jskeet
Copy link
Contributor

jskeet commented Jun 29, 2022

Humbug. Yes, that absolutely should be in the CloudNative.CloudEvents.Avro namespace.

Unfortunately we can't remove it now without taking a new major version (at least for that package).

I suggest I make the existing formatter obsolete (but keep it as-is), and create a new copy in the right namespace. The old one won't get any new features etc.

Does that sound appropriate to you?

(I'll double check the rest at the same time...)

@jskeet jskeet self-assigned this Jun 29, 2022
@jskeet jskeet added the bug Something isn't working label Jun 29, 2022
@squanbeck
Copy link
Author

I was wondering if that might be the case. As far as I am concerned, that sounds perfectly appropriate. At this point, I was just beginning to look into CloudEvents, and so I don't have any current code that depends on this. I only found it due to some first looks at serializing/deserializing CloudEvents using the provided formatters. Thanks for the quick response!

jskeet added a commit to jskeet/sdk-csharp that referenced this issue Jul 1, 2022
We still need it in CloudNative.CloudEvents for backward
compatibility, but we can do that via derivation - which is
pleasantly simple given that the only constructor is parameterless.

Users should update to use the CloudNative.CloudEvents.Avro
namespace at their earliest convenience.

Fixes cloudevents#219.

Signed-off-by: Jon Skeet <jonskeet@google.com>
jskeet added a commit that referenced this issue Jul 26, 2022
We still need it in CloudNative.CloudEvents for backward
compatibility, but we can do that via derivation - which is
pleasantly simple given that the only constructor is parameterless.

Users should update to use the CloudNative.CloudEvents.Avro
namespace at their earliest convenience.

Fixes #219.

Signed-off-by: Jon Skeet <jonskeet@google.com>
jskeet added a commit to jskeet/sdk-csharp that referenced this issue Sep 8, 2022
Changes since 2.3.1:

- Feature: Implement underscore prefixes for AMQP (see history) ([cloudevents#236](cloudevents#236)
- Feature: Allow empty payloads in Kafka ([cloudevents#224](cloudevents#224))
- Feature: Implement conversions to and from JObject/JsonElement in JsonEventFormatter ([cloudevents#234](cloudevents#234), part of [cloudevents#231](cloudevents#231))
- Bug fix: Observe JSON serializer options in JsonEventFormat ([cloudevents#226](cloudevents#226), fixes [cloudevents#225](cloudevents#225))
- Bug fix: Put AvroEventFormatter in the right namespace ([cloudevents#220](cloudevents#220), fixes [cloudevents#219](cloudevents#219))
- Bug fix: Use content headers when parsing HTTP requests/responses ([cloudevents#222](cloudevents#222), fixes [cloudevents#221](cloudevents#221))
- Bug fix: Perform release builds with ContinuousIntegrationBuild=true ([cloudevents#223](cloudevents#223), fixes [cloudevents#175](cloudevents#175))

Signed-off-by: Jon Skeet <jonskeet@google.com>
@jskeet jskeet mentioned this issue Sep 8, 2022
jskeet added a commit to jskeet/sdk-csharp that referenced this issue Sep 8, 2022
Changes since 2.3.1:

- Feature: Implement underscore prefixes for AMQP (see history) ([cloudevents#236](cloudevents#236)
- Feature: Allow empty payloads in Kafka ([cloudevents#224](cloudevents#224))
- Feature: Implement conversions to and from JObject/JsonElement in JsonEventFormatter ([cloudevents#234](cloudevents#234), part of [cloudevents#231](cloudevents#231))
- Bug fix: Observe JSON serializer options in JsonEventFormat ([cloudevents#226](cloudevents#226), fixes [cloudevents#225](cloudevents#225))
- Bug fix: Put AvroEventFormatter in the right namespace ([cloudevents#220](cloudevents#220), fixes [cloudevents#219](cloudevents#219))
- Bug fix: Use content headers when parsing HTTP requests/responses ([cloudevents#222](cloudevents#222), fixes [cloudevents#221](cloudevents#221))
- Bug fix: Perform release builds with ContinuousIntegrationBuild=true ([cloudevents#223](cloudevents#223), fixes [cloudevents#175](cloudevents#175))

Signed-off-by: Jon Skeet <jonskeet@google.com>
jskeet added a commit to jskeet/sdk-csharp that referenced this issue Sep 8, 2022
Changes since 2.3.1:

- Feature: Implement underscore prefixes for AMQP (see history) ([cloudevents#236](cloudevents#236)
- Feature: Allow empty payloads in Kafka ([cloudevents#224](cloudevents#224))
- Feature: Implement conversions to and from JObject/JsonElement in JsonEventFormatter ([cloudevents#234](cloudevents#234), part of [cloudevents#231](cloudevents#231))
- Bug fix: Observe JSON serializer options in JsonEventFormat ([cloudevents#226](cloudevents#226), fixes [cloudevents#225](cloudevents#225))
- Bug fix: Put AvroEventFormatter in the right namespace ([cloudevents#220](cloudevents#220), fixes [cloudevents#219](cloudevents#219))
- Bug fix: Use content headers when parsing HTTP requests/responses ([cloudevents#222](cloudevents#222), fixes [cloudevents#221](cloudevents#221))
- Bug fix: Perform release builds with ContinuousIntegrationBuild=true ([cloudevents#223](cloudevents#223), fixes [cloudevents#175](cloudevents#175))

Signed-off-by: Jon Skeet <jonskeet@google.com>
jskeet added a commit to jskeet/sdk-csharp that referenced this issue Sep 8, 2022
Changes since 2.3.1:

- Feature: Implement underscore prefixes for AMQP (see history) ([cloudevents#236](cloudevents#236))
- Feature: Allow empty payloads in Kafka ([cloudevents#224](cloudevents#224))
- Feature: Implement conversions to and from JObject/JsonElement in JsonEventFormatter ([cloudevents#234](cloudevents#234), part of [cloudevents#231](cloudevents#231))
- Bug fix: Observe JSON serializer options in JsonEventFormat ([cloudevents#226](cloudevents#226), fixes [cloudevents#225](cloudevents#225))
- Bug fix: Put AvroEventFormatter in the right namespace ([cloudevents#220](cloudevents#220), fixes [cloudevents#219](cloudevents#219))
- Bug fix: Use content headers when parsing HTTP requests/responses ([cloudevents#222](cloudevents#222), fixes [cloudevents#221](cloudevents#221))
- Bug fix: Perform release builds with ContinuousIntegrationBuild=true ([cloudevents#223](cloudevents#223), fixes [cloudevents#175](cloudevents#175))

Signed-off-by: Jon Skeet <jonskeet@google.com>
jskeet added a commit that referenced this issue Sep 8, 2022
Changes since 2.3.1:

- Feature: Implement underscore prefixes for AMQP (see history) ([#236](#236))
- Feature: Allow empty payloads in Kafka ([#224](#224))
- Feature: Implement conversions to and from JObject/JsonElement in JsonEventFormatter ([#234](#234), part of [#231](#231))
- Bug fix: Observe JSON serializer options in JsonEventFormat ([#226](#226), fixes [#225](#225))
- Bug fix: Put AvroEventFormatter in the right namespace ([#220](#220), fixes [#219](#219))
- Bug fix: Use content headers when parsing HTTP requests/responses ([#222](#222), fixes [#221](#221))
- Bug fix: Perform release builds with ContinuousIntegrationBuild=true ([#223](#223), fixes [#175](#175))

Signed-off-by: Jon Skeet <jonskeet@google.com>
ericdotnet added a commit to ericdotnet/CSharp-sdk-dev that referenced this issue May 13, 2024
Changes since 2.3.1:

- Feature: Implement underscore prefixes for AMQP (see history) ([#236](cloudevents/sdk-csharp#236))
- Feature: Allow empty payloads in Kafka ([#224](cloudevents/sdk-csharp#224))
- Feature: Implement conversions to and from JObject/JsonElement in JsonEventFormatter ([#234](cloudevents/sdk-csharp#234), part of [#231](cloudevents/sdk-csharp#231))
- Bug fix: Observe JSON serializer options in JsonEventFormat ([#226](cloudevents/sdk-csharp#226), fixes [#225](cloudevents/sdk-csharp#225))
- Bug fix: Put AvroEventFormatter in the right namespace ([#220](cloudevents/sdk-csharp#220), fixes [#219](cloudevents/sdk-csharp#219))
- Bug fix: Use content headers when parsing HTTP requests/responses ([#222](cloudevents/sdk-csharp#222), fixes [#221](cloudevents/sdk-csharp#221))
- Bug fix: Perform release builds with ContinuousIntegrationBuild=true ([#223](cloudevents/sdk-csharp#223), fixes [#175](cloudevents/sdk-csharp#175))

Signed-off-by: Jon Skeet <jonskeet@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants