-
Notifications
You must be signed in to change notification settings - Fork 25
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
buildsys: generate kit metadata and create oci image #271
buildsys: generate kit metadata and create oci image #271
Conversation
44f89ac
to
81786a9
Compare
Cleaned up commits |
19ed67e
to
c6c7496
Compare
Adjust based off changes in external-kit-metadata.json |
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.
Looks like the local kit building test failed.
tools/buildsys/src/manifest.rs
Outdated
.context(error::CargoPackageMissingVendorSnafu { | ||
name: self.package.name.clone(), |
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.
We should create an issue, if we don't have one already, for deserializing these manifest metadata sections with Serde in a validating manner. We should catch these errors earlier.
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.
We should create an issue, if we don't have one already, for deserializing these manifest metadata sections with Serde in a validating manner. We should catch these errors earlier.
sdk: .[0].sdk, | ||
kit: ( | ||
[ .[1] | values[] | {name: ., version: "$VERSION_ID", vendor: "$VENDOR"}] | ||
+ [ .[0].kit[] | {name: .name, version: .version, vendor: .vendor } ] |
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.
Should kits also include the digest of their dependencies?
I suppose if they do, it would be difficult to "override" transitive dependencies during development, but it also seems like it would be surprising if the world shifted underneath you in a production setting.
This also wouldn't work for local kits.
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.
Should kits also include the digest of their dependencies?
🤔 I'm not sure, but I worry about making development too painful. Ideally all the digests would be captured in Cargo.lock
and we'd prefer to fetch by digest, so that tags could shift around until the moment they were published, and then after that any change would be detected and cause people to notice.
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.
Test failure
Unable to instantiate the builder: Failed to create build arguments due to an error reading external kit metadata: No such file or directory (os error 2)
Test failure should go away once fetch PR is merged and this is rebased |
c6c7496
to
d0eed51
Compare
679eb73
to
1304dd4
Compare
tools/buildsys/src/manifest.rs
Outdated
.context(error::CargoPackageMissingVendorSnafu { | ||
name: self.package.name.clone(), |
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.
We should create an issue, if we don't have one already, for deserializing these manifest metadata sections with Serde in a validating manner. We should catch these errors earlier.
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.
integ test change LGTM, it is basically going from this:
let project_path = project_dir.join("Twoliter.toml");
to this:
let project_path = project_dir.join("Twoliter.toml");
twoliter_update(&project_path).await;
twoliter_fetch(&project_path, arch).await;
1304dd4
to
4c8a738
Compare
4c8a738
to
0362885
Compare
c0d21d3
to
e248556
Compare
e248556
to
1948133
Compare
))] | ||
ExternalMetadataRead { source: std::io::Error }, | ||
|
||
#[snafu(display("Failed to serialize kit metadata: {source}"))] | ||
MetadataSerialize { source: serde_json::Error }, |
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.
nit: seems like these errors are no longer used.
Issue number: 255
Closes #255
Description of changes:
Testing done:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.