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

Restore compatiblity with junit-sql-storage #630

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

timja
Copy link
Member

@timja timja commented Jul 29, 2024

and some minor cleanup at the same time, bunch of unused variables mostly.

Also fixed clicking on builds in the charts, variable wasn't defined properly before

cc @mdealer

noticed in jenkinsci/junit-sql-storage-plugin#430
caused by #625

Testing done

manually tested both junit and junit-sql-storage

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@timja timja requested a review from a team as a code owner July 29, 2024 09:42
@timja timja added the bug label Jul 29, 2024
durationColor.put("value", duration);
if (to.isPassed() || (to.getPassCount() > 0 && to.getFailCount() == 0)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor behaviour change here but should be safe enough


public HistoryTestResultSummary(Run<?, ?> run, hudson.tasks.test.TestResult resultInRun,
public HistoryTestResultSummary(Run<?, ?> run,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was the critical change, adding resultInRun broke the plugin and I can't see a way to retrieve it there. The API could be modified to maybe pass some more info down but it didn't seem necessary the only additional information that is missing now is the id of the test report which could be stored maybe if required

@@ -476,7 +476,7 @@ public List<HistoryTestResultSummary> getHistorySummary(int offset) {
Job<?, ?> theJob = Jenkins.get().getItemByFullName(getJobName(), Job.class);
if (theJob != null) {
Run<?, ?> run = theJob.getBuildByNumber(buildNumber);
historyTestResultSummaries.add(new HistoryTestResultSummary(run, null, duration, failed, skipped, passed));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't have had null passed as it made the test run but if any one actually tried to access the history view they got null pointers

@timja timja enabled auto-merge (squash) July 29, 2024 09:45
@timja timja merged commit 310a78b into jenkinsci:master Jul 29, 2024
15 checks passed
@timja timja deleted the restore-compatibility branch July 29, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant