8000 Pydantic verification when inclusion promise is missing. · Issue #1383 · sigstore/sigstore-python · GitHub
[go: up one dir, main page]

Skip to content

Pydantic verification when inclusion promise is missing. #1383

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

Closed
ramonpetgrave64 opened this issue May 13, 2025 · 0 comments · Fixed by #1382
Closed

Pydantic verification when inclusion promise is missing. #1383

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

Comments

@ramonpetgrave64
Copy link
Contributor
ramonpetgrave64 commented May 13, 2025

Client support for Rekor V2: sigstore-python #289

Description

The inclusion_promise is meant to be optional in the TransparencyLogEntry, but the _to_rekor() method would explicitly set TransparencyLogEntry.inclusion_promise to None upon instantiation. Pydantic won't allow this.

 File "/usr/local/google/home/rpetgrave/src/ssp/sigstore-python/sigstore/models.py", line 262, in _to_rekor
   tlog_entry = rekor_v1.TransparencyLogEntry(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/usr/local/google/home/rpetgrave/src/ssp/.venv/lib/python3.12/site-packages/pydantic/_internal/_dataclasses.py", line 120, in __init__
   s.__pydantic_validator__.validate_python(ArgsKwargs(args, kwargs), self_instance=s)
pydantic_core._pydantic_core.ValidationError: 1 validation error for TransparencyLogEntry
inclusion_promise
 Input should be a dictionary or an instance of InclusionPromise [type=dataclass_type, input_value=None, input_type=NoneType]

Version

main @6937b05c3379fb6a3b23e47597a26e2cc72ababe

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