Skip to content
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

_frontend/widget: Allow showing the CAS digest of built artifacts #1994

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kekun
Copy link

@Kekun Kekun commented Feb 14, 2025

This adds the artifact-cas-digest format string to the show command.

This is a first step implementing #1984.

  • Add tests, e.g. building an artifact and comparing the printed digest

@Kekun Kekun force-pushed the show-cas-digest branch 2 times, most recently from d2b2537 to 541cc9e Compare February 20, 2025 16:48
@Kekun Kekun changed the title _frontend/widget: Allow showing the CAS digest _frontend/widget: Allow showing the CAS digest of built artifacts Feb 28, 2025
This adds the artifact-cas-digest format string to the show command,
allowing to show the CAS digest of the built artifact.
@Kekun Kekun force-pushed the show-cas-digest branch from 1125a57 to 6bc0a07 Compare March 6, 2025 14:53
@Kekun
Copy link
Author

Kekun commented Mar 6, 2025

I added a test, it's probably not enough though…

@gtristan
Copy link
Contributor

gtristan commented Mar 6, 2025

I feel that cas-digest is too generic. This is actually the cas digest of the built artifact, we could (maybe not now, but in the future) have cas digests of other things (like the source code, or the buildtree if we have one)

I tend to agree, while the “CAS” is an implementation detail it’s fairly well known, I think I’d rather avoid exposing the word in APIs if we don’t already have it.

Also valid point about source caches.

let’s use another name, perhaps content-hash ? Maybe that doesn’t capture the implication that it is the artifact content… maybe output-hash or artifact-content-hash ?

Also, was this man page updated using the automated generation ? We should only update the command description in cli.py and use the python command to automatically update all the man pages and commit that as a separate commit… that command is documented… somewhere in our HACKING file(s)….

@Kekun
Copy link
Author

Kekun commented Mar 7, 2025

Isn't "hash" more technical than "digest" too (genuine question, I don't know)? What about just artifact-digest (or artifact-hash if you prefer)? Any reason to prefer "content"? I'll let you two decide the right words to use as you are the BuildStream specialists. :)

The man page what updated manually, I'll update it in a different commit then.

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.

3 participants