Automatic PR at framework after submodule PR
Looking at the issues on validation that we had recently, I think a new workflow for the PR is required. Here my proposal:
- PR on
submodulestrigger the creation of a PR onframeworkand the submodule hash is updated accordingly in framework. If the PR of the same branch already exist in framework with the same branch name it just commit the changes on the submodule hash. For instance, something similar is done at https://github.com/releasehub-com/github-action-create-pr-parent-submodule - PR can only be merged from
frameworkand it will automatically trigger thesubmodule, this can address this issue https://github.com/rest-for-physics/framework/issues/250 since some work has been done here https://github.com/rest-for-physics/framework/pull/259 - The pipeline validation will only run at
frameworkso we avoid to trigger the pipeline when a PR is performed in e.g. different submodules and in framework.
@jgalan and @lobis let me know what do you think since this is a lot of work.
- PR on
submodulestrigger the creation of a PR onframeworkand the submodule hash is updated accordingly in framework. If the PR of the same branch already exist in framework with the same branch name it just commit the changes on the submodule hash. For instance, something similar is done at https://github.com/releasehub-com/github-action-create-pr-parent-submodule
Then, each time we commit on the submodule a new commit will appear on the framework PR updating the submodule hash?
- PR can only be merged from
frameworkand it will automatically trigger thesubmodule, this can address this issue Automatize submodule PR if framework name matches with submodules #250 since some work has been done here New workflow frameworkPR for automatic submodule PR merging #259
As I understand once we press framework merge PR, it will trigger the merging of the PR at the corresponding submodules?
For me I think it could work. I just don't understand the technicalities about the implementation, but if that it is possible, just let me know how can I help on the transition.
Perhaps @nkx111 may have some comments too
We could update the PR submodule description to indicate how to proceed. I.e. explain that a new framework PR has been created automatically.
I understand we will then have a dedicated lml for each submodule inside the framework? E.g. axionlib_validation.yml ... restG4_validation.yml ... that will be launched independently?
We could update the PR submodule description to indicate how to proceed. I.e. explain that a new framework PR has been created automatically.
It is difficult to imagine all the users case, but some developers can create their own PR on framework and in a submodule. Rigth now the PR is only automatically created if the branch doesn't exist in framework, so developers should be responsible on creating their own PR if the framework branch is already present.
The message that will be displayed in case of automatic PR is:
--title 'Submodule Updates from ${{ inputs.submodule }} branch ${{ inputs.branch }}'
--body 'Automatic PR from ${{ inputs.submodule }} branch ${{ inputs.branch }}, related PR ${{ steps.PRCheck.outputs.prurl }}'
We could update the PR submodule description to indicate how to proceed. I.e. explain that a new framework PR has been created automatically.
This is possible but not straightforward, it is difficult to check if the message is present or not. Perhaps would be better to make all the developers aware of new PR workflow.
Anyhow, I will provide a proposal and we can iterate over it.
I understand we will then have a dedicated
lmlfor each submodule inside the framework? E.g.axionlib_validation.yml...restG4_validation.yml... that will be launched independently?
In principle, this is unchanged but we could think moving the submodule validation inside framework, but for me this is a different topic.