Feat: CPF Merge - #703
Conversation
isc-kiyer
left a comment
There was a problem hiding this comment.
@isc-shuliu I know this is still a draft but was curious so took a look and left a few comments
|
HSDevOps was discussing today and along the lines of #633, we want to make sure that it is possible for HS to merge CPF resources only during deployment (and not during build-time). In both cases, we call zpm "load" or zpm "install", which means in both cases the initialize phase would run and merge the file. We had spoken about a CustomScope attribute in #633 but another option is to support just running the merge during a CustomPhase. @isc-shuliu @isc-tleavitt Thoughts on supporting this instead of adding the initialize lifecycle phase? And my apologies for not thinking of this before you implemented it, Shuheng! Update after Keshav reminded me of an important use case: we still want the CPF merge file to be merged by default during the initialize phase but would also like to additionally support it being merged during a custom phase. |
|
@isc-eneil
|
@isc-tleavitt When would it break compatibility? Is it only when running |
isc-kiyer
left a comment
There was a problem hiding this comment.
@isc-shuliu Looks great! Few questions/comments
|
@isc-shuliu I left just a couple of comments but it looks good to me too! |
isc-kiyer
left a comment
There was a problem hiding this comment.
@isc-shuliu few more small comments/thoughts
isc-kiyer
left a comment
There was a problem hiding this comment.
@isc-shuliu one very minor comment. Approving
| If $IsObject(tProcessor) && tProcessor.%Extends("%IPM.ResourceProcessor.CustomPhaseMixin") { | ||
| Set cp = tProcessor.CustomPhase | ||
| If cp '= "" { | ||
| Set pPhases($$$lcase(cp)) = cp |
There was a problem hiding this comment.
@isc-shuliu Apologies for the late review on this.
Should there be an additional check to make sure the custom phase hasn't already been added (since an Invoke and a CPF resource could technically give the same custom phase)?
cc @isc-kiyer
Implement #631