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

Resilient enum for extension metadata & remove 'code' tag from resteasy-reactive-xxx #20322

Merged
merged 2 commits into from
Sep 22, 2021

Conversation

ia3andy
Copy link
Contributor

@ia3andy ia3andy commented Sep 22, 2021

  • Adding new enum values in the extension metadata will not break compatibility after this change, it will now use the default if an invalid value is found.

  • Currently, in code.quarkus.io all the resteasy-reactive extensions have the code tag. This is because we needed a way to avoid having the classic resteasy starter code with those extensions. As a workaround we used the core kind which isn't showing the code tag but still referencing the codestart. In a few versions we will be able to introduce default-codestart without much risk.

@ia3andy ia3andy requested a review from aloubyansky September 22, 2021 09:28
@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/platform Issues related to definition and interaction with Quarkus Platform area/rest labels Sep 22, 2021
@ia3andy
Copy link
Contributor Author

ia3andy commented Sep 22, 2021

@aloubyansky If I get it right, to avoid any compatibility problem, we should introduce this with a minor version change (and not a patch). By doing this:

  • It won't fail using a older version of a Quarkus tool as they will not automatically use a different minor version.
  • It will fail if manually specifying a more recent version with an older Quarkus tool.
  • We will need to update code.quarkus.io tooling before updating the registry (which is ok as it uses the core bom)

@aloubyansky
Copy link
Member

No, our command line tools are consuming whatever the registry serves.

@aloubyansky
Copy link
Member

I am still not sure what makes it a breaking change.

@ia3andy
Copy link
Contributor Author

ia3andy commented Sep 22, 2021

the legacy toEnum will throw an exception because it doesn't know default-codestart :-/

@maxandersen
Copy link
Member

we should not be using hardcoded enums for things that are meant to be extendable.
is there no way we can introduce this without breaking things ? or at least make a patch to 2.2.x that won't break when this is out ?

@maxandersen
Copy link
Member

besides that - im not following why not showing "code" tag is important ? like what is this change actually for ?

@ia3andy
Copy link
Contributor Author

ia3andy commented Sep 22, 2021

@maxandersen

we should not be using hardcoded enums for things that are meant to be extendable.
is there no way we can introduce this without breaking things ? or at least make a patch to 2.2.x that won't break when this is out ?

This patch will make it safe in the future.

besides that - im not following why not showing "code" tag is important ? like what is this change actually for ?

Because they don't provide code (fake news :-p)

I might have a way to make it non breaking. It will change the PR.

Also, as we might be forced to break some day, we should introduce an api-version that we increment on breaking change (and that we keep in the stream metatdata). When the api-version is lower in the client, we display a warning to tell the user it may fail and they should update to a recent version.

@ia3andy ia3andy changed the title Introduce default-codestart kind in extension metadata (wip) Introduce default-codestart kind in extension metadata Sep 22, 2021
@ia3andy ia3andy force-pushed the default-codestart-support branch from 2492396 to 8b1e0fc Compare September 22, 2021 11:15
@ia3andy ia3andy changed the title (wip) Introduce default-codestart kind in extension metadata Resilient enum for extension metadata & remove 'code' tag from resteasy-reactive- Sep 22, 2021
@ia3andy ia3andy changed the title Resilient enum for extension metadata & remove 'code' tag from resteasy-reactive- Resilient enum for extension metadata & remove 'code' tag from resteasy-reactive-xxx Sep 22, 2021
@ia3andy
Copy link
Contributor Author

ia3andy commented Sep 22, 2021

I created an issue for #20323

@maxandersen
Copy link
Member

This patch will make it safe in the future.

thats great but with 2.2 being what we support now long term we do need to limit what we break here. At least we need to quite careful.

besides that - im not following why not showing "code" tag is important ? like what is this change actually for ?

Because they don't provide code (fake news :-p)

but code is not about them providing code starts just that a codestart is available for them,right?

Maybe my question is what does default-codestart mean compared to what we already have?

I might have a way to make it non breaking. It will change the PR.

Great - let me know when ready for review.

@ia3andy
Copy link
Contributor Author

ia3andy commented Sep 22, 2021

This patch will make it safe in the future.

thats great but with 2.2 being what we support now long term we do need to limit what we break here. At least we need to quite careful.

besides that - im not following why not showing "code" tag is important ? like what is this change actually for ?

Because they don't provide code (fake news :-p)

but code is not about them providing code starts just that a codestart is available for them,right?

Maybe my question is what does default-codestart mean compared to what we already have?

Well for example, resteasy-qute provides a code, while resteasy-reactive-qute only provide the resteasy-react code (default), like any other extension btw (which provides the resteasy code by default)

I might have a way to make it non breaking. It will change the PR.

Great - let me know when ready for review.

it's ready for review now.

@quarkus-bot
Copy link

quarkus-bot bot commented Sep 22, 2021

Failing Jobs - Building 8b1e0fc

Status Name Step Failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 16 Build ⚠️ Check → Logs Raw logs
MicroProfile TCKs Tests Verify Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ MicroProfile TCKs Tests #

- Failing: tcks/resteasy-reactive 

📦 tcks/resteasy-reactive

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (test) on project quarkus-tck-resteasy-reactive: Command execution failed.

📦 tcks/resteasy-reactive/target/testsuite/tests

com.sun.ts.tests.jaxrs.platform.container.completioncallback.JAXRSClient0164.argumentIsNullWhenRegistredClassTest line 209 - More details - Source on GitHub

com.sun.ts.tests.jaxrs.common.JAXRSCommonClient$Fault: Unexpected response content No name has been set yet expecting NULL
	at com.sun.ts.tests.jaxrs.platform.container.completioncallback.JAXRSClient0164.assertString(JAXRSClient0164.java:458)
	at com.sun.ts.tests.jaxrs.platform.container.completioncallback.JAXRSClient0164.argumentIsNullWhenRegistredClassTest(JAXRSClient0164.java:209)

@ia3andy ia3andy merged commit ebd1013 into quarkusio:main Sep 22, 2021
@ia3andy ia3andy deleted the default-codestart-support branch September 22, 2021 16:21
@quarkus-bot quarkus-bot bot added this to the 2.4 - main milestone Sep 22, 2021
@geoand geoand modified the milestones: 2.4 - main, 2.3.0.Final Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/platform Issues related to definition and interaction with Quarkus Platform area/rest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants