-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Updates publish
to USES_ENVIRONMENTS
#17313
Conversation
b2c1488
to
3e8587e
Compare
res = await Effect( | ||
InteractiveProcessResult, | ||
{pub.process: InteractiveProcess, local_environment.val: EnvironmentName}, | ||
) |
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.
It's likely that some publish
implementations will need to pin the construction of the actual publish command to use back to the local environment... because otherwise they might consume environment variables / etc to construct it "for" a remote environment?
i.e.: Do packaging/etc in some environment, but then construct a publish command for the local environment.
I'm not sure if that suggests that they should each need to figure out their own environment internally instead... but ... maybe?
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.
Isn't that what's going on here? The packaging request is using the environment that's needed to successfully construct the package, but the publish command is run locally.
packages = await MultiGet( | ||
Get(BuiltPackage, PackageFieldSet, field_set) for field_set in request.package_field_sets | ||
Get(BuiltPackage, EnvironmentAwarePackageRequest(field_set)) | ||
for field_set in request.package_field_sets |
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.
@stuhood this is where the package operation is potentially performed in a different environment.
{ | ||
field_set._request(packages): PublishRequest, | ||
local_environment.val: EnvironmentName, | ||
}, |
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.
@stuhood This is where the publish processes are constructed, pinned to the local environment.
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.
Yea, you're right! I forgot that PublishProcesses
doesn't actually do any of the building, and that that happens via BuiltPackage
.
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.
{ | ||
field_set._request(packages): PublishRequest, | ||
local_environment.val: EnvironmentName, | ||
}, |
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.
Yea, you're right! I forgot that PublishProcesses
doesn't actually do any of the building, and that that happens via BuiltPackage
.
This migrates
publish
to create theBuiltPackage
asset in a correct environment, and run thepublish
executable in the local environment.Also adds a helper rule,
EnvironmentAwarePackageRequest
, which consolidates theEnvironmentName
request andBuiltPackage
request, sinceBuiltPackage
is requested all over the place.See #17129.