-
Notifications
You must be signed in to change notification settings - Fork 1k
PEP 740 persistence, take 3 #16624
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
PEP 740 persistence, take 3 #16624
Conversation
This is a breakout from pypi#16624, to reduce the complexity/headache of zippered reverts. Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
I discussed the architectural challenges here a bit with @ewdurbin, and we came to the conclusion that the current scale/scope and expected volume doesn't warrant the complexity that's coming from the attestations feature needing to interact with object storage. Given that files can currently only have a single attestation, our current conclusion is that the DB should contain a In other words, the current data model of |
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Hm, I think I came to a slightly different mental model than you. I imagined immutable |
I messed around with this a bit, but it has the "lifecycle" problem that our earlier design (which avoided persisting provenance objects to artifact storage at all) had: the provenance object needs access to the uploading I'm halfway through rebasing this PR on top of #16625, which will hopefully make it a lot simpler and demonstrate how I think (I hope) we can still do mutability while sticking to only a single concrete DB-backed |
2212f56
to
02f1075
Compare
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
This reverts commit b6cf775. Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
e55495f
to
b71b8ed
Compare
warehouse/attestations/services.py
Outdated
def parse_attestations( | ||
self, request: Request, _distribution: Distribution | ||
) -> list[Attestation]: | ||
publisher: OIDCPublisher | None = request.oidc_publisher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FLAG: This test is performed in the IntegrityService but was not done here and adding it highlighted some issues.
This reverts commit f57a716.
Signed-off-by: William Woodruff <[email protected]>
* warehouse: PEP 740 models This is a breakout from #16624, to reduce the complexity/headache of zippered reverts. Signed-off-by: William Woodruff <[email protected]> * tests: AttestationFactory helper Signed-off-by: William Woodruff <[email protected]> * tests: attestation coverage Signed-off-by: William Woodruff <[email protected]> * switch to a Provenance model Signed-off-by: William Woodruff <[email protected]> * provenance model carries a digest Signed-off-by: William Woodruff <[email protected]> * remove unused factory Signed-off-by: William Woodruff <[email protected]> * use SHA-256 for provenance digest Signed-off-by: William Woodruff <[email protected]> * mark provenance column as deferred Signed-off-by: William Woodruff <[email protected]> * Add a ProvenanceFactory object and a simple test. * Revert "Add a ProvenanceFactory object and a simple test." This reverts commit 34ec661. * Update warehouse/packaging/models.py --------- Signed-off-by: William Woodruff <[email protected]> Co-authored-by: Alexis <[email protected]> Co-authored-by: Dustin Ingram <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Breakout from pypi#16624. Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Signed-off-by: William Woodruff <[email protected]>
Broken out from pypi#16624. Signed-off-by: William Woodruff <[email protected]>
Superseded by #16801. |
Broken out from pypi#16624. Signed-off-by: William Woodruff <[email protected]>
WIP.
Action plan:
This reverts commit b6cf775.