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

Refactor support for distro/version pattern rules in makefiles #2960

Merged
merged 1 commit into from
Aug 9, 2022

Conversation

webbnh
Copy link
Member

@webbnh webbnh commented Aug 4, 2022

As I implement support for building things on/for multiple distribution/version combinations, I find myself reusing the same (or similar) code idioms which drive Make pattern rules where the pattern consists of a tag with the distro name and the major version (like rhel-9, centos-8, or fedora-35). There's a modest set of boilerplate definitions which support this usage, and, rather than continue to replicate it where it's needed, this PR moves it to a common, utility makefile which can be included by the makefiles which need the definition.

Also, in an upcoming PR, I will need some other standard Make magic, so I've added the definitions which support that (_empty and _space) to this file, as well.

PBENCH-720

@webbnh webbnh added Code Infrastructure packaging Issues related to software packaging Containerization Of and relating to the process of setting up and maintaining container images labels Aug 4, 2022
@webbnh webbnh added this to the v0.72 milestone Aug 4, 2022
@webbnh webbnh requested review from ndokos, portante and dbutenhof August 4, 2022 21:35
@webbnh webbnh self-assigned this Aug 4, 2022
riya-17
riya-17 previously approved these changes Aug 5, 2022
dbutenhof
dbutenhof previously approved these changes Aug 5, 2022
utils/utils.mk Show resolved Hide resolved
jenkins/Makefile Outdated Show resolved Hide resolved
jenkins/Makefile Outdated Show resolved Hide resolved
@dbutenhof
Copy link
Member

dbutenhof commented Aug 5, 2022

(@dbutenhof, there is no Jira tag specifically for this PR -- this is work which was split off from another PR...we we really need a tag, I suppose it's another part of PBENCH-720.)

Huh; I just noticed this comment while flipping through tabs.

It is possible to have multiple PRs pointing at a single Jira issue, and they all (in theory) get linked. This can be awkward if the issue spans sprints, since there's no easy way to split this so the completed work gets credited to the sprint.

Another option is to create sub-tasks under the story and connect each PR to its own sub-task. That's more or less the "official / intended" way to do it; but that can also be awkward when the story doesn't complete in a sprint because Jira makes splitting stories and moving incomplete sub-tasks much, much harder than it ought to be. (Sigh.)

A third option is to create another story under the same epic. This doesn't have either of those disadvantages, but of course it also weakens the Jira connectivity between the two, especially if the epic is already rather large. (You can improve that a bit by creating dependency links between the stories; but while that's easy to do it's not visible in the usual collection views and therefore of limited real use.)

@dbutenhof
Copy link
Member

Ready to go except for a jenkins/Makefile conflict. 😦

Create a new utility file, util.mk, which holds handy widgets for
implementing makefiles, and rehome the code which underpins
distro/version-based pattern rules there.  Also, add a couple of
other utility definitions.
@webbnh webbnh dismissed stale reviews from dbutenhof and riya-17 via 17c4056 August 8, 2022 14:47
@webbnh webbnh requested review from dbutenhof and riya-17 August 8, 2022 14:51
@webbnh webbnh merged commit e583efd into distributed-system-analysis:main Aug 9, 2022
@webbnh webbnh deleted the ci-refactor branch August 9, 2022 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Infrastructure Containerization Of and relating to the process of setting up and maintaining container images packaging Issues related to software packaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants