Skip to content

PR is not updated even there are changes after new incoming changes on master #3159

Closed

Description

@laeubi

Subject of the issue

While previously it has worked to update a PR, now the file itself changed in master the PR is not updated and the action claims everything is even.

Steps to reproduce

I have an action here is has run and created a PR successful (:+1: ) that I have replayed because of infra issue and the PR was updated (:+1: ).

Then we have split and merged a part of it and I replayed it again but now it claims that nothing is to do and the PR is even with master.

I see the following issues

  1. According to the docs I would have expected that the PR is closed if nothing is needed anymore but the PR is still open
  2. I'm quite sure from the log output that there actually are changes:

The Maven log reports:

[INFO] update Dependency {groupId=jakarta.inject, artifactId=jakarta.inject-api, version=[,3-alpha), type=jar} to version 2.0.1.MR

The Action itself reports:

 M eclipse.platform.releng.prereqs.sdk/eclipse-sdk-prereqs.target
 Uncommitted changes found. Adding a commit.
 1 file changed, 1 insertion(+), 1 deletion(-)

but in the end it tells

 Branch 'update_target' is even with its remote and will not be updated

Activity

  1. peter-evans commented on Aug 14, 2024

    @peter-evans
    Owner

    Hi @laeubi

    This is very strange because it looks like this run ran against the correct commit on master with the changes you merged.

    The action thinks there is no diff between the changes that were made during the workflow and the update_target branch. To check this, you could add a step to the workflow just before the action runs:

    - run: git --no-pager diff

    Effectively, the action should rebase changes when creates a commit. So I'm confused why this has happened.

  2. peter-evans commented on Aug 14, 2024

    @peter-evans
    Owner

    Oh wait. I see what's happening now. I think you've run into an edge case that I've not considered. Partially merging content from within a single commit.

    There is no overall diff, that is correct. There is, however, a diff for that specific commit on the branch. I need to make a test for this and find a way to catch this edge case.

    You can fix this by just deleting the update_target branch and running the workflow again. It will recreate the branch with any remaining diff.

  3. added
    bug
    on Aug 14, 2024
  4. timteka commented on Aug 27, 2024

    @timteka

    @peter-evans Dear Peter, seems like that's my case. I've created a trigger workflow with matrix, it runs properly twice, temporarily creates new files per each run, but... only 1 file in commit in PR by the end of run.
    Aaah, I got it. The subsequent iterations through the matrix replaces previous changes ((

  5. peter-evans commented on Aug 28, 2024

    @peter-evans
    Owner

    This now has a fix in the upcoming v7 release.

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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions