jerenkrantz opened a new issue, #2090: URL: https://github.com/apache/buildstream/issues/2090
In attempting to troubleshoot [buildgrid-asset](https://gitlab.com/BuildGrid/buildgrid-asset) as a remote caching server with @juergbi on BuildTeamWorld Slack buildgrid channel, it appears that Buildstream is uploading empty/invalid referenced_directories. This causes `buildgrid-asset` validator to remove the asset elements as invalid. For `buildgrid-asset`, there is a periodic validator job and a validation step upon each fetch if the validation is stale. So, when a `bst artifact pull` comes from another client, the asset will not be returned. `referenced_directories` example from a compose element in asset schema of buildgrid-asset database: ``` {9fc09c192dc20701c0e327b055c78b3001544c50f0267b669963efb19721c615/848,/0,/0,/0} ``` A hacky workaround to confirm we're on the right track - it's probably better to check that it has elements rather than being empty: ``` diff --git a/src/buildstream/_artifactcache.py b/src/buildstream/_artifactcache.py index 9f4062449..78df8a9f1 100644 --- a/src/buildstream/_artifactcache.py +++ b/src/buildstream/_artifactcache.py @@ -359,12 +359,12 @@ class ArtifactCache(AssetCache): referenced_directories = [] if artifact_proto.files: referenced_directories.append(artifact_proto.files) - if artifact_proto.buildtree: - referenced_directories.append(artifact_proto.buildtree) - if artifact_proto.sources: - referenced_directories.append(artifact_proto.sources) - if artifact_proto.buildroot: - referenced_directories.append(artifact_proto.buildroot) + #if artifact_proto.buildtree: + # referenced_directories.append(artifact_proto.buildtree) + #if artifact_proto.sources: + # referenced_directories.append(artifact_proto.sources) + #if artifact_proto.buildroot: + # referenced_directories.append(artifact_proto.buildroot) if artifact_proto.buildsandbox: for subsandbox_digest in artifact_proto.buildsandbox.subsandbox_digests: referenced_directories.append(subsandbox_digest) ``` Slack thread: https://buildteamworld.slack.com/archives/CC9MKC203/p1761668655706849 Other fix required on the buildgrid-asset side for compatibility with buildstream: https://gitlab.com/BuildGrid/buildgrid-asset/-/merge_requests/21 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
