You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This applies to repositories related to documentation components with several versions (bcd, bonita, test-toolkit) i.e not with a single branch (cloud, labs).
Today, we hard code the version in the event we sent. When initializing the content for a new version, the version must be updated in the event and sometimes it is not by mistake. This means that the event are sent with wrong information and the Netlify logs are not accurate. As we almost never check the workflow and the logs, it can take weeks before we detect the problem, and often, we discover it when we review the Netlify logs to troubleshoot an issue. This is too late and this can leads to wrong conclusions.
The push-content event is sent when a new push is done in the branch
The allowed branch for the push event triggering the workflow is hard coded in the workflow. It must match the actual branch where the workflow is stored. If the branch value in the workflow doesn't match the actual branch, the workflow doesn't run and the event is not sent.
Proposal
My proposal is that instead of hard coded the version in the event, we could deduced it from the branch that stores the definition of the workflow. This will work with both push and workflow_dispatch events. The information is available in the github context.
On new component version initialization, the event will be correct, but the allowed branch of the push event may be inaccurate. The event won't be sent until it is updated. At a given time, someone will notice that when they merge their PR in this branch, the change is not pushed to production.
We could store the whole logic in a shared action or in a reusable workflow as we plan to do for other workflows in #422. It will help updating all repositories and implement new features in the future like #228 and #275.
This may also help for #765.
To automatically retrieve the name of the branch in the documentation content repository, see #472 (comment)
In addition, to make the content propagation easier to do (merge), the workflow in the oldest supported version list all branches that are allow to trigger the dispatch_event.
Current problem
This applies to repositories related to documentation components with several versions (bcd, bonita, test-toolkit) i.e not with a single branch (cloud, labs).
Today, we hard code the version in the event we sent. When initializing the content for a new version, the version must be updated in the event and sometimes it is not by mistake. This means that the event are sent with wrong information and the Netlify logs are not accurate. As we almost never check the workflow and the logs, it can take weeks before we detect the problem, and often, we discover it when we review the Netlify logs to troubleshoot an issue. This is too late and this can leads to wrong conclusions.
The push-content event is sent when a new push is done in the branch
The allowed branch for the push event triggering the workflow is hard coded in the workflow. It must match the actual branch where the workflow is stored. If the branch value in the workflow doesn't match the actual branch, the workflow doesn't run and the event is not sent.
Proposal
My proposal is that instead of hard coded the version in the event, we could deduced it from the branch that stores the definition of the workflow. This will work with both
push
andworkflow_dispatch
events. The information is available in thegithub
context.On new component version initialization, the event will be correct, but the allowed branch of the push event may be inaccurate. The event won't be sent until it is updated. At a given time, someone will notice that when they merge their PR in this branch, the change is not pushed to production.
We could store the whole logic in a shared action or in a reusable workflow as we plan to do for other workflows in #422. It will help updating all repositories and implement new features in the future like #228 and #275.
This may also help for #765.
To automatically retrieve the name of the branch in the documentation content repository, see #472 (comment)
Current workflow configurations
Bonita 2021.1
https://github.com/bonitasoft/bonita-doc/blob/9f6cb8779e3e270bbd5aa1849c773033447772f2/.github/workflows/push-content.yml#L3-L22
Bonita 2023.1
https://github.com/bonitasoft/bonita-doc/blob/8d06f2cab16e8efa67a47e3869122fde633ba73d/.github/workflows/push-content.yml#L3-L22
The text was updated successfully, but these errors were encountered: