-
Notifications
You must be signed in to change notification settings - Fork 45
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
Use distgen to get distro and version combinations #75
Conversation
Can one of the admins verify this patch? |
Can you add |
[test] |
I am looking into CI build log, and I have no idea how could be this failure related to make generate rule I've made in this PR. |
Needs to be rebased |
Isolate distgen multi rules that are used for each (distro, version) combination not excluded in multispec, Use output of distgen's --multispec-combinations flag to get the rigth versions and distros Required-by: postgresql-container#266
Alright, thanks, rebased on top of current master branch. |
[test] |
Can I please get some review or feedback to this? It is complicated to generate s2i-python-container files unless this is resolved. |
I'm a bit lost where's the difference between DISTGEN_MULTI_RULES and DISTGEN_RULES. |
The main idea of this PR is to use output of
to determine what combinations of Dockerfiles will be generated. The current approach in generate.sh script can't handle the case when some (distro, version) combinations are excluded from the matrix. At this moment the rules to generate Dockerfiles are mixed with rules to generate one copy of the file for each version directory like cccp.yml. In case we follow distgen multispec-combinations output, files like cccp.yml will be overwritten 4 times in some cases. This is why I divided rules into two categories:
|
Ok, I'm +1 to merge it here, just to unblock the ongoing work in python image, Even though I have to say don't like the change (the same as I don't like the I don't want to block the PR here, as I did not before. It is not a big deal |
@praiskup I see your points and I agree that manifest + generate.sh is not very understandable especially for someone looking into this for the first time and also not error proof (maybe some yaml file to declare rules and Python script to process it could work better). Your proposal #76 is nice and we might move this direction in the future. But these are all long time goals. At this moment Dockerfiles are special case so they probably need a special care as well. |
I think it would be worthwhile to make the multirule parser generic enough so that it can be used on other files as well, as Pavel already suggested. Likely just checking the suffixes and defaulting to centos should be enough? |
Actually now that I think about it again, those files would still have to retain the suffixes after being run through distgen so it is not the exact use case I had in mind there. I think it was something closer to already mentioned #76 which is something for the future. |
Merged as I did not want to block this anymore. |
Distgen provides --multispec-combinations flag to get all valid (distro, version) combinations not excluded in multispec, This output can be used in generate.sh instead of guessing what distro should be used and rediscovering logic to exclude some of the combinations.
It was necessary to divide distgen rules into two categories, cases where only one file is rendered for each version independently from distros have to be handled separately. This PR fixes #74.