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

Enable platform to contribute default config to project and provide global metadata usable in tooling #11256

Closed
maxandersen opened this issue Aug 6, 2020 · 11 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@maxandersen
Copy link
Member

Description
It would be interesting to enable the platform descriptor to provide input to the initial setup of a project.

Known items:

  • base image for docker native builds
  • add maven repositories

Implementation ideas
have metadata in platform to seed project generation.

@maxandersen maxandersen added the kind/bug Something isn't working label Aug 6, 2020
@maxandersen
Copy link
Member Author

advantages:

  • no need for different semantics/diffs of quarkus core
  • its clearly documented and explicit to user what is "different"

disadvantages:

  • will (currently) only work for new projects
  • if platform changes its default user won't get updated; but maybe we can print a warning or add a "lint"-check to detect such.

caveat:

  • if diff relevant for extensions we don't have a way to handle it. Would need codestarts that can execute during new addition.

@maxandersen
Copy link
Member Author

From chat:

Figure out A) how the container image will be configurable B) how to represent that somewhere in the platform artifact (platform.json or somewhere else) C) how codestarts hook that into its data D) if/how legacy codegen handles this E) make this wokr in both command line and code.quarkus F) Adjust A - E if one affects the other 😉

@ia3andy
Copy link
Contributor

ia3andy commented Aug 10, 2020

It seems this issue is also related: #11096

@maxandersen
Copy link
Member Author

Suggestion:

  • we add "metadata" to platform.json.
  • add keys for:
    • application-properties
    • maven-repos
    • etc.
  • for 1.7.x only add these metadata in redhat universe/platform.
    consequence:
  • 1.7.0 will fail on platform.json with metadata, but not a big concern if we only do it for red hat universe.

Codegeneration:

  • choice between doing this in codestarts or good old gen:
    • old gen:
      • requires changes to pom/gradle/properties generation
  • codestart:
    • suggestion is to use codestart for good old codegen and have flag to enable the more advanced codestarts features.

Best if we can change default platform fetch #11259 to just fetch latest minor (1.7.x instead of 1.x)

@aloubyansky
Copy link
Member

i'd say

metadata
- project-configuration
-- application-properties
-- maven
--- properties
--- repositories
--- plugin-repositories
-- gradle
--- properties
--- repositories
--- plugin-repositories

@maxandersen
Copy link
Member Author

maxandersen commented Aug 10, 2020

example:

- metadata:
  - application-properties:
    - quarkus.native.builder-image: yadydada:234324
  - maven:
    - repositories:
      - id:  redhat
      - url: https://maven.repository.redhat.com
    - plugin-repositories:
      - id:  redhat
      - url  https://maven.repository.redhat.com
   - gradle:
     - repositories:
       - id:  redhat
       - url: https://maven.repository.redhat.com

@ia3andy
Copy link
Contributor

ia3andy commented Aug 11, 2020

@aloubyansky @maxandersen minor detail, will the application-properties be received as Properties or Map<String, String>?

@maxandersen
Copy link
Member Author

There are no properties here. Just maps.

@aloubyansky
Copy link
Member

application-properties are supposed to be <String,String> though. So, imo, it depends what you prefer @ia3andy

@gastaldi
Copy link
Contributor

Outcome from the Zulip conversation:

Implement a config source that is assembled at build time and puts stuff into a special namespace platform.xxxx and then we can change the image config property default to be platform.image.url

@ia3andy ia3andy changed the title Enable platform to contribute settings/properties to initial project Enable platform to contribute default config to project and provide global metadata usable in tooling Aug 13, 2020
ia3andy added a commit to ia3andy/quarkus that referenced this issue Aug 17, 2020
ia3andy added a commit to ia3andy/quarkus that referenced this issue Aug 17, 2020
ia3andy added a commit to ia3andy/quarkus that referenced this issue Aug 18, 2020
ia3andy added a commit to ia3andy/quarkus that referenced this issue Aug 18, 2020
ia3andy added a commit to ia3andy/quarkus that referenced this issue Aug 18, 2020
ia3andy added a commit to ia3andy/quarkus that referenced this issue Aug 18, 2020
@ia3andy
Copy link
Contributor

ia3andy commented Oct 15, 2021

This is done

@ia3andy ia3andy closed this as completed Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants