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

Fix comparison view not working in local mode #1038

Merged
merged 8 commits into from
May 9, 2023

Conversation

Kr0nox
Copy link
Member

@Kr0nox Kr0nox commented Apr 24, 2023

The comparison view of the report viewer was broken when using local mode.
To fix this I added the file submissionFileIndex.json file, which stores a map of submission IDs to all their submitted files, which now gets read when opening the comparison view.
I also updated the wikis page about the report generation accordingly.

@tsaglam tsaglam added bug Issue/PR that involves a bug minor Minor issue/feature/contribution/change report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies labels Apr 25, 2023
Copy link
Contributor

@TwoOfTwelve TwoOfTwelve left a comment

Choose a reason for hiding this comment

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

Other than the one comment, I think this looks good.

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

92.3% 92.3% Coverage
0.0% 0.0% Duplication

return Path.of(submissionToIdFunction.apply(submission), submissionToIdFunction.apply(submission)).toString();
}
return Path.of(submissionToIdFunction.apply(submission), submission.getRoot().toPath().relativize(file.toPath()).toString()).toString();
return new Match(FilePathUtil.getRelativeSubmissionPath(startOfFirst.getFile(), comparison.firstSubmission(), submissionToIdFunction),
Copy link
Member

@sebinside sebinside May 9, 2023

Choose a reason for hiding this comment

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

This return really isn't that readable, and neither was the original one.
That's the only thing I found in my static code review, I will perform some runtime tests later.

@sebinside
Copy link
Member

I successfully tested the following:

  • ✅ A real-world data set in online mode
  • ✅ A real-world data set in local mode
  • ✅ A real-world data set in a deployed report viewer
  • ✅ An old result.zip in online mode (backward-compatible, as expected)
  • ✅ Name collision in file names
  • ✅ Name collision in submission names
  • ✅ Name collision in root directory names

@sebinside sebinside merged commit 2cbed97 into develop May 9, 2023
@sebinside sebinside deleted the bug/report-viewer-local-comparison-view branch May 9, 2023 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue/PR that involves a bug minor Minor issue/feature/contribution/change report-viewer PR / Issue deals (partly) with the report viewer and thus involves web-dev technologies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants