Skip to content

Target branch .sync.yml not taken into account on branch update (--force) #192

@bittner

Description

@bittner

When updating an existing branch, msync update --force seems to consider the values in the .sync.yml file of the existing branch (meant to be updated), instead of the .sync.yml file of the target branch. This might be a design fault.

Side note: I did this on a GitLab merge request, but the behavior is likely the same even w/o --pr

Example update flow

  1. I run msync update --pr, which creates an update (new branch, optional merge request)
  2. I figure out that the change was wrong on a target module, due to a value I forgot to update in .sync.yml; hence, I update .sync.yml (in target module, in target branch, e.g. master).
  3. I run msync update --pr --force to update the already existing branch (created earlier)

Now, I would expect the updated branch to consider the values in .sync.yml of the target branch (i.e. master in our example). But the changes are based on the values of .sync.yml from the existing, earlier created branch.

I need to delete the branch created by msync update and run ModuleSync afresh. 😟

Recreate target branch? (instead of "update")

The above behavior is probably not intended. The branch was originally created off the target branch, which then naturally has a .sync.yml file that matches across both branches.

When a branch is updated, especially with --force, then the branch should really, technically, be created off that target branch again and force-pushed over the branch created by ModuleSync earlier. That way we would guarantee the same behavior at all times. Correct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions