Skip to content

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

Open

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 Ahmad Abdalla (@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

Activity

  1. added
    bug
    on Sep 8, 2023
  2. ahmadabdalla commented on Sep 12, 2023

    @ahmadabdalla
    Contributor

    Adding context: Just looking at a PR that was merged quite a while back that addresses something similar:
    #2410 in response to #2153

  3. ahmadabdalla commented on Sep 15, 2023

    @ahmadabdalla
    Contributor

    Tagging #2896 for reference

  4. added this to the milestone on May 19, 2024
  5. removed this from the milestone on Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    • Status
      Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions