Skip to content

Conversation

@OleWunschmann
Copy link
Contributor

@OleWunschmann OleWunschmann commented Nov 19, 2025

❔What, Why & How

What:

This change enables the update workflow to be called by other workflows as a reusable workflow.

Why:

Creating the second (or subsequent) project using one of the app creation workflows results in an incorrect “.AL-Go” directory in the created project.
This creates an even bigger problem for our custom template, as our template contains additional files that are missing from the “.AL-Go” directories of new projects.

As discussed in #1855, there should be an actual solution that requires a revision of the current logic for changing and committing files.
In the short term, however, we want to call the update workflow from a custom job in each app creation workflow.

Related to issue: #1855

✅ Checklist

  • Add/Update unit tests
  • Update RELEASENOTES.md
  • Update documentation

Copilot AI review requested due to automatic review settings November 19, 2025 19:52
@OleWunschmann OleWunschmann requested a review from a team as a code owner November 19, 2025 19:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds reusable workflow support to the UpdateGitHubGoSystemFiles workflow by adding the workflow_call trigger. This allows other workflows to call this workflow programmatically, which addresses an issue where creating multiple projects results in incorrect .AL-Go directories in newly created projects.

Key changes:

  • Added workflow_call trigger with duplicate input definitions mirroring workflow_dispatch inputs
  • Updated the input handling logic to support both workflow_dispatch and workflow_call event types

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Templates/AppSource App/.github/workflows/UpdateGitHubGoSystemFiles.yaml Added workflow_call trigger and updated event type checking logic to support reusable workflow pattern
Templates/Per Tenant Extension/.github/workflows/UpdateGitHubGoSystemFiles.yaml Added workflow_call trigger and updated event type checking logic to support reusable workflow pattern

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mazhelez
Copy link
Collaborator

Hey @OleWunschmann

PR looks good. There has been a recent addition to modify the default inputs for workflows (see #1987). I suppose, this is something that needs adjusting for workflow_call as well.

@OleWunschmann
Copy link
Contributor Author

OleWunschmann commented Nov 20, 2025

Hey @OleWunschmann

PR looks good. There has been a recent addition to modify the default inputs for workflows (see #1987). I suppose, this is something that needs adjusting for workflow_call as well.

Thanks for the feedback, @mazhelez.

I looked into this and came to the conclusion that including workflow_call in the default inputs logic could be a problem, because the workflow _Build AL-Go Project also uses this trigger.
I think it would be better to declare the inputs of the workflow_call as required inputs without default values.
Alternativly we could also include workflow_call in the logic but exclude the build workflow.

Also the pr #2033 wants to add the possibility to hide some inputs by removing them.
This is not possible for workflow_call because the calls of the workflow would still need the inputs.

If this pr is something that gets implemented we would need another solution.
A possible solution could be to split the update workflow into two workflows:

  • New reusable workflow
    • Copy of current workflow
    • Only workflow_call instead of workflow_dispatch
      • Additional input for original event name
    • References to original event name from input instead of event name
  • Current workflow
    • Only workflow_dispatch (as is)
    • Only contains calls of reusable workflow with passthru of the inputs

This would allow the new default inputs to be applied to the dispatch workflow without breaking the call workflow.
A problem with this would be that other calls of the reusable workflow would not inherit the default settings.
To work around this we could set the inputs of the reusable workflow as required without default values.

What do you think?

@mazhelez
Copy link
Collaborator

For one, nice analysis! 💯

Here are my thoughts:

I looked into this and came to the conclusion that including workflow_call in the default inputs logic could be a problem, because the workflow _Build AL-Go Project also uses this trigger. I think it would be better to declare the inputs of the workflow_call as required inputs without default values. Alternativly we could also include workflow_call in the logic but exclude the build workflow.

How about changing the default inputs on workflow_call only if there is a workflow_dispatch trigger as well?

Also the pr #2033 wants to add the possibility to hide some inputs by removing them. This is not possible for workflow_call because the calls of the workflow would still need the inputs.

Hiding inputs makes sense only for the workflow_dispatch trigger. As far as I understood, it's a cosmetic feature: the inputs are hidden in the UI.

If this pr is something that gets implemented we would need another solution. A possible solution could be to split the update workflow into two workflows:

  • New reusable workflow

    • Copy of current workflow

    • Only workflow_call instead of workflow_dispatch

      • Additional input for original event name
    • References to original event name from input instead of event name

  • Current workflow

    • Only workflow_dispatch (as is)
    • Only contains calls of reusable workflow with passthru of the inputs

This would allow the new default inputs to be applied to the dispatch workflow without breaking the call workflow. A problem with this would be that other calls of the reusable workflow would not inherit the default settings. To work around this we could set the inputs of the reusable workflow as required without default values.

What do you think?

I do think this could be the right approach long term, but it requires way more investment, testing, etc. "Update AL-Go" is quite an important process and must not break.

@mazhelez
Copy link
Collaborator

mazhelez commented Dec 3, 2025

⚠️ Release Notes Update Reminder

Thank you for updating the release notes!

Please ensure that your changes are placed above the new version section (currently ## v8.1) in the RELEASENOTES.md file.

This helps maintain a clear changelog structure where new changes are grouped under the latest unreleased version.

@OleWunschmann
Copy link
Contributor Author

@mazhelez please excuse my late reply. I was out of the office last week.

I looked into this and came to the conclusion that including workflow_call in the default inputs logic could be a problem, because the workflow _Build AL-Go Project also uses this trigger. I think it would be better to declare the inputs of the workflow_call as required inputs without default values. Alternativly we could also include workflow_call in the logic but exclude the build workflow.

How about changing the default inputs on workflow_call only if there is a workflow_dispatch trigger as well?

Good idea, I'll implement it.

Also the pr #2033 wants to add the possibility to hide some inputs by removing them. This is not possible for workflow_call because the calls of the workflow would still need the inputs.

Hiding inputs makes sense only for the workflow_dispatch trigger. As far as I understood, it's a cosmetic feature: the inputs are hidden in the UI.

Currently the pr #2033 removes the whole input from the trigger to hide it in the UI. This also requires that references to these inputs are replaced with their literal values.
But inputs for workflow_call should not be removed, because calls could use these inputs. But even if they are not removed they would not be used because their references are missing.

I suggest ignoring this issue for this PR and moving the discussion on this topic to PR #2033?

If this pr is something that gets implemented we would need another solution. A possible solution could be to split the update workflow into two workflows:

  • New reusable workflow

    • Copy of current workflow

    • Only workflow_call instead of workflow_dispatch

      • Additional input for original event name
    • References to original event name from input instead of event name

  • Current workflow

    • Only workflow_dispatch (as is)
    • Only contains calls of reusable workflow with passthru of the inputs

This would allow the new default inputs to be applied to the dispatch workflow without breaking the call workflow. A problem with this would be that other calls of the reusable workflow would not inherit the default settings. To work around this we could set the inputs of the reusable workflow as required without default values.
What do you think?

I do think this could be the right approach long term, but it requires way more investment, testing, etc. "Update AL-Go" is quite an important process and must not break.

I’m of the same opinion.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

OleWunschmann and others added 4 commits December 11, 2025 20:06
* Apply workflow default inputs to call inputs with matching dispatch inputs

* Update teste for action CheckForUpdates

* Updated documentation for "workflowDefaultInputs"
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@OleWunschmann
Copy link
Contributor Author

@mazhelez
I implemented the suggested change for the workflow default inputs.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

mazhelez
mazhelez previously approved these changes Dec 12, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mazhelez mazhelez requested a review from aholstrup1 December 15, 2025 13:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aholstrup1 aholstrup1 merged commit 23b5dde into microsoft:main Dec 17, 2025
6 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.

3 participants