Add script to check if a branch can be deleted from dist-git #9454
No reviewers
Labels
No labels
after freeze
automation
backlog
blocked
change-ack
change-nak
change-noreleng
changes
Closed As
Can't Fix
Closed As
Duplicate
Closed As
Fixed
Closed As
Fixed with Explanation
Closed As
Get back later
Closed As
Grooming
Closed As
Insufficient data
Closed As
Invalid
Closed As
It's all good
Closed As
taiga
Closed As
upstream
day-to-day
dev
docs
easyfix
epel
f26
f27
f28
f29
f30
f31
f32
f33
f34
f35
f36
f37
f38
f39
f40
f41
f42
f43
f44
f45
fedora
groomed
high-gain
high-trouble
in-progress
in-review
investigation
legal
low-gain
low-trouble
mass rebuild
medium-gain
medium-trouble
meeting
mini-initiative
new_artifact
ops
pdc_retirement
rawhide
RCA
review
script
sidetarget
sprint-0
sprint-1
sprint-2
sprint-3
sprint-4
sprint-5
unfrozen
waiting on external
Backlog Status
Needs Review
Backlog Status
Ready
chore
documentation
points
01
points
02
points
03
points
05
points
08
points
13
Priority
High
Priority
Low
Priority
Medium
Sprint Status
Blocked
Sprint Status
Done
Sprint Status
In Progress
Sprint Status
Review
Sprint Status
To Do
Technical Debt
Work Item
Bug
Work Item
Epic
Work Item
Spike
Work Item
Task
Work Item
User Story
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
releng/tickets!9454
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "distgit-commit-unused"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Co-authored-by: Igor Raits ignatenkobrain@fedoraproject.org
https://pagure.io/releng/issue/9068
https://pagure.io/fesco/issue/2387
https://pagure.io/fesco/issue/2340
Signed-off-by: Zbigniew Jędrzejewski-Szmek zbyszek@in.waw.pl
rebased onto 4604a4232332e78ac8228c47080224ee2e250c7e
I think you could add this and next arguments into the mutually exclusive group so that you won't specify both.
Great job, @zbyszek!
I think I have only one concern here. It can happen that:
fooexists and is activefoo2(like a compat version of foo) exists and is activeName: fooinfoo2.specand make a buildfoo, even though it was built fromfoo2repoIn that case, we will allow deletion of commits from
foo2repo even though they were used. I don't think this is happening often and most likely is some corner case, but I think it is important to be aware of this. It actually happened to me few times with Rust packages. Probably solution to this problem can be enforcement of same dist-git repo as package name in koji, but it is not in place.rebased onto 90439edc106ff212b4a99ff82fe760ab0a361a4b
Reworked. Two changes:
(That second check might reject some cases that could possibly be supported, e.g. when a macro is used in the name. If somebody has a case like that and they care enough, they can fix the script to parse the file using rpm. Hopefully such cases are rare, so I didn't bother doing that.)
rebased onto 09c32ed2dc41225e9aa3c3c0d5fd098cb2902535
5 new commits added
Add a work-around for very old builds not having a sourceDo not allow removing release branches from which builds have been madeWhen checking builds, extract the spec file and verify Name: is set set correctlyLook at local and remote branches separatelyAdd script to check if a branch can be deleted from dist-gitUpdated to handle @churchyard's request in https://pagure.io/fesco/issue/2387#comment-652070: do not allow removal of branches which were used to build anything.
@ignatenkobrain I also found another case where koji doesn't know the source for a build, see last commit.
/cc @kevin, @mohanboddu
@zbyszek Can you rebase the PR as it has some merge conflicts?
Otherwise, its looking good.
Thanks.
Script seems fine to me, as long as it expressed the policy that fesco approves/wants.
rebased onto
a55d413cdfIt can't have conflicts, because it just adds a new file. I rebased in case you want to have linear history.
I think it satisfies the spirit of the policy approved by FESCo in #2340. The script is more restrictive in some regards, because it rejects branches from which packages have been built, even all the commits in those branches are reachable from other branches. OTOH, it permits removal of branches which have commits which are not reachable from a different branch, as long as none of those commits were used to successfully build real packages in koji. Those additional details match what was requested in the ticket and discussed before approving the one-sentence policy, even if the one-sentence policy does not explicitly express this. So yeah, I think this is good to go.
well, shouldn't fesco formally vote on it before we just decide it's ok and start using it? I know it may be a formality, but would be good for everything to be acked.