-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
[2.0.0] Discussion how to release 2.0.0 parser-js #585
Comments
Yeah, forget about the idea we discussed. I support your idea of carrying the ModelAPI (I like the name 😄) forward into v2. In any case, let's make it clear and visible in the docs that the lifetime of such API is limited. And let's decide immediately how long we want to be supporting the old API. I suggest not longer than the end of January. |
@fmvilas Sure, thanks! This also needs to be discussed how much we want to have support for the old API. I was thinking until the release of 3.0.0 spec, but this time can be shortened, as you say to January or February, something like that. |
Yeah, the reason I said January is because I'd love to get to 3.0.0 with only the intent-driven API. I know this is not going to happen for everyone but at least I think it should happen for our tools. That would be a great way to test the new API with a real use case and see if it really "survives" the new major version 😄 |
"End of January 2023" Seems what we are looking for then? |
well, I like how optimistic you are with if you want to pull in old API, and release both -> I'm interested in details on how you wanna do it 😄 I don't have a strong opinion, but IMHO we need no deadlines. We release betas, then just do 2.0 and people have as much time as they want to migrate, they just need to remember that we will not maintain 1.x and will not add new spec features there, that is it 🤷🏼 . So the only deadline we can really do is, that we will add new spec features to 1.x only once beta do not move to official 2.0 |
It will be very simple. We will create import { Parser, migrateToOldAPI } from '@asyncapi/parser';
const parser = new Parser();
const parsed = parser.parse({ ... } // spec);
const oldAsyncAPIDocumentModel = migrateToOldAPI(parsed); In generator we will have new field in template's config EDIT: of course after "incubation" period for new API, when we will remove old api we will release new major version of Generator to remove support for old api. |
it sounds complicated 😄 why not just releasing new API only as 2.0 beta, then also generator 2.0 beta:
or am I missing something? |
@derberg With Fran we thought about such a solution with Generator release, but it has one problem from User experience perspective. If we released a new version of Generator and version |
I do not think you look from user perspective but maintainer perspective 😉 From user's perspective, all is good. User does not have to do anything. We just release new versions that they can use or not.
but yeah, while writing this comment, I realized that more complexity would end up in projects like CLI, Studio, and others. You are right 👍🏼 |
PR for generator asyncapi/generator#833 |
This issue has been automatically marked as stale because it has not had recent activity 😴 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 ❤️ |
still relevant |
New versions of the Custom Schema Parsers (Avro, Raml, and OpenAPI) are breaking compatibility so they can't be used without updating to Parser-JS v2. The following repositories have custom schema parsers as dependencies.
To migrate to the new Parser-JS V2, each repository must adapt the code to adopt Parser-JS v2 RC and use the RC of each Custom Schema Parser as well. |
Regarding v3 features, all of them are missing. The following is the list of features (I hope I don't miss any) from v3 that require changes in Parser-JS v2 and most probably Parser-API:
Please reply in case you are happy to take this. |
Parser-JS codebase is up-to-date right now with all required changes for supporting AsyncAPI v2 atm. EDIT: PR merged |
The release process has been started. Follow the progress in the following Slack thread: https://asyncapi.slack.com/archives/CQVJXFNQL/p1682327883697419 |
I updated the description of this issue to reflect the progress of adopting the new parser in the official tooling. |
This issue has been automatically marked as stale because it has not had recent activity 😴 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 ❤️ |
As v2 and v3 has already been released, I am closing this issue. |
Of course, the release itself is not something difficult, but we need to discuss what implications the release of the new parser brings with it to the whole ecosystem of tooling, core and community ones.
Generator and other tools where we use ParserJS
First of all is integration problem in tooling. As ParserJS is treated as main tool for all other tools/application/generator templates that we have written in JS/TS, with 2.0.0 release we have problem how to make the transition from ModelAPI to IntentAPI very easy and "lazy" - that is, so that people don't have to quickly rewrite their code for the new API, and can do it optionally. Of course, after some time (a few months?) we should remove support for the old API and inform community about that, but we should have an "incubation" period for the new API.
This is difficult enough because we use the old Parser API in projects such as:
AsyncAPIDocument.allSchemas()
method (in old ModelAPI)Leaving the ModelAPI to be able to fix it in case of bugs
It's another problem related to the situation when we will release
2.0.0
of ParserJS, people will still use old ModelAPI but found some bugs (very small chance but there is) and would like to report it and fix it. We should support in first few months ModelAPI and IntentAPI in this same codebase (one solution) for such a situations.Possible solution(s)
I have an idea to solve both problems, which seems to me the most cost-effective from the point of view of the work put in and the UX from the community side:
next-major
release), so we will have better validation (Spectral) but projects which use ModelAPI will be able to use the new Parser without any problems (and downgrades). Going with that solution we will introduce better maintainability of project, because we won't have to have separate branch only for1.x.x
version to problem described inLeaving the ModelAPI to be able to fix it in case of bugs
section. Of course, we will provide the ability to use the Old or New api without big problems with migrations to have a good UX. We can have still two branches, for2.x.x.
and1.x.x
for some time, but it will only introduce problems with maintainability.apiVersion
field to determine which version of Parser given template should use. By default it will bev1
(old API), but we will have alsov2
, so people will be able to lazy rewrite given template to the new API. There are also idea suggested by @fmvilas to determine version of ParserAPI by checkinggenerator
field. If template needs at least2.0.0
version of Generator, then we will use IntentAPI, but if it points to the<2.0.0
version it will use ModelAPI. I don't like this approach, because then people will have to change Generator versions (install it globally with current Generator CLI) depending on the version of the ParserAPI that a given template uses. This will cause a lot of chaos in our community. Even if we made this integration by ourself with changing Generator versions in our tools themselves, it is still a bad solution because it leaves the problem of incompatibility of templates and will cause longer generation time. Also, another benefit withapiVersion
field is that we don't need to release2.0.0
of Generator, because everything will be handled in Generator code, so from Generator point of view, new ParserAPI will be non-breaking change.Do you have ideas for other solutions, better ones? Take into account that the UX from the community side should be the best possible and that there should be as little effort as possible to switch to the new version of ParserAPI.
WDYT? cc @smoya @derberg @fmvilas @jonaslagoni
Progress on adapting code base to use new Parser-JS v2:
@asyncapi/parser
to v2.0.0 and use the new parser-api generator#960The text was updated successfully, but these errors were encountered: