10000 CI: TSA tests silently failing · Issue #1405 · sigstore/sigstore-python · GitHub
[go: up one dir, main page]

Skip to content

CI: TSA tests silently failing #1405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact it 8000 s 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

Closed
ramonpetgrave64 opened this issue May 21, 2025 · 0 comments · Fixed by #1406
Closed

CI: TSA tests silently failing #1405

ramonpetgrave64 opened this issue May 21, 2025 · 0 comments · Fixed by #1406
Labels
bug Something isn't working

Comments

@ramonpetgrave64
Copy link
Contributor
ramonpetgrave64 commented May 21, 2025

Client support for Rekor V2: sigstore-python

Description

Now that we are using anew version of signing config, some of the existing tests we have still use the old format

@pytest.mark.timestamp_authority
class TestSignWithTSA:
@pytest.fixture
def sig_ctx(self, asset, tsa_url) -> SigningContext:
trust_config = ClientTrustConfig.from_json(
asset("tsa/trust_config.json").read_text()
)

"signing_config": {
"ca_url": "https://fulcio.sigstage.dev",
"tlog_urls": [
"https://rekor.sigstage.dev"
],
"tsa_urls": [
"placeholder-value"
]
}
}

and are now silently failing in CI because a pipe hides the exit status.

export TEST_SIGSTORE_TIMESTAMP_AUTHORITY_URL="http://localhost:3000/api/v1/timestamp"
# Ensure Timestamp Authority tests are not skipped by
# having pytest show skipped tests and verifying ours are running
make test TEST_ARGS="-m timestamp_authority -rs" | tee output

https://github.com/sigstore/sigstore-python/actions/runs/15146481891/job/42583296463#step:7:1072

_____________ ERROR at setup of TestSignWithTSA.test_sign_artifact _____________

self = <unit.test_sign.TestSignWithTSA object at 0x7f8097f814f0>
asset = <function asset.<locals>._asset at 0x7f8097bdd550>
tsa_url = 'http://localhost:3000/api/v1/timestamp'

    @pytest.fixture
    def sig_ctx(self, asset, tsa_url) -> SigningContext:
>       trust_config = ClientTrustConfig.from_json(
            asset("tsa/trust_config.json").read_text()
        )

test/unit/test_sign.py:182: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
sigstore/_internal/trust.py:575: in from_json
    inner = _ClientTrustConfig().from_json(raw)
env/lib/python3.9/site-packages/betterproto/__init__.py:1690: in from_json
    return self.from_dict(json.loads(value))
env/lib/python3.9/site-packages/betterproto/__init__.py:1630: in from_dict
    for field, value in self._from_dict_init(value).items():
env/lib/python3.9/site-packages/betterproto/__init__.py:1560: in _from_dict_init
    else sub_cls.from_dict(value)
env/lib/python3.9/site-packages/betterproto/__init__.py:1609: in from_dict
    self = cls(**cls._from_dict_init(value))
env/lib/python3.9/site-packages/betterproto/__init__.py:1558: in _from_dict_init
    [sub_cls.from_dict(item) for item in value]
env/lib/python3.9/site-packages/betterproto/__init__.py:1558: in <listcomp>
    [sub_cls.from_dict(item) for item in value]
env/lib/python3.9/site-packages/betterproto/__init__.py:1609: in from_dict
    self = cls(**cls._from_dict_init(value))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

cls = <class 'sigstore_protobuf_specs.dev.sigstore.trustroot.v1.Service'>
mapping = 'placeholder-value'

    @classmethod
    def _from_dict_init(cls, mapping: Mapping[str, Any]) -> Mapping[str, Any]:
        init_kwargs: Dict[str, Any] = {}
>       for key, value in mapping.items():
E       AttributeError: 'str' object has no attribute 'items'

env/lib/python3.9/site-packages/betterproto/__init__.py:1533: AttributeError

This test usually won't trigger locally, unless following extra steps that that workflow does, like providing a TSA url, and specially invoking pytest -m timestamp_authority.

Version

@main d4295dc

@ramonpetgrave64 ramonpetgrave64 added the bug Something isn't working label May 21, 2025
@ramonpetgrave64 ramonpetgrave64 changed the title CI: TSA tests failing CI: TSA tests silently failing May 21, 2025
@jku jku closed this as completed in #1406 May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant
0