Skip to content

[Bug Report]: Issues with publishing logic using git diff #3943

@tyconsulting

Description

@tyconsulting

Describe the bug

the pipeline uses git diff to identify if there are files changed within a module and use this logic to identify if it should be published or ignored.

When the 1st attempt to publish failed for whatever reason. after failed attempt, if another unrelated update has merged into the branch, the Get-ModulesToPublish.ps1 script will detect nothing has changed for the module you had problem publishing initially, and you will not be able to publish it again without making any changes to the module, although the previous publishing attempt failed.

There should be an AlwaysPublish option so we can tell the pipeline to always publish, regardless if there are any changes to the module files between current and the previous commit.

cc @ahmadabdalla

To reproduce

  1. Update module A and commit it to main branch
  2. The module A pipeline kicks off automatically but failed (or manually stopped) so the module did not get published.
  3. Update module B and commit the change to main branch
  4. Manually run module A pipeline again because the previous run did not publish the module
  5. The 2nd attempt in module A pipeline skips the publishing because no changes are detected for module A

Code snippet

N/A

Relevant log output

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions