Skip to content

Incorporate python-tuf v0.14 into the interoperability test suite - #122

Closed
erickt wants to merge 3 commits into
theupdateframework:masterfrom
erickt:python-tuf
Closed

erickt wants to merge 3 commits into
theupdateframework:masterfrom
erickt:python-tuf

Conversation

@erickt

@erickt erickt commented Sep 28, 2020

Copy link
Copy Markdown
Contributor

This is a stack of patches that includes the latest published python-tuf into go-tuf's interopability test suite. This is to make sure that go-tuf can parse the metadata produced by python-tuf. It's split into 3 patches, to make it easier to review. The first, adds a generator script that produces the metadata in the second patch. Finally, the third incorporates this metadata into the test suite.

This is the first step towards incorporating python-tuf v0.14 into the
compatibility test suite. It performs the same interop tests as the
go-tuf change, but python-tuf doesn't need to persist keys to disk, so
we don't need a step to explicitly filter out keys like we do for
go-tuf.

Change-Id: I9e1a9d69edb5f04d291392ace81958de94e410be
Change-Id: I5269b665e043a24a938cfaf1d62bfabba4b4d025
This verifies that go-tuf can parse metadata produced by python-tuf
0.14 through a series of key rotations.

Change-Id: I26fc38ff6b6f3b99a6315c21bfc0718b52f2466e
@trishankatdatadog

Copy link
Copy Markdown
Contributor

Hmm, test failed, why? 👀

@erickt
erickt marked this pull request as draft September 29, 2020 16:28
@erickt

erickt commented Sep 29, 2020

Copy link
Copy Markdown
Contributor Author

I'll do some investigation. I marked this as a draft PR so I can do some iteration on it.

@shibumi

shibumi commented Sep 29, 2020

Copy link
Copy Markdown
Contributor
Run go test -race -covermode atomic -coverprofile='profile.cov' ./...
go: downloading gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f
go: downloading github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e
go: downloading github.com/kr/text v0.1.0
ok  	github.com/theupdateframework/go-tuf	10.790s	coverage: 77.3% of statements
2020/09/28 22:35:22 generating /tmp/508640505
2020/09/28 22:35:22 generating /tmp/182601525

----------------------------------------------------------------------
FAIL: <autogenerated>:1: InteropSuite.TestPythonClientCompatibility

test case: python-tuf-v0.14 consistent-snapshot: false
step: 0
interop_test.go:168:
    c.Assert(err, IsNil)
... value client.ErrDownloadFailed = client.ErrDownloadFailed{File:"root.json", Err:util.ErrWrongVersion{Expected:0, Actual:1}} ("tuf: failed to download root.json: wrong version, expected 0 got 1")

OOPS: 33 passed, 1 FAILED

Looks like it's related to tuf-v0.14?

@shibumi

shibumi commented Sep 29, 2020 •

Copy link
Copy Markdown
Contributor

@erickt @trishankatdatadog is it possible that we need to change the tests for this PR? Right now we only pull the latest tuf python package: https://github.com/theupdateframework/go-tuf/blob/master/.github/workflows/build.yml#L23

    - name: Install Python dependencies
      run: |
        python -m pip install --upgrade iso8601 requests securesystemslib six tuf

EDIT: Ok the test installed python-tuf v14.0 as seen here:

Successfully installed certifi-2020.6.20 chardet-3.0.4 idna-2.10 iso8601-0.1.13 python-dateutil-2.8.1 requests-2.24.0 securesystemslib-0.16.0 six-1.15.0 tuf-0.14.0 urllib3-1.25.10

@mnm678

mnm678 commented Sep 10, 2021

Copy link
Copy Markdown
Collaborator

Closing due to python-tuf updates

@mnm678 mnm678 closed this Sep 10, 2021
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.

4 participants