Skip to main content

Hi Cognite Team,

I'm curious about the specific rules you follow for versioning views, particularly with the versioning format like "@view(version: 'v4')". I’ve noticed that the last number is the only one that changes, and I wanted to understand the rationale behind this.

In my experience, I typically use the X.Y.Z format, where:

  • Major versions indicate significant changes or potential backward-incompatible updates.
  • Minor versions introduce new features or enhancements.
  • Patch versions address bug fixes or minor improvements.

While I understand that tools like DVC are more suited for tracking actual data changes, we are focusing on versioning the views and models. Is this approach aligned with your guidelines?

If there aren’t any formal rules, that’s perfectly fine; we’re just trying to establish our own conventions and best practices. Versioning is an important aspect for us, and any insights you could share would be greatly appreciated.

Hi @Andre Alves 

Thanks for raising this.

As you indicate, there are no formal or strict rules on versioning as it depends on your use case, team size and perferred way of working.

In CDF views and data models are versioned while containers are not. Please refer to this article for an overview of allowed changes and in which cases new versions are require.

One option is to add new versions only when strictly required, but you can also issue versions without any other if would like to align view version within a data model. Following a major.minor.patch scheme is a bit more to handle, but it also allow you to be very explicit.

Do note that the version of the Data Model itself is part of the URL to the GraphQL endpoints, so changing this will require changes to the GraphQL clients.

 

Arild Eide

 


Reply