-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[nv16] flexible bundle loading #8666
Conversation
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.
Having to modify your bundle.toml
to specify an envvar which in turn is going to override any other setting seems like a circuitous way of doing things. It also defeats the one of the purposes, which is being able to check out the Lotus repo as-is (or download a pre-built binary) and make it use locally built bundles instead without any changes in sources.
@@ -6,7 +6,7 @@ The bundles are specified in build/bundles.toml using the following syntax: | |||
```toml | |||
[[bundles]] | |||
version = X # actors version | |||
release = tag # release gag | |||
release = tag # release tag |
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.
Can we add examples of how to use path / envvar / url here
node/bundle/manifest.go
Outdated
// this is a local bundle, specified by an env var to load from the filesystem | ||
path := os.Getenv(bd.EnvVar) | ||
if path == "" { | ||
return xerrors.Errorf("bundle envvar is empty: %s", bd.EnvVar) |
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 could just fallthrough in this case, but if the EnvVar
field is set, but there's no value provided user is probably just doing something wrong. Up to you.
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.
Suggestion is to remove EnvVar
and instead use predefined env var templates:
LOTUS_ACTORS_[ActorVersion]_BUNDLE_PATH
e.g.
LOTUS_ACTORS_V8_BUNDLE_PATH=<path>
ok fine. |
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.
Having to modify your bundle.toml
to specify an envvar which in turn is going to override any other setting seems like a circuitous way of doing things. It also defeats the one of the purposes, which is being able to check out the Lotus repo as-is (or download a pre-built binary) and make it use locally built bundles instead without any changes in sources.
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.
All of this is growing organically at a very rapid rate and I think we're going to have to clean up some of this later, but it's not a big deal because this is all "private" and not exposed over APIs or intended for users to depend on.
build/bundle.go
Outdated
Path map[string]string | ||
// URL is the (optional) bundle URL; takes precdence over github release | ||
URL string | ||
// CHecksum is the bundle sha256 checksume in hex, when specifying a URL. | ||
Checksum string | ||
URL map[string]BundleURL |
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.
I'd pluralize these field names.
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.
maybe, I kind of prefer singular here; but i don't feel strongly either way.
Yeah, let's get to its final "works really well" phase, and we can do some cleanup. |
@raulk Strong agree, there is definitely a round of cleanup that needs to happen -- ultimately these bundles are gonna be "never changing" things (except for devs and network upgrades), so something much more static will work. |
On top of #8658.
Adds flexibility for bundle fetching, which can use an env var or explicit URL to avoid downloading from github.
cc @travisperson