-
Notifications
You must be signed in to change notification settings - Fork 2
[ACIX-1061] Create BuildMetadata
class for keeping track of build artifact's metadata
#185
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
base: main
Are you sure you want to change the base?
Conversation
6456bbc
to
5d62a2e
Compare
1422caf
to
18538c1
Compare
5d62a2e
to
73a49be
Compare
f13089c
to
bb0d5ba
Compare
BuildMetadata
class for keeping track of build artifact's metadataBuildMetadata
class for keeping track of build artifact's metadata
6f62ef3
to
33e0775
Compare
528e48d
to
2100703
Compare
403ba8a
to
9b7c2cc
Compare
The metadata schema is based on the "Build UX" section of the "Future of Agent development" document from @ofek These `BuildMetadata` objects are meant to be serialized to a file and dropped along with the build artifact. Therefore it is important to make sure that they are frozen and can be nicely serialized to a file.
9b7c2cc
to
1075e38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
CFG = auto() # Configuration files tarball | ||
DOCKER = auto() # Docker container image | ||
|
||
def validate_for_type(self, artifact_type: ArtifactType) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes me think that we should rely more on type checking and have something like the concept of variants for each of the high-level types rather than a separate format enumeration.
raise ValueError(msg) | ||
|
||
@classmethod | ||
def this( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's pass everything required to the constructor instead.
…DOCKER` to `ArtifactFormat.OCI`
…ilename` This makes the "mostly static" part of the filename as long as possible (ordering fields by how likely they are to change)
2cdc866
to
67227fa
Compare
No description provided.