question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: What's best practice to add data versioning?

See original GitHub issue

Hi

I’m went through the latest CloudEvents docs and cannot find any examples on how to do the data versioning?

I saw the following example of EventGrid and see that there is eventTypeVersion in the header, but I think this based on CloudEvents V1.

  • Is the SchemaUrl the right element to use?
  • Do I need to add CloudEventExtension?
  • Use GetAttributes() and just add it? (Smelly)

Or is there something, I didn’t saw?

Cédric

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:19 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
jskeetcommented, Feb 12, 2021

I propose transferring this issue to the spec repo. It’s not really specific to the C# CloudEvents SDK, and it would benefit from views across the community.

@cmenzi is that okay with you?

1reaction
jskeetcommented, Jun 18, 2020

@cmenzi: That’s not quite the same though - because you don’t include the version in the type.

I envisage users subscribing to an event via just a type, and dataschema being effectively informational. If I subscribe to a particular event type, I don’t expect the schema to start changing on me in non-breaking ways. If it does, even if I can detect that via dataschema, I can’t do anything with it.

Instead, if the version is included within the type (e.g. com.mydomain.myservice.events.mymessagetype.v1) then an event producer that wants to create a breaking schema change can emit two events, one for v1 and one for v2, with different event types to distinguish them. Existing subscribers will receive the old schema, and new subscribers can choose to subscribe to v2. Eventually you’d want to turn off the v1 event type after an advertised deprecation period.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's best practice to add data versioning? · Issue ... - GitHub
Hi. I'm went through the latest CloudEvents docs and cannot find any examples on how to do the data versioning?
Read more >
The Guide to Data Versioning - LakeFS
What is data versioning ? When is data versioning appropriate? We review the various tools and use-cases needed for the best implementation.
Read more >
Database versioning best practices - Enterprise Craftsmanship
Best practice #4: all changes in the database's schema and reference data have to be applied through the scripts. Neither of them can...
Read more >
Best Practices When Versioning a Release | Cloudbees Blog
The simplest thing to do is start your initial development release at 0.1.0 and then increment the minor version for each subsequent release....
Read more >
8 Version Control Best Practices - Perforce Software
Another best practice is committing files with a single purpose. Each commit should have a single purpose. For example, fixing a bug or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found