-
-
Notifications
You must be signed in to change notification settings - Fork 99
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
We've been seeing intermittent issues with some file changes not actually being applied and I finally had some time to look through it further than having to do manual checks and commits.
If base branch and head branch diverges and force
is enabled (which is required with API), the initial commit will be lost during the reset and subsequent push.
I'm gonna take a guess straight away that this might come down to;
- Branch is shown as diverging and reset to base.
- Commit is done using API.
- Pull from remote fails as its not able to fast-forward.
Haven't had time to investigate this more but will try to do so during the week if time allows.
(I implemented the initial Github API feature so I'm probably responsible for introducing this bug but haven't been used enough to be bothered by it until now).
Expected Behavior
Commits should be kept when resetting diverging branch.
Steps To Reproduce
-
Given a simple configuration of a Github SCM with
commitUsingApi: true
and a single YAML target:name: "Bump helm charts versions" pipelineid: "example" scms: default: kind: github spec: ... hideCredit: true commitUsingApi: true force: true targets: HelmValuesImageTag: name: "Update" kind: yaml scmid: default spec: file: "values.yaml" key: "$.imageTag" value: "{{ requiredEnv .version }}"
-
Run
updatecli
to create the initial commit. -
Make any change in the base branch.
-
Run
updatecli
again. The initial commit will be missing and a new one has not been pushed. -
If ran once more, it will work as expected.
Environment
- OS: Same issue on Ubuntu 22.04 (Github Actions) and locally on Mac
- updatecli: v0.101.0
Pipeline Graph
Anything else?
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status