Skip to content
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

Last plugin release date tracker probe #428

Open
AayushSaini101 opened this issue Dec 30, 2023 · 1 comment
Open

Last plugin release date tracker probe #428

AayushSaini101 opened this issue Dec 30, 2023 · 1 comment
Labels
enhancement New feature or request probe Related to probe implementation

Comments

@AayushSaini101
Copy link
Contributor

AayushSaini101 commented Dec 30, 2023

Description

We need to add a new probe that helps track the release status of the plugin, and how frequently the plugin is released.

Importance:

  • Help the Stakeholders to know How long it will take as on average to resolve their issues.
  • Time will the difference between the release of the plugin
@AayushSaini101 AayushSaini101 added enhancement New feature or request probe Related to probe implementation labels Dec 30, 2023
@alecharp
Copy link
Collaborator

alecharp commented Jan 8, 2024

I don't really think this would produce reliable data because:

  • a new maintainer can start to work on a previously abandonned plugin and the average of that plugin would to 10 times the reality
  • and the opposite is also true when a maintainer has not enough time to work on a plugin.

This is something we already introduced with

new TimeSinceLastCommitScoringComponent() {
@Override
public String getDescription() {
return "There must be a reasonable time gap between last release and last commit.";
}
@Override
public ScoringComponentResult getScore(Plugin plugin, Map<String, ProbeResult> probeResults) {
final ProbeResult probeResult = probeResults.get(LastCommitDateProbe.KEY);
if (probeResult == null || ProbeResult.Status.ERROR.equals(probeResult.status())) {
return new ScoringComponentResult(-100, 100, List.of("Cannot determine the last commit date."));
}
final long days = getTimeBetweenLastCommitAndDate(probeResult.message(), plugin.getReleaseTimestamp().withZoneSameInstant(getZone())).toDays();
final String defaultReason = "There are %d days between last release and last commit.".formatted(days);
if (days < Duration.of(30 * 6, ChronoUnit.DAYS).toDays()) {
return new ScoringComponentResult(100, getWeight(), List.of(defaultReason, "Less than 6 months gap between last release and last commit."));
}
if (days < Duration.of((30 * 12) + 1, ChronoUnit.DAYS).toDays()) {
return new ScoringComponentResult(60, getWeight(), List.of(defaultReason, "Less than a year between last release and last commit."));
}
if (days < Duration.of((30 * 12 * 2) + 1, ChronoUnit.DAYS).toDays()) {
return new ScoringComponentResult(20, getWeight(), List.of(defaultReason, "Less than 2 years between last release and last commit."));
}
if (days < Duration.of((30 * 12 * 4) + 1, ChronoUnit.DAYS).toDays()) {
return new ScoringComponentResult(10, 2, List.of(defaultReason, "Less than 4 years between last release and last commit."));
}
return new ScoringComponentResult(-1000, getWeight(), List.of("There is more than 4 years between the last release and the last commit."));
}
}
and it can be gamified (which is bad) or largely invalid.

@alecharp alecharp added the gsoc Do not take / work on GSoC tickets outside of GSoC context. label Mar 4, 2024
@alecharp alecharp removed the gsoc Do not take / work on GSoC tickets outside of GSoC context. label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request probe Related to probe implementation
Projects
None yet
Development

No branches or pull requests

2 participants