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

feat: add checksum verification for downloaded models #1078

Merged
merged 6 commits into from
May 16, 2024

Conversation

lstocchi
Copy link
Contributor

What does this PR do?

It display an error if the downloaded model has a different sha than the expected value

Screenshot / video of UI

On the models page
error_sha_model

On the recipe page (it still shows the old error mesage with the double Something went wrong but it has been cleaned)
error_sha_recipe

What issues does this PR fix or reference?

it resolves #977

How to test this PR?

  1. change the sha value of a model in ai.json and download it. You should see an error

@lstocchi lstocchi marked this pull request as ready for review May 13, 2024 15:24
@lstocchi lstocchi requested review from benoitf and a team as code owners May 13, 2024 15:24
@lstocchi lstocchi requested a review from feloy May 13, 2024 15:24
@lstocchi
Copy link
Contributor Author

Rebased. Ready to be reviewed.

Copy link
Contributor

@feloy feloy left a comment

Choose a reason for hiding this comment

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

works as expected (on mac)

Copy link
Contributor

@jeffmaury jeffmaury left a comment

Choose a reason for hiding this comment

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

PACKAGING-GUIDE.MD should be updated

packages/backend/src/assets/ai.json Outdated Show resolved Hide resolved
@lstocchi
Copy link
Contributor Author

@jeffmaury updated

@lstocchi lstocchi requested a review from axel7083 May 14, 2024 14:14
@lstocchi
Copy link
Contributor Author

lstocchi commented May 15, 2024

Moved the error displayed on the top as suggested by @axel7083 . TBH i preferred the error on the row as it was in line with desktop but as we rely on the top banner for showing the download in progress it makes sense to show it there.

Updated the gif on the first post

@lstocchi lstocchi requested a review from axel7083 May 15, 2024 09:18
yarn.lock Outdated Show resolved Hide resolved
Copy link
Contributor

@axel7083 axel7083 left a comment

Choose a reason for hiding this comment

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

Except the yarn.lock change LGTM, great job

@lstocchi lstocchi requested a review from axel7083 May 15, 2024 09:52
Copy link
Contributor

@axel7083 axel7083 left a comment

Choose a reason for hiding this comment

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

Thanks for all changes, great work! 🚀

@lstocchi
Copy link
Contributor Author

@jeffmaury if it's good for you, it can be merged. Give it a look when you have time

Copy link
Contributor

@jeffmaury jeffmaury left a comment

Choose a reason for hiding this comment

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

LGTM. Maybe in the documentation we may indicate that the field is optional and should be HEX encoded

Signed-off-by: lstocchi <[email protected]>
@lstocchi lstocchi enabled auto-merge (squash) May 16, 2024 08:12
@lstocchi lstocchi merged commit e22af21 into containers:main May 16, 2024
4 checks passed
@lstocchi lstocchi deleted the i977 branch May 16, 2024 08:46
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.

add checksum verification for downloaded models
4 participants