spec icon indicating copy to clipboard operation
spec copied to clipboard

What do we define as a breaking change?

Open jonaslagoni opened this issue 2 years ago • 8 comments

This question emerged when @smoya wanted to make the channels field optional - https://github.com/asyncapi/spec/issues/661

This change, might not be a breaking change to the spec itself, however, for tooling that relies on the channels being required and always present, it would.

So when should a change in the spec be considered a breaking change?

I see two ways we can do this (and that is assuming we want to stay with semantic releases).

Only focusing on the spec

Agreeing that as long as the spec is backward compatible, it is not a breaking change.

Agreeing what is breaking changes

Agreeing on special cases would probably be possible to minimize breaking changes in tooling and spec.

My immediate thoughts are the following that would be questionable:

Non-breaking changes:

  • Adding a property

Breaking changes:

  • Making a property required
  • Making a property optional
  • Removing a property
  • Changing the type of a property in any way

Can you think of another possible solution?

jonaslagoni avatar Jan 18 '22 14:01 jonaslagoni

You made a really good point here. I agree having in mind breaking changes also at tooling level is important. I like the idea of treating breaking changes in different ways, depending on the context: A non-breaking change for the spec doesn't mean is not a breaking change for tooling and vice versa.

If we go in that direction, we should set obvious boundaries and consider only the tools under AsyncAPI umbrella (Code hosted on github.com/asyncapi) as implementations to check for breaking changes (unless the breaking change is clearly detected earlier).

Also, it would be nice if we build some quick tool we can run on CI to check for usages and, at least, list them on the PRs, like possible affected code. Github search is not very powerful for it.

smoya avatar Jan 18 '22 15:01 smoya

Making a property required

@jonaslagoni making a property required is also a breaking change. If I use an AsyncAPI 2.2.0 document as the input for an AsyncAPI 2.3.0 tool, and we have made a property required in v2.3.0, it will be a breaking change. I mean, changing asyncapi: 2.2.0 to asyncapi: 2.3.0 would not be enough.

Regarding #682, if we're not sure about it, we can always postpone it to v3 now that we're working on it.

fmvilas avatar Jan 18 '22 16:01 fmvilas

@jonaslagoni making a property required is also a breaking change. If I use an AsyncAPI 2.2.0 document as the input for an AsyncAPI 2.3.0 tool, and we have made a property required in v2.3.0, it will be a breaking change. I mean, changing asyncapi: 2.2.0 to asyncapi: 2.3.0 would not be enough.

You are right, adapted suggestion!

jonaslagoni avatar Jan 18 '22 16:01 jonaslagoni

Interesting one, as @jonaslagoni mentioned it really depends on context we talk about, spec and tools.

But I like what you mentioned @jonaslagoni , about Non-breaking changes: and Breaking changes: lists, they make sense to me.

Interesting what you mentioned @smoya about only AsyncAPI tools, I guess you have to stop somewhere, but maybe with @jonaslagoni lists and definitions then wouldn't really matter about the tools, as this kind of change would be breaking anyway.

boyney123 avatar Jan 18 '22 20:01 boyney123

maybe with @jonaslagoni lists and definitions then wouldn't really matter about the tools, as this kind of change would be breaking anyway.

Yeah, that's a really good point. I think we must work on defining those rules @jonaslagoni started. Specially after the conversation on https://github.com/asyncapi/spec-json-schemas/pull/146#issuecomment-1016290582

smoya avatar Jan 19 '22 10:01 smoya

I think this issue should end up completing as addition document in the repo, guide for codeowners to always consult with when accepting changes. But for the future, we would not only have info that for example making required optional is breaking, but also an explanation why. I for example thought that it should not be considered as breaking, but tbh, I on my own, if I would know something is required, I would not protect my code from not getting the property 🤷🏼

and I would not say what is braking for spec and what for tools. Spec without tools is useless, so it is always about breaking tools really

derberg avatar Jan 24 '22 16:01 derberg

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar May 25 '22 00:05 github-actions[bot]

Contributors are welcome 🙏🏼

derberg avatar Jun 07 '22 12:06 derberg

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Oct 06 '22 00:10 github-actions[bot]

I suggest we extend https://github.com/asyncapi/spec/blob/master/CONTRIBUTING.md with new section called Breaking Change vs Non Breaking Change and put it between Guiding Principles and RFC Contribution Champions.

Most of content is already provided

The specification is not much different than software. Some changes provided in the spec can cause breaking changes for tools that support it. For example, if one of the properties that was `required` becomes `optional`, it is considered a breaking change because some tools might depend on that property and fail if all suddenly it is not provided. 

_Non-breaking changes:_
- Adding a property

_Breaking changes:_
- Making a property required
- Making a property optional
- Removing a property
- Changing the type of a property in any way

Anyone is welcome to open a PR and drive it until it is merged.

/gfi docs

derberg avatar Oct 11 '22 10:10 derberg

Hey @derberg, your message doesn't follow the requirements, you can try /help.

asyncapi-bot avatar Oct 11 '22 10:10 asyncapi-bot

/gfi docs

derberg avatar Oct 11 '22 10:10 derberg

I suggest we extend https://github.com/asyncapi/spec/blob/master/CONTRIBUTING.md with new section called Breaking Change vs Non Breaking Change and put it between Guiding Principles and RFC Contribution Champions.

Most of content is already provided

The specification is not much different than software. Some changes provided in the spec can cause breaking changes for tools that support it. For example, if one of the properties that was `required` becomes `optional`, it is considered a breaking change because some tools might depend on that property and fail if all suddenly it is not provided. 

_Non-breaking changes:_
- Adding a property

_Breaking changes:_
- Making a property required
- Making a property optional
- Removing a property
- Changing the type of a property in any way

Anyone is welcome to open a PR and drive it until it is merged.

/gfi docs

I will be happy to open a PR and drive it until it is merged, but I'm kind of confused about what to do. Don't know why I'm confused 😂

Dule-martins avatar Oct 15 '22 22:10 Dule-martins

Hey @Dule-martins, your message doesn't follow the requirements, you can try /help.

asyncapi-bot avatar Oct 15 '22 22:10 asyncapi-bot

/help

Dule-martins avatar Oct 16 '22 05:10 Dule-martins

Hello, @Dule-martins! 👋🏼

I'm Genie from the magic lamp. Looks like somebody needs a hand! 🆘

At the moment the following comments are supported in issues:

  • /good-first-issue {js | ts | java | go | docs | design | ci-cd} or /gfi {js | ts | java | go | docs | design | ci-cd} - label an issue as a good first issue. example: /gfi js or /good-first-issue ci-cd

asyncapi-bot avatar Oct 16 '22 05:10 asyncapi-bot

@Dule-martins 😆 if you feel confused but you do not know why, I'm definitely not gonna be able to help you out 😆

derberg avatar Oct 17 '22 10:10 derberg

@derberg now, I know my issue

I don't have clue of what to do and where to do what I need to do.

I have been reading comments for days yet still confused kindly help

Dule-martins avatar Oct 18 '22 13:10 Dule-martins

@Dule-martins ok, basically ignore all comments except of https://github.com/asyncapi/spec/issues/688#issuecomment-1274493753 that summarizes what has to be done

derberg avatar Oct 18 '22 13:10 derberg

Oh! Thanks, Boss ❤️️

Dule-martins avatar Oct 19 '22 23:10 Dule-martins

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Mar 12 '23 00:03 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Aug 04 '23 00:08 github-actions[bot]

:tada: This issue has been resolved in version 3.0.0-next-major-spec.18 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

asyncapi-bot avatar Dec 04 '23 22:12 asyncapi-bot

:tada: This issue has been resolved in version 3.0.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

asyncapi-bot avatar Dec 05 '23 09:12 asyncapi-bot