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

Clarify the contract of features and capabilities #9740

Merged
merged 1 commit into from
Jun 9, 2020

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Jun 3, 2020

  • introduce enums for core extensions
  • validate duplicate features

This PR breaks compatibility:

  • string constants from Capabilities and FeatureBuildItem are extracted into enum values; i.e. the FeatureBuildItem.AGROAL is now available as Feature.AGROAL.getName() (and the name is generated from the enum name).
  • the names of capabilities were unified and follow the naming conventions for Java packages; i.e. io.quarkus.container-image-s2i is now io.quarkus.container.image.s2i

@boring-cyborg boring-cyborg bot added area/amazon-lambda area/arc Issue related to ARC (dependency injection) area/artemis area/cache area/config area/core area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle labels Jun 3, 2020
@mkouba mkouba requested review from gsmet, geoand and kenfinnigan June 3, 2020 08:49
@mkouba mkouba force-pushed the clarify-feature-capability branch from 47d8b10 to 069e436 Compare June 3, 2020 12:21
Copy link
Member

@kenfinnigan kenfinnigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment is whether it should also update the documentation at https://quarkus.io/guides/building-my-first-extension#deploying-the-greeting-feature and https://quarkus.io/guides/writing-extensions#sample-test-extension to explain features and capability differences

@mkouba
Copy link
Contributor Author

mkouba commented Jun 3, 2020

@kenfinnigan That's a very good point. I'll update those docs tomorrow.

@geoand
Copy link
Contributor

geoand commented Jun 3, 2020

I might have missed something since I am on PTO today, but what motivated this?

@mkouba
Copy link
Contributor Author

mkouba commented Jun 4, 2020

I might have missed something since I am on PTO today, but what motivated this?

There was a discussion around features and capabilities here: https://groups.google.com/forum/#!topic/quarkus-dev/QnGTnXIEAW8 (first part of the thread)

So I've tried to clarify the contract and refactor some bits, because the string constants are error-prone (even now there are inconsistencies like io.quarkus.resteasy-mutiny vs io.quarkus.elytron.security.ldap).

@geoand Do you think it's useless (or too much ;-)?

@geoand
Copy link
Contributor

geoand commented Jun 4, 2020

@geoand Do you think it's useless (or too much ;-)?

Not at all, I just wanted to know what promted it :)

@geoand
Copy link
Contributor

geoand commented Jun 4, 2020

One rather serious implication is that this might break 3rd party extensions out there, potentially making releasing version 1.6 of the platform kind of hard.
So I'll leave it up to @gsmet to decide.

@mkouba mkouba force-pushed the clarify-feature-capability branch from 069e436 to fe6ebd2 Compare June 4, 2020 06:29
@mkouba
Copy link
Contributor Author

mkouba commented Jun 4, 2020

One rather serious implication is that this might break 3rd party extensions out there, potentially making releasing version 1.6 of the platform kind of hard.

Yeah, I know. The 3rd party extensions that use the capabilities constants would break as I mentioned in the description. Here's the point - we should either do it now or never. And I tend to prefer the first option ;-).

@geoand
Copy link
Contributor

geoand commented Jun 4, 2020

Yeah, I agree with you, it's now or never. But since it could impact the release 1.6 a lot, I see this as being as something in which @gsmet should have the final say.

@mkouba mkouba force-pushed the clarify-feature-capability branch 2 times, most recently from 91dffcf to 1a88ab3 Compare June 4, 2020 12:32
@mkouba
Copy link
Contributor Author

mkouba commented Jun 4, 2020

@geoand I've reintroduced but deprecated the capabilities constants. This should help a little.

@geoand
Copy link
Contributor

geoand commented Jun 4, 2020

Indeed, that should go a long way, thanks!

+1 from me

@mkouba mkouba force-pushed the clarify-feature-capability branch from 1a88ab3 to 73838e9 Compare June 4, 2020 13:36
@mkouba
Copy link
Contributor Author

mkouba commented Jun 4, 2020

@kenfinnigan docs updated...

@mkouba mkouba force-pushed the clarify-feature-capability branch 2 times, most recently from 1103b1f to 539c023 Compare June 5, 2020 07:08
- introduce enums for core extensions
- validate duplicate features
- deprecate capabilities constants
- only extensions that use hard-coded string constants may be broken
(due to introduction of naming conventions)
@mkouba mkouba force-pushed the clarify-feature-capability branch from 539c023 to 770dbae Compare June 9, 2020 13:43
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from a quick glance. Thanks for having the old constants back, that was necessary.

Let's wait for CI and merge.

@gsmet gsmet added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jun 9, 2020
@mkouba mkouba merged commit f9d54d5 into quarkusio:master Jun 9, 2020
@gsmet gsmet added this to the 1.6.0 - master milestone Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/amazon-lambda area/arc Issue related to ARC (dependency injection) area/artemis area/cache area/config area/core area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/documentation area/gradle Gradle release/breaking-change triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants