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

DOCK-2442: Handle null version in Event #1854

Merged
merged 2 commits into from
Oct 19, 2023

Conversation

svonworl
Copy link
Contributor

@svonworl svonworl commented Oct 19, 2023

Description
In dockstore/dockstore#5697, in the webservice, we added a Hibernate NotFound annotation to make dangling Event versions gracefully resolve to null. This PR modifies the UI to gracefully handle said nulls by substituting some generic text where the detailed description of the version would have gone.

We don't know what kind of reference the null represented, so the most future-proof generic text would be "a version". However, all of the Events with existing versions point to tags, so for now, it's probably relatively safe, and definitely less generic, to instead say "a tag". This PR implements the latter.

webservice_test=# select distinct v.referenceType from event join workflowversion as v on event.versionid = v.id;
 referencetype 
---------------
 TAG
(1 row)

webservice_test=# select distinct v.referenceType from event join tag as v on event.versionid = v.id;
 referencetype 
---------------
 TAG
(1 row)

Review Instructions
Find a user with a recent ADD_VERSION_TO_ENTRY event and view their profile. In the database event table, set the versionid of the corresponding row to 0. Reload the profile, and confirm that the event now contains the generic text description of the version.

Issue
https://ucsc-cgl.atlassian.net/browse/DOCK-2442
dockstore/dockstore#5623

Security
No concerns.

Please make sure that you've checked the following before submitting your pull request. Thanks!

  • Check that your code compiles by running npm run build
  • Ensure that the PR targets the correct branch. Check the milestone or fix version of the ticket.
  • If this is the first time you're submitting a PR or even if you just need a refresher, consider reviewing our style guide
  • Do not bypass Angular sanitization (bypassSecurityTrustHtml, etc.), or justify why you need to do so
  • If displaying markdown, use the markdown-wrapper component, which does extra sanitization
  • Do not use cookies, although this may change in the future
  • Run npm audit and ensure you are not introducing new vulnerabilities
  • Do due diligence on new 3rd party libraries, checking for CVEs
  • Don't allow user-uploaded images to be served from the Dockstore domain
  • If this PR is for a user-facing feature, create and link a documentation ticket for this feature (usually in the same milestone as the linked issue). Style points if you create a documentation PR directly and link that instead.
  • Check whether this PR disables tests. If it legitimately needs to disable a test, create a new ticket to re-enable it in a specific milestone.

@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (31921a3) 40.41% compared to head (be20ad7) 40.49%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1854      +/-   ##
===========================================
+ Coverage    40.41%   40.49%   +0.08%     
===========================================
  Files          364      364              
  Lines        11261    11268       +7     
  Branches      2888     2891       +3     
===========================================
+ Hits          4551     4563      +12     
+ Misses        4411     4405       -6     
- Partials      2299     2300       +1     

see 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sonarcloud
Copy link

sonarcloud bot commented Oct 19, 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

No Coverage information No Coverage information
0.0% 0.0% Duplication

@svonworl svonworl merged commit 0cbefeb into develop Oct 19, 2023
19 of 20 checks passed
@svonworl svonworl deleted the feature/dock-2442/handle-null-event-version branch October 19, 2023 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants