-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ADR for enhanced metadata generation #40336
base: main
Are you sure you want to change the base?
ADR for enhanced metadata generation #40336
Conversation
9c040c2
to
f5e1816
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I would like @aloubyansky's opinion.
@@ -0,0 +1,117 @@ | |||
= Enhanced extension metadata generation | |||
|
|||
* Status: proposed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be change on merge.
= Enhanced extension metadata generation | ||
|
||
* Status: proposed | ||
* Date: 2024-04-26 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might need an update.
ADR number to be updated. |
I support the idea behind this. Let's polish some details a bit more though. For example, how a registry (and possibly other tools) will know how to get the metadata: deployment JAR vs yaml artifact, feeding this metadata to registries on release. |
Thanks, @aloubyansky. I think I've addressed all your comments in the ADR doc. I left the question of the yaml artifact as a 'we could do either' for further discussion, because I don't really understand about the platform data generation or maven publishing to have a firm opinion about the feasibility/best option. Intuitively, the yaml archive seems like it should be a little optional extra that might be handy for something. If the tooling is always run locally with a deployment artifact sat next to it, maybe a separate archive is overkill. After all, anything that wants to access the extension's metadata is supposed to ask the registry, not query maven. But maybe there are scenarios where either tooling doesn't want to use the registry, or it would have to pull the binary from maven because the registry hasn't been published yet. ... but this whole area is not one I know, so I'm very happy to take a recommendation! |
That's not external tools. |
I don't understand what that means? we can't fix them in a release - we would need a timemachine. thus they are as external as intellij IDE or similar are :) |
are you saying codestarts are effectively NOT supported outside platform - thats a bug then. |
thats exactly what I keep proposing. Look in deployment first and if not there look up in runtime artifact. only reason for not using same name is I'm not sure how I would differentiate between them if scanning in a place where I don't have access to GAV info. |
but it will have to know which one to look for if we allow both. |
Do you know where those tests are to check the impact? |
I'm talking about adding a file in a unique place and remove the other one when/if it is redundant. I'm simply not going to call it that we are moving it because the two files does not have the same content and has two different roles. |
It seems like they aren't supported when the registry is off. |
I'm trying to find them - andy ran them and shown them fail but i haven't spotted them yet. |
yes, so thats a bug. we should not design changes based on that bug to stay around :) |
Exactly. So using the same name will be an advantage. We just need to make sure it's in the one artifact. |
how do you ensure it will pick up the deployment located one that has more info than the one in runtime? |
That wouldn't be an issue anyway. We'd still be looking for quarkus-extension.yaml like the registry does/will do. It just has to be implemented |
Because if the deployment artifact has it then the runtime one wouldn't. We can enforce it in the plugin generating it in the deployment module. |
I see how it can work, |
found it - https://github.com/quarkusio/quarkus-devtools-compat see https://github.com/quarkusio/quarkus-devtools-compat/actions - its intended to be expanded if we find cross-version concerns like this one. |
No, DevUI (and I can see some dev tools tests) are just looking for it on the deployment classpath. So these consumers shouldn't be affected. |
Can you give example content of what you're suggesting go in the |
These tests are not based on quarkus-extension.yaml as the source. They consume JSON provided by the registry, so it looks like they shouldn't be affected. |
I'm not saying the file is staying when an extension move to the new and improved mvn extension plugin. the src one could be deleted. Only thing I haven't considered yet is if any impact on extensions wanting to be able to target both LTS and main development at the same time. Here being able to have the runtime src in place could be useful. |
just because the test aren't doing it now doesn't mean they should continue relying on the registry. |
So if we are not breaking them then what's the issue? |
For what? |
Ahh, got it. That's what I meant by 'move'. So we would not expect the deployment and runtime source files to co-exist in the same extension. For backwards compatibility, the extension mojo obviously has to support files in both locations, as shown in the diagrams.
In that case, I'd expect them to just leave the runtime source and not use the new deployment location. Otherwise we risk the files going out of sync. It also has the advantage that when they decide to move to the deployment location, the change history on the file is preserved. If we have a period when there's two copies of the file, and then the 'original' copy is deleted, change history is lost. |
To summarise the discussion about what goes into the binary, we're discussing Here are some advantages and disadvantages I've pulled from the comments above: Everything is called
|
AFAICT, we've been able to identify any such legacy tooling, besides the registry. Who are we breaking?
This is going to make it more complicated for consumers such as DevUI, since it would have to discover the legacy and new one, and merge or filter out those that describe the same thing.
|
but if we don't then you expect all extensions to move to the new structure at the same time? |
No, what would be the reason for that? |
See file contents for discussion.
Enables #40306.