Skip to content

Conversation

@juergbi
Copy link
Contributor

@juergbi juergbi commented Nov 14, 2025

  • _artifactcache.py: Fix presence checks of protobuf digest fields

    Python truth values can't be used for presence checks of embedded protobuf message fields. Use HasField() instead. This prevents passing invalid digests to the Remote Asset server.

    Fixes Artifact caching uploading empty/invalid referenced_directories #2090.

  • _artifactcache.py: Add public_data to list of referenced blobs

  • _artifactcache.py: Push and fetch sources
    The source digest is already stored in the artifact proto and added to the list of referenced directories if the buildtree is cached, however, the actual push and fetch was missing.

Python truth values can't be used for presence checks of embedded
protobuf message fields. Use `HasField()` instead. This prevents passing
invalid digests to the Remote Asset server.

Fixes #2090.
The source digest is already stored in the artifact proto and added to
the list of referenced directories if the buildtree is cached, however,
the actual push and fetch was missing.
@jerenkrantz
Copy link
Contributor

I have tested this PR locally and artifact pushes passes the buildgrid-asset validator checks and are able to be successfully served. (I checked both the periodic validation and the per-request validation upon expired/empty validation and both passed.)

Thanks!

Copy link
Contributor

@gtristan gtristan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Looks good to me !

@juergbi juergbi merged commit 828035e into master Nov 21, 2025
18 checks passed
@juergbi juergbi deleted the jbilleter/remoteasset branch November 21, 2025 09:31
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.

Artifact caching uploading empty/invalid referenced_directories

3 participants