Commits don't end up on the scm-commits list #11641
Labels
No labels
announcement
anubis
authentication
aws
backlog
blocked
bodhi
ci
cloud
communishift
copr
database
day-to-day
dc-move
deprecated
dev
discourse
dns
downloads
easyfix
epel
firmitas
forgejo_migration
Gain
High
Gain
Low
Gain
Medium
gitlab
greenwave
hardware
help wanted
high-trouble
koji
koschei
lists
low-trouble
medium-trouble
mirrorlists
monitoring
Needs investigation
odcs
OpenShift
ops
outage
packager_workflow_blocker
pagure
permissions
Priority
Needs Review
Priority
Next Meeting
Priority
🔥 URGENT 🔥
Priority
Waiting on Assignee
Priority
Waiting on External
Priority
Waiting on Reporter
rabbitmq
release-monitoring
releng
request-for-resources
s390x
security
SMTP
sprint-0
sprint-1
src.fp.o
staging
unfreeze
waiverdb
websites-general
wiki
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
8 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
infra/tickets#11641
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
The old fmn was used to watch all commits on src.fedoraproject.org and send them to the scm-commits@lists.fedoraproject.org list.
Since I took down the old FMN, there's no more emails there. ;(
This list was super high volume, but it was a way to have commits for all packages transparently go out and allow auditing from 3rd parties, etc. It would be super nice if we could make this work again.
I think it would be a nice exercise for someone who wants to learn writing a fedora-messaging consumer. Maybe a toddler would be better btw.
Metadata Update from @zlopez:
Probably a good ticket to bring up on I&R standup.
OK, so let me make a summary of this, after a week of work or so. The solution is composed of 3 elements:
Subjectand the body of the email. This work used to be done byfedmsg_meta_fedora_infrastructure/scm.pyon fedmsg.Part 3 could be done by anyone new to fedora-messaging and Toddlers, it's simple enough I think. I'm happy to give some mentoring on the fedora-messaging part (I haven't ever written a Toddler yet so I don't know about that part).
Part 1 is... trickier. The git hook is actually installed by Ansible, and has two versions, slightly different from each other, one adapted to Python 3 but not the other, one supporting namespaces but not the other. It's a bit of a mess. And hard to evolve into something that would use schemas as required by Part 2. Let's try to minimize the amount of raw code that we deploy with Ansible, please.
I've taken those git hooks and tried to merge them into a proper repo, retaining the features and the Python 3.6 compatibility (wasn't easy, but Pagure is currently running on Python 3.6), and adding some unit tests and QA tools at the same time.
I've also written the schemas required by Part 2 in another repo.
I don't think we want to deploy code directly from Github on pkgs01 and batcave, so I had those two be packaged into RPMs by Packit into a Copr repo: https://copr.fedorainfracloud.org/coprs/abompard/fedora-messaging-git-hook/.
I'm going to rebuild the SRPMs from this repo into Koji's infra tag each time there's an update in the code even if it's an extra step because this is pretty sensitive code, running on batcave and dist-git on each commit and having full access to the repos. Or do you think it's not necessary?
I'll try on staging today and hopefully it'll work out fine enough. We can work on the consumer (Part 3) in parallel.
This all seems kinda complex when it could just send email from the hook, but makes sense. :(
one thing I am a bit worried at with this and toddlers is that it will get a heavy processing flow... if we have a bunch of things in toddlers we need to make sure a problem with one toddler doesn't cause all of them to stop processing... or slow down.
Agreed, if the hook has no other use than sending an email to scm-list, then it's very overkill. But I think we want a fedora-messaging message to be sent when a commit is received nonetheless, so that people can get those from FMN, have it be recorded in datanommer, etc.
Good point, I haven't looked at Toddler's code, but I would bet that processing of a message starts when the processing of the previous message has finished. So one slow toddler will slow down the whole processing. We should however be able to run multiple toddlers pods in parallel, and they would not be waiting on each other.
One more thing: Pagure sends a message on each push, so for dist-git we actually have two messages from the same action. Not a big deal, but maybe a bit superfluous.
We still need this git hook for the batcave repos (such as ansible), though.
toddlers is actually very good at scaling horizontally. I've had times where it
was stuck due to messages not being in the expected format and the toddler was
thus crashing. I just bumped the number of pods to 50 and let it seat over the
week-end and waited for the next week to make the code change that allowed the
toddler to handle these messages.
So if you're worried about processing being slow, just increase the number of
pods.
toddlers is actually very good at scaling horizontally. I've had times where it
was stuck due to messages not being in the expected format and the toddler was
thus crashing. I just bumped the number of pods to 50 and let it seat over the
week-end and waited for the next week to make the code change that allowed the
toddler to handle these messages.
So if you're worried about processing being slow, just increase the number of
pods.
@abompard Any news here. ;( it's been down a while now... makes me sad. ;(
Metadata Update from @abompard:
Writing a toddler is still up for grabs for anyone who wants to learn how to do that.
That said, no one wants a sad Kevin, so I'll have a look hopefully next week.
@abompard any news here? The lack of emails... so sad. ;)
Got bogged down by mirrormanager, sorry.
I’ll take a stab at the toddler in fedora-infra/toddlers#183.
The new
distgit_commit_processoris merged, but needs new configuration to be merged in Ansible and deployed before it can be tested in staging.@zlopez thanks for the review!
@kevin I would deploy the changes myself, but I don’t think I’ve ever deployed on our OpenShift before, and I’m not sure if there’s anything I need to keep in mind (compared to non-OpenShift playbooks). Also, no idea how to test the change, for largely the same reason. 😉
@nphilipp The playbooks are being run the same way, you just need to check how the build and deployment finished in openshift.
Yeah... for openshift apps ansible runs and templates things to os-control01 or os-control01.stg (or both) and then runs a 'oc apply -f ...' with some validation to make the thing exist in openshift.
Then use the normal console or oc to debug and such.
Testing something like this is kinda hard. We could deploy to staging, but there's not much traffic there, although I suppose doing a commit to a package on src.stg should result in a commit email going out?
@nphilipp whats the state of things here? I think the toddler was deployed, but had issues and was disabled?
Can we get this over the finish line?
Any news here?
The work on the toddler is still in progress. @nphilipp is working on it. The related ticket in toddlers is here https://pagure.io/fedora-infra/toddlers/issue/183, but the deployed version have to be disabled for now as it caused errors.
Metadata Update from @abompard:
Hey, any news here?
Sad that this isn't working for so long.
@nphilipp is currently helping on forgejo, so I'm not sure when he will have time to continue working on this.
@nphilipp Did you had time to look at this?
One idea I had was instead of making a toddler that sent emails to the list, we use public-inbox ( basically a git repo for messages with some stuff on top). That way we could just have the toddler commit directly to that public-inbox, then we could expose it to the world for interested parties to look at/use.
I've not looked at it in a while tho, so I could be wrong that it will work for this... but might be worth exploring.
im currently trying to make something with the public-inbox idea
assigning this to myself for now, will post updates
Did you get anywhere with this @smoliicek? Anything we can do to help?
i was trying to setup the public-inbox thing in my local dev enviroment, with no luck... and then i forgot about this, sorry :(
i can try to spin it up once more, if that doesn't work i will look onto fixing the current setup
one question with this - if public-inbox would be running in our infra, should it run:
will get on this ASAP
I'd say ideally a openshift pod/project? We could use nfs storage...
i filed #13372 for a communishift namespace, will try to spin it up there
The POC is currently running in communishift and is exposing it's route here: https://public-inbox-communishift-public-inbox-poc.apps.fedora.cj14.p1.openshiftapps.com/
please check it out!
do note, that due to development, i pretty frequently wipe it's data directory
Recapping our Matrix convo today:
I have some concerns about how this solution would pan out long-term. Namely, we had almost exactly 500k git commits in 2025, which is a lot of objects to have in one git repo if you're running this for several years. That might eventually become a UX or performance problem. If there is a "better" solution, that would depend on what the packagers actually need.
Kevin mentioned some offline / historical analytics, which FDWG can provide very well, so I thought we should compare notes.
Use cases
@kevin chimed in with two main categories:
Use case
#1: Queries / Analytics / AuditingAll of these things can be provided for today via FDWG, either in "download some data" mode or "query live data" mode. We'd be happy to tailor things to improve UX for packagers.
Questions
The main question here is: what does "easily" mean to packagers? If you're downloading data (in parquet format), DuckDB provides 3 ways to use it: a CLI SQL interface, a GUI SQL interface, and a python library. Would that work? (FYI, if Python is your primary method, there are many many ways to process parquet besides DuckDB if you want to make things harder on yourself for some reason :) )
We also have some (limited but growing) ability to create dashboards and fancy graphs, if you're looking for more aggregate-type info.
Use case
#2: AlertsQuestions
Same question as above: what does "easily" mean to packagers?
git pull)?I'll be honest, the alerting use case sounds like, "Use FMN", but again I don't know what packagers need.
https://discussion.fedoraproject.org/t/the-future-plans-for-the-scm-commits-mailing-list/193068 posted for discussing this. ;)