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

Add model signing unit test GitHub Actions #41

Closed
wants to merge 2 commits into from
Closed

Add model signing unit test GitHub Actions #41

wants to merge 2 commits into from

Conversation

mihaimaruseac
Copy link
Collaborator

No description provided.

@mihaimaruseac
Copy link
Collaborator Author

The token doesn't seem to be available when creating the PR to add the workflow, so that's why the CI fails.

https://github.com/mihaimaruseac/model-transparency/actions/runs/6628201742/job/18004764703 is the equivalent of this on my own fork (mihaimaruseac#2)

@laurentsimon
Copy link
Collaborator

Correct. We need to check how sigstore-python did it. iirc, they pre-generate some tokens every 15mn or so and put them in a bucket; then use these for the pre-submits. There's a lot of pre-submits we can add without signing zo, like unit tests for hashing, etc. Also, we will eventually need regression tests that ensure that previously-generated signatures can be verified by new versions of the verifier

@mihaimaruseac
Copy link
Collaborator Author

Yeah, I tried this as a quick way to check the dependabot PRs without needing to run manually or write longer unit tests. But probably it's better to revert to writing unit tests and running those instead.

@haydentherapper
Copy link
Collaborator

If we want to get something out, what about just having the tests run on merging to main and on demand so we can at least detect regressions?

@laurentsimon
Copy link
Collaborator

laurentsimon commented Oct 24, 2023

Can probably store a few signed models under a testdata folder and verify them on new PRs. At east that's test (1) the build / installation and (2) the verification.
Doing things on push works, but we need to handle automatic creation of issues when this fails, otherwise we won't know about the failures. It's do-able using something like https://github.com/slsa-framework/slsa-github-generator/blob/16fa37fa32d28bccf74a47327bcdfc4c47c47f5d/.github/workflows/e2e.upload-folder.schedule.yml#L174-L201 (need to create tags for labeling issues). I'm slightly worried about technical debt here. We're investing into something we're going to rip apart soon-ish. We're not changing the code atm, and the repo is clearly marked as experimental.
How about updating the pip dependencies for now and work on something similar to sigstore-python towards a proper v1 release (+ unit tests).

@mihaimaruseac
Copy link
Collaborator Author

That was my reasoning for sending the PR. We can also run locally (test model signing locally, run SLSA on own fork), but we'd probably still need a CI for dependency resolution to prevent #43

@laurentsimon
Copy link
Collaborator

So let's just test the installation then? Can be a pre-submit and is not throwaway work?

@mihaimaruseac
Copy link
Collaborator Author

How about updating the pip dependencies for now and work on something similar to sigstore-python towards a proper v1 release (+ unit tests).

Yeah, that's my impression after #43, we can just make a CI that tries to install the deps and if we think something might break further try to debug locally (like I just did for #37 and #32)

@mihaimaruseac
Copy link
Collaborator Author

So let's just test the installation then? Can be a pre-submit and is not throwaway work?

Yup, working on a PR for that

auto-merge was automatically disabled October 24, 2023 19:59

Pull request was closed

@mihaimaruseac mihaimaruseac deleted the add-model-signing-unit-test-gha branch October 24, 2023 20:00
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