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

Revert "Store attestations for PEP740 (#16302)" #16545

Merged
merged 3 commits into from
Aug 21, 2024
Merged

Revert "Store attestations for PEP740 (#16302)" #16545

merged 3 commits into from
Aug 21, 2024

Conversation

di
Copy link
Member

@di di commented Aug 21, 2024

This reverts commit 5545884.

@di di requested a review from a team as a code owner August 21, 2024 19:56
@di di enabled auto-merge (squash) August 21, 2024 20:00
@di di merged commit da7e1ed into main Aug 21, 2024
16 of 18 checks passed
@di di deleted the revert/16302 branch August 21, 2024 20:09
woodruffw added a commit to trail-of-forks/warehouse that referenced this pull request Aug 21, 2024
ewdurbin pushed a commit that referenced this pull request Sep 3, 2024
* Reapply "Store attestations for PEP740 (#16302)" (#16545)

This reverts commit da7e1ed.

* migrations: re-roll migration history

Signed-off-by: William Woodruff <william@trailofbits.com>

* config: register .attestations for inclusion

Signed-off-by: William Woodruff <william@trailofbits.com>

* attestations: request the appropriate IFileStorage service

IFileStorage requires a name to disambiguate it.

Signed-off-by: William Woodruff <william@trailofbits.com>

* conftest: add archive_files.path to get_app_config

Signed-off-by: William Woodruff <william@trailofbits.com>

* test, warehouse: remove problematic mocks

This removes two mocked `db_request`s from the simple
index tests. These mocks were masking larger architectural
issues with both attestations and our test scaffolding
for attestations.

This isn't quite complete yet, since it does a nasty thing
(uses a file storage with a tmpdir) to get IntegrityService
initialization working.

Signed-off-by: William Woodruff <william@trailofbits.com>

* test_services: rename test class

Signed-off-by: William Woodruff <william@trailofbits.com>

* Try to clean a bit the mess with the migrations.

* begin refactoring IntegrityService

This reduces the overall API surface for IIntegrityService implementers,
and adds an initial NullIntegrityService to make unit-level testing
simpler.

Signed-off-by: William Woodruff <william@trailofbits.com>

* Revert "Try to clean a bit the mess with the migrations."

This reverts commit e19be6c.

* tests, warehouse: more error tests, remove more stubs

Signed-off-by: William Woodruff <william@trailofbits.com>

* test_services: fix match

Signed-off-by: William Woodruff <william@trailofbits.com>

* remove more implicit file service deps

Signed-off-by: William Woodruff <william@trailofbits.com>

* continue to burn down coverage

Remove more ad-hoc stubs as well.

Signed-off-by: William Woodruff <william@trailofbits.com>

* full coverage

Signed-off-by: William Woodruff <william@trailofbits.com>

* test_simple: positive provenance test for /simple

Signed-off-by: William Woodruff <william@trailofbits.com>

* tests: minimize, increase confidence in behavior

Signed-off-by: William Woodruff <william@trailofbits.com>

* Update warehouse/config.py

Co-authored-by: dm <darkamaul@hotmail.fr>

* packaging/test_utils: remove another mock

Signed-off-by: William Woodruff <william@trailofbits.com>

* Remove even more mocks

* Update tests/conftest.py

Co-authored-by: William Woodruff <william@yossarian.net>

* Update test_create_service

* Add a functional test

* Linting

* Fixup migration

* Fix test error

* Revert change

* Apply suggestions from code review

Rename key

Co-authored-by: Dustin Ingram <di@users.noreply.github.com>

* Revert "Apply suggestions from code review
"

This reverts commit 52931a1.

* Give the IntegrityService access to the session

* Add the Attestation object to the session

* Update the functional test with more assertions

* Remove vestigial helper

* Update functional test

---------

Signed-off-by: William Woodruff <william@trailofbits.com>
Co-authored-by: Alexis <alexis.challande@trailofbits.com>
Co-authored-by: dm <darkamaul@hotmail.fr>
Co-authored-by: Dustin Ingram <di@users.noreply.github.com>
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