Skip to content

Make package part of publish #770

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

Merged
merged 7 commits into from
Mar 31, 2025

Conversation

isc-shuliu
Copy link
Contributor

Catch up fix to #767; Implement #769

With this change, %Package is part of %Publish and will be called during publish <module> -only. This allows publishing the package without running %Reload phase.

@isc-shuliu isc-shuliu linked an issue Mar 25, 2025 that may be closed by this pull request
Copy link
Collaborator

@isc-kiyer isc-kiyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@isc-shuliu just one small note

@isc-shuliu isc-shuliu requested a review from isc-kiyer March 26, 2025 01:50
@@ -1296,6 +1296,12 @@ Method %Publish(ByRef pParams) As %Status
{
Set tSC = $$$OK
Try {
// Perform the "Package" phase to prepare the module for publishing
// ..Payload is populated by %Package. So need to make sure it's using the same lifecycle object.
Set pParams("LifecycleObject") = $This
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: for multiple phases of a single module, is the lifecycle class not provided in pParams? I understand it isn't for dependencies (and that makes sense) but across ExecutePhases(), it would be passed right?

Copy link
Contributor Author

@isc-shuliu isc-shuliu Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lifecycle is passed in as a string (name of the class or a path on filesystem) in pParams("Lifecycle"). Here we really need to use the same lifecycle object because %Package will write to the ..Payload of the same object and %Publish read from it.

The ..Lifecycle property is transient and created using %New() in %IPM.Storage.Module:LifecycleGet(). Somehow the r%Lifecycle in LifeCycleGet is null when called from %DispatchMethod(), causing the getter method to create a new lifecycle object.

Copy link
Collaborator

@isc-kiyer isc-kiyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@isc-shuliu looks good! Just one question but approving

@isc-tleavitt isc-tleavitt merged commit 0ef6f12 into v0.10.x Mar 31, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run %Package as part of %Publish Lifecycle Phase Support publishing an artifact/manifest pair as an independent action
3 participants