-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
[JENKINS-70044] Add telemetry for activation of optional permissions #7342
Conversation
@Override | ||
public LocalDate getStart() { | ||
return LocalDate.of(2022, 11, 1); | ||
} | ||
|
||
@Override | ||
public LocalDate getEnd() { | ||
return LocalDate.of(2023, 3, 1); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what dates make the most sense. I set the start to 2022-11-01 to facilitate testing. Depending on whether we can backport this and what the LTS schedule is like, maybe 2023-02-01
could be a more conservative end date, but my concern is that many users will refrain from updating during the holiday season and so December and January data will be sparse and perhaps non-representative of the overall userbase.
core/src/main/resources/jenkins/telemetry/impl/OptionalPermissions/description.jelly
Outdated
Show resolved
Hide resolved
Some past examples I was involved with, basically everything has been backported into LTS: JENKINS-53768 backported initial telemetry infrastructure into 2.138.2 with I don't know whether there's been an "official" discussion on the topic of backporting eligibility of telemetry. In the initial JEP request for comments thread I wrote,
but there were no further responses on the topic (at least no active rejections of this). To me, the backporting requirement basically follows logically from the idea of keeping the collection period short, ideally just a few months to collect less data. Anything less than around 4-6 months or so given the would not result in a broad user base to collect from, making data less meaningful, while specifying very long durations to cover both LTS and weekly will result in the unnecessary collection of data from weekly users. We could specify dates several months into the future, but, aside from causing delays in the projects these collectors would support, that may also cause bugs in the implementation (and we've had those) to only be discovered months after the code has been added to all recent releases, both weekly and LTS, removing our ability to quickly react to regressions reported in weekly releases. And many past implementations collected data for just this short of a period, producing useful data during that time:
None of these would have been able to cover data from across the user base (i.e., including LTS) without a backport. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and seems to contain all of the disabled-by-default permissions.
Suggested docs change to make this accurate (we don't actually collect system properties).
core/src/main/resources/jenkins/telemetry/impl/OptionalPermissions/description.jelly
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me to backport this into 2.375.1 👍🏻
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
/label ready-for-merge This PR is now ready for merge. We will merge it after ~24 hours if there is no negative feedback. |
…enkinsci#7342) * [JENKINS-70044] Add telemetry for activation of optional permissions * [JENKINS-70044] Add description.jelly for OptionalPermissions telemetry collector * [JENKINS-70044] Improve phrasing in description.jelly Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> (cherry picked from commit 8b58686)
See JENKINS-70044.
Note that we would like to backport this change to the LTS. https://www.jenkins.io/download/lts/#backporting-process does not list telemetry explicitly, but otherwise we will have to set activation dates far into the future and then wait for this to be picked up by the next LTS baseline. I recall @daniel-beck mentioning that new telemetry collectors have been backported in the past, but I could not find any discussion of this from a very quick search on the developer mailing list.
Testing done
I tested this PR by replacing
Telemetry.ENDPOINT
with a link to https://webhook.site, then I calledExtensionList.lookupSingleton(jenkins.telemetry.impl.OptionalPermissions.class).run()
from the Jenkins script console and verified that the request showed up with the expected content. I then installedcredentials
andmanage-permission
from the Plugin Manager, reran the script, and verified that the credentials-related permissions were included in the payload and thathudson.model.Hudson.Manage
was now marked as being enabled.Sample payload
I did not add any automated tests.
TelemetryTest
already covers the overall behavior of theTelemetry
extension point. I can add a test that checks the output ofOptionalPermissions.createContent
if reviewers think that would be useful.Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
@Restricted
or have@since TODO
Javadocs, as appropriate.@Deprecated(since = "TODO")
or@Deprecated(forRemoval = true, since = "TODO")
, if applicable.eval
to ease future introduction of Content Security Policy (CSP) directives (see documentation).Desired reviewers
@mention
Maintainer checklist
Before the changes are marked as
ready-for-merge
:upgrade-guide-needed
label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidate
to be considered (see query).