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

Implement a global config mechanism #2704

Open
majamassarini opened this issue Jan 30, 2025 · 0 comments
Open

Implement a global config mechanism #2704

majamassarini opened this issue Jan 30, 2025 · 0 comments
Labels
area/config Related to the Packit's configuration. complexity/epic Lost of work ahead, planning/design required.

Comments

@majamassarini
Copy link
Member

majamassarini commented Jan 30, 2025

As a result for this epic we should be able to put a config key in https://src.fedoraproject.org/rpms/packit/blob/rawhide/f/.packit.yaml that references the upstream packit config https://github.com/packit/packit/blob/main/.packit.yaml and ideally remove any other existing key; the downstream sync release for packit should not be affected by the change.

  • we need to add a config key to the schema
  • we need to load the packit.yaml file and search for the config key in it. If a config key is found we need to recursively - at the beginning we could also have a limited depth of 3/n steps and no more and then we can choose to implement some recursion detection algorithm if more than a couple of steps are needed - look for the parent configs and start processing all the templates in the chain, creating a new temporary packit.yml that will be used instead of the original one.
    We should make the new code work both for the packit CLI and the packit-service. Thinking at packit CLI, we should probably stay flexible and let the base: URI be also a local url (like file:///).
  • we need to decide how to deal with files_to_sync: packit.yml; probably we can just remove it from the upstream config. But we should think what to do when files_to_sync is not defined at all (that means packit.yml is always copied from upstream to downstream), probably in those cases (which are most of the downstream sync only automations) there is no need for copying packit by default?
  • let the user know what the final configuration looks like (both for CLI and service); we should probably implement a CLI command that outputs the result of the pre-processing, and use it later in service. Would be nice if the output shows clearly which key affects which automation chain (upstream ci, downstream sync release, downstream ci...)
  • we can also implement the default internal packit-service base template (I would just start with one, and see later if having more of them can be useful). We can try, as an example, to remove the metadata key through it. In this way, when we will work on the linked card, we will be able to release a breaking change in packit, without breaking the packit service automation. We can always propose updates for the users configurations, but if our users don't accept them we can still work with the old configurations, at least on the packit service side.

see research packit/research/pull/220 for details.

@majamassarini majamassarini added complexity/epic Lost of work ahead, planning/design required. area/config Related to the Packit's configuration. labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config Related to the Packit's configuration. complexity/epic Lost of work ahead, planning/design required.
Projects
Status: new
Development

No branches or pull requests

1 participant