#1047 copr: set user-agent for builders
Closed 2 years ago by frostyx. Opened 2 years ago by frostyx.
fedora-infra/ frostyx/ansible copr-user-agent  into  main

@@ -45,3 +45,7 @@ 

  # bootstrap chroot is disabled by default, so we don't want to block

  # the build by this warning

  config_opts['dnf_warning'] = False

+ 

+ # Configure user-agent so we know what repositories were enabled, and what

+ # RPM packages were downloaded by builders, and don't count them into statistics

+ config_opts['user_agent'] = "CoprBuilder ({{ root }}; {{ target_arch }})"

Configure user-agent so we know what repositories were enabled, and what
RPM packages were downloaded by builders, and don't count them into statistics

@praiskup, I think this should do the trick.
I used the default value suggested by /usr/share/doc/mock/site-defaults.cfg and simply changed Mock for CoprBuilder. When testing this locally, my backend is logging the user-agent like this:

"CoprBuilder (fedora-35-x86_64-1651092528.976497; x86_64)"

What do you think? Do you prefer a different format?

Hm... this is what I mean, thank you. OTOH we seem to have a default user_agent
set in Mock ... so I'm curious if we actually don't want to exclude all the Mock
downloads?

You are right, I found accesses with user-agents like this

Mock%20(fedora-34-x86_64-bootstrap-1639109512.820094;%20x86_64)

so I'm curious if we actually don't want to exclude all the Mock downloads?

I think we want, so I am closing the PR.

Pull-Request has been closed by frostyx

2 years ago