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

Issue 5287- Endpoints to get the md5 hash of the original model file #5328

Merged
merged 20 commits into from
Jan 21, 2025

Conversation

Bogdan-Crn
Copy link

@Bogdan-Crn Bogdan-Crn commented Dec 31, 2024

This fixes #5287

Description

  • Created endpoint for containers to allow retrieval of the MD5 data for the container
  • Created endpoint for federations to allow retrieval of the MD5 data for all the containers in the federation that the user has access to
  • Created a new function in FileRefs to update a specific .ref file, this is to allow the caching of MD5 hashes for future reference

Test cases

  • Unit tests for containers getting the MD5 data, first time the database should not have the MD5Hash property and the second time the system should have set it in the db
  • Unit tests for federation getting the MD5 data, similar to above
  • Unit test for the FileRefs new function
  • E2E tests for containers and federations testing scenarios where the user has different levels of rights

@Bogdan-Crn Bogdan-Crn marked this pull request as ready for review January 3, 2025 09:56
@carmenfan carmenfan self-requested a review January 3, 2025 15:13
@carmenfan carmenfan self-assigned this Jan 3, 2025
@carmenfan carmenfan changed the title Issue 5287 Issue 5287- Endpoints to get the md5 hash of the original model file Jan 7, 2025
@Bogdan-Crn
Copy link
Author

Bogdan-Crn commented Jan 15, 2025

  • Moved most of the modelList logic to the filesManager.
  • Updated the federation check to see if the user has access to the container.
  • Updated what happens if the federation is empty.
  • Updated the tests to contain generateRandomString() where necessary.

@Bogdan-Crn Bogdan-Crn requested a review from carmenfan January 15, 2025 12:35
Copy link
Member

@carmenfan carmenfan left a comment

Choose a reason for hiding this comment

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

Looking good, just a few minor comments 😆

backend/src/v5/services/filesManager.js Outdated Show resolved Hide resolved
backend/src/v5/services/filesManager.js Outdated Show resolved Hide resolved
@carmenfan carmenfan self-requested a review January 21, 2025 14:04
@carmenfan carmenfan merged commit 5beeb9e into staging Jan 21, 2025
15 of 16 checks passed
@carmenfan carmenfan deleted the ISSUE_5287 branch January 21, 2025 15:21
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.

2 participants