[JIRA] (JENKINS-59318) fill in user-agent with something specific to github-branch-source-plugin

0 views
Skip to first unread message

jsoref+jenkins@gmail.com (JIRA)

unread,
Sep 11, 2019, 12:23:02 PM9/11/19
to jenkinsc...@googlegroups.com
Josh Soref created an issue
 
Jenkins / Improvement JENKINS-59318
fill in user-agent with something specific to github-branch-source-plugin
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: github-branch-source-plugin
Created: 2019-09-11 16:22
Priority: Minor Minor
Reporter: Josh Soref

There are lots of things that use OkHttp.

OkHttp okhttp#1063 provides a default user-agent, but that does make it easy to figure out what is (ab)using quotas.

It's traditional for clients of libraries to fill in their own useragent (typically embedding their underlying agent w/in the field).

For a general sense of how user-agents are written, please see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox

In general, basically the syntax is:

TokenA/1.1 (platform; information; ...) TokenB/2.3 ... 

The GitHub.com folks reported that the majority of my quota was spent by:

okhttp/2.7.5 

But I can't easily tell if that's:

  1. Some Scala code
  2. Sbt
  3. This jenkins plugin
  4. Some other jenkins plugin

Ideally, the user-agent would be something like:

github-branch-source-plugin/2.5.7 okhttp/2.7.5

If you expect to have issues involving the java version, then including the java version in the UA could be useful...

To get the okhttp version one can do something like:

import com.squareup.okhttp.internal.Version;
Version.userAgent(); 
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

bitwiseman@gmail.com (JIRA)

unread,
Feb 10, 2020, 7:27:02 PM2/10/20
to jenkinsc...@googlegroups.com
Liam Newman commented on Improvement JENKINS-59318
 
Re: fill in user-agent with something specific to github-branch-source-plugin

Josh Soref Totally support this being done. It might require some update to github-api library which you're already familiar with.

Reply all
Reply to author
Forward
0 new messages