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

Clean up branches in TrenchBoot repositories #48

Open
krystian-hebel opened this issue Aug 12, 2024 · 14 comments
Open

Clean up branches in TrenchBoot repositories #48

krystian-hebel opened this issue Aug 12, 2024 · 14 comments
Assignees
Labels
P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: task Type: task. An action item that is neither a bug nor an enhancement. W: in progress Workflow: in progress. The issue is actively being worked on.

Comments

@krystian-hebel
Copy link
Member

Affected component(s) or functionality (if applicable)
All of them.

Brief summary
Analyze and reduce the number of branches on code repositories (mainly grub, xen and linux as they are modified most frequently). Ideally, users and developers shouldn't have to think about which branch is the main one that should be the target of pull requests.

Additional context
All of the following is open for discussion. I'm not strongly opposed to changing the rules, but we need something to start with, hence this list. Also, keeping the repositories clean is indefinite process, not a one-time task, so some rules will have to be added to documentation about expectations discussed here.

  • Upstream branches are to be left as-is. They usually are for specific versions of component, keeping them may make backports easier.
  • Branches may be part of PR or draft, in such cases reviewers and/or authors should be pinged to get such PRs merged or closed if they are no longer applicable.
  • In the end there should be no more than one branch per upstream version that branch is based on. Exceptions:
    • Branches that are part of an open PR are allowed only if they target that versioned branch based on upstream version, or a chain that starts with such branch.
    • Branches that are part of active upstreaming effort (e.g. https://github.com/TrenchBoot/linux/tree/linux-sl-master-5-16-24-v9), with all previous iterations for reference, until the feature gets merged.
  • There should be no branches for PoCs and demos presented on conferences after it has concluded, unless it is to be merged (in which case PR or draft should be opened). If the specific code must be kept because of external references, it should be tagged instead.
@krystian-hebel krystian-hebel added T: task Type: task. An action item that is neither a bug nor an enhancement. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. W: todo Workflow: todo. The issue is in the initial to do state. labels Aug 12, 2024
This was referenced Aug 20, 2024
@SergiiDmytruk
Copy link
Member

I'll post comments as I go through the repos for feedback and to not have a single huge comment at the end.

Xen

Dropped:

Pinged:

@krystian-hebel, absolute majority of branches come from upstream and I think we're only interested in stable-* ones. OK to remove all others? The removed would include staging-*, coverity/*, *-shim-* and smoke, which all seem useless for interacting with upstream.

@SergiiDmytruk
Copy link
Member

SergiiDmytruk commented Aug 20, 2024

GRUB

Dropped:

Renamed:

  • tb-2.12-57-linux-amd to tb-2.12-57, because the old name was reflecting contents of top patches only

Pinged:

Questionable:

@SergiiDmytruk
Copy link
Member

Linux

Upstream:

Upstreaming:

Versions for different kernels (convert to tags?):

Unique commits?:

Temporary branches?:

Also, I'm not sure how to interpret [revision] for {2ba13df} commits.

@SergiiDmytruk
Copy link
Member

TrenchBoot.github.io

Dropped:

The rest of the branches are from Dependabot which seems to be ignored and it won't even send any more PRs because of that. Should either use it (if its suggestions are even useful) or disable and remove all PRs and corresponding branches. Given that TrenchBoot/TrenchBoot.github.io#31 removes most of the files, we won't need those dependencies in the future?

slexec

One extra branch pre_slrt, convert to a tag?

trenchboot-issues

2 branches, pushed to #7 to get it merged and drop the second branch.

Other repos

Have only one branch.

@krystian-hebel
Copy link
Member Author

Xen:

@krystian-hebel, absolute majority of branches come from upstream and I think we're only interested in stable-* ones. OK to remove all others? The removed would include staging-, coverity/, -shim- and smoke, which all seem useless for interacting with upstream.

Sure, let's remove them.


GRUB:

these don't seem to appear in 3mdeb's blog posts but maybe they are referenced somewhere else, safe to drop?

Can be removed, all of the code was migrated to newer branches. IIRC the first one was used as a demo for one of the conferences, but we weren't able to reproduce it even few days after, most likely to different SKL (or LZ at that time).


Linux:

The *-amd branches may be used to help with implementation of the upcoming phase, I'd leave them until it is done.

Also, I'm not sure how to interpret [revision] for {2ba13df} commits.

I think this is some kind of patch queue, it allows adding changes as a new commit and squashing them later. @rossphilipson would probably know more, maybe we could use it somewhere.


trenchboot-sdk:

I've closed Optiplex PR and removed its branch. As for Qubes packages, on the one hand we have CI that does it automatically, on the other hand, it already got outdated several times. Perhaps manual instructions would allow to proceed in those cases using common sense, but it would have to be reworked to match current state of the builder(s).

@SergiiDmytruk
Copy link
Member

Xen:

Sure, let's remove them.

-15 branches there.

GRUB:

Can be removed, all of the code was migrated to newer branches. IIRC the first one was used as a demo for one of the conferences, but we weren't able to reproduce it even few days after, most likely to different SKL (or LZ at that time).

-2 branches.

@SergiiDmytruk
Copy link
Member

SergiiDmytruk commented Aug 30, 2024

Went through the repos again to assess the updated state.

Xen

Restored TrenchBoot/xen#17 PR.
Also there was aem based on 4.17.2, so I renamed it to aem-4.17.2.
Renamed aem-phase4-rebase to aem-4.17.4 because that's what it is.

There are still a bunch of stable-4.* branches from upstream. Remove all but stable-4.17?

GRUB2

Removed intel-txt-aem-base (was 7e0310c) which was used as a target of TrenchBoot/grub#16.

Usefulness of the following old branches by @dpsmith is unclear:

Turn them into tags?

Linux

Nothing was removed, #48 (comment) still applies (but see #48 (comment)).

trenchboot-sdk

On TrenchBoot/trenchboot-sdk#7 from #48 (comment):

As for Qubes packages, on the one hand we have CI that does it automatically, on the other hand, it already got outdated several times. Perhaps manual instructions would allow to proceed in those cases using common sense, but it would have to be reworked to match current state of the builder(s).

There are very few branches there, so keeping it isn't a big deal.

trenchboot-issues

Pinged #7. Update: it got approval and I merged it.

TrenchBoot.github.io

TrenchBoot/TrenchBoot.github.io#22 is an old PR, otherwise the repo has been cleaned up.

slexec

Still one extra branch pre_slrt, convert to a tag or let it be?

@SergiiDmytruk SergiiDmytruk added W: in progress Workflow: in progress. The issue is actively being worked on. and removed W: todo Workflow: todo. The issue is in the initial to do state. labels Aug 31, 2024
@krystian-hebel
Copy link
Member Author

It seems that staging on Xen is actually needed: https://github.com/TrenchBoot/xen/actions/runs/11313225621

@SergiiDmytruk
Copy link
Member

It seems that staging on Xen is actually needed: https://github.com/TrenchBoot/xen/actions/runs/11313225621

Restored it based on origin/staging in my local clone.

@krystian-hebel
Copy link
Member Author

That helped, now it fails further: https://github.com/TrenchBoot/xen/actions/runs/11313225621/job/31464512006

I've updated staging to current upstream version, but it didn't fix the remaining issues.

@SergiiDmytruk
Copy link
Member

  curl https://scan.coverity.com/download/cxx/linux64 \
    --no-progress-meter \
    --output cov-analysis.tar.gz \
    --data "token=${TOKEN}&project=XenProject"

No or an outdated token?

@krystian-hebel
Copy link
Member Author

Probably no token, I haven't add any, this comes from CI pulled from upstream. I'd expect it to fail with more meaningful message, but I don't think we should worry about that, at least for now. It only happens after master is updated to upstream, AFAICT.

@SergiiDmytruk
Copy link
Member

I'd expect it to fail with more meaningful message

Just tried it:

[~]$ curl https://scan.coverity.com/download/cxx/linux64 \
    --no-progress-meter \
    --output cov-analysis.tar.gz \
    --data "token=aaaaaaaaaaa&project=XenProject"
[~]$ echo $?
0
[~]$ ls -l cov-analysis.tar.gz 
-rw-r--r-- 1 emdeb users 0 2024-10-15 16:49 cov-analysis.tar.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. T: task Type: task. An action item that is neither a bug nor an enhancement. W: in progress Workflow: in progress. The issue is actively being worked on.
Projects
None yet
Development

No branches or pull requests

2 participants