Repository navigation
Documentation: add asset generation using dependency graph doc - #105
Conversation
There was a problem hiding this comment.
And this paragraph is sounding a lot like Make, Bazel, Terraform, etc. ;)
mini version of these :)
There was a problem hiding this comment.
The asset is an map of all the assets...
This reads a bit awkwardly (one asset containing many?). Maybe just drop this last sentence?
There was a problem hiding this comment.
This feels like a Merkle DAGs. Maybe our state structure should just be a DAG? That would build dependencies into the structure directly. I'm sure there are many off-the-shelf Merkle DAG libraries in Go (here's one), but rolling our own for this special case will probably not be hard either. Something like:
type State struct {
Objects map[string]Asset // store for all the assets
Root string // hash for the root asset
}
type Asset struct {
Parents []string // hashes for our parents
Name string
Path string // is this really important? I'd have expected we can just use `Name` for this.
Data []byte
}2546430 to
86503b4
Compare
There was a problem hiding this comment.
I thought we decided that we gonna just throw our hands?
There was a problem hiding this comment.
That's still an valid outcome.
There was a problem hiding this comment.
Shouldn't the parent include everything but the final targets ?
I would expect some tree-list structure, besides how is this struct related to the Assets struct below?
I was thinking something like:
type State struct {
Assets []Asset; // Final leaf assets
}
type Asset struct {
Name string
Parents []Asset
Dirty bool
Hash string
Data []byte
...
}There was a problem hiding this comment.
The state object is an hashmap containing all the assets, not just the final. Each asset will use this object to fetch its dependencies.
|
@abhinavdahiya The description lgtm, but I have questions on the type definition. |
|
Discussed with @abhinavdahiya , agree on the definition of the struct in this doc, just waiting on some fix of the naming. |
86503b4 to
8ca6932
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, yifan-gu The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
|
||
| // AssetState is the state of an Asset. | ||
| type AssetState struct { | ||
| Parents maps[string]string // hashes for our each parent. |
Attempt to remove warnings for "unused" TF variables
No description provided.