-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
What broke? What's expected?
Currently, when running kubebuilder alpha update --force
, if the merge ends with conflicts, the make
targets are still run, but all fail with errors due to the presence of conflict markers in the code:
level=info msg="Preparing Merge branch with name tmp-merge-06-08-25-12-44 and performing merge"
level=warning msg="Merge completed with conflicts. Conflict markers will be committed."
level=info msg="Running make manifests:\n$ make manifests"
Makefile:75: *** missing separator. Stop.
level=warning msg="make manifests failed: error running \"make\": exit status 2"
level=info msg="Running make generate:\n$ make generate"
Makefile:75: *** missing separator. Stop.
level=warning msg="make generate failed: error running \"make\": exit status 2"
level=info msg="Running make fmt:\n$ make fmt"
Makefile:75: *** missing separator. Stop.
level=warning msg="make fmt failed: error running \"make\": exit status 2"
level=info msg="Running make vet:\n$ make vet"
Makefile:75: *** missing separator. Stop.
level=warning msg="make vet failed: error running \"make\": exit status 2"
level=info msg="Running make lint-fix:\n$ make lint-fix"
Makefile:75: *** missing separator. Stop.
level=warning msg="make lint-fix failed: error running \"make\": exit status 2"
This is expected when running the make
targets after the conflicts, but can negatively affect CI results.
It can also confuse users about the success of the operation.
A better approach could be to NOT run the make
targets if there are conflicts and only WARN the user to do it after resolving them.
Reproducing this issue
Run kubebuilder alpha update --force
in projects with distant current and target versions.
KubeBuilder (CLI) Version
v4.7.1
PROJECT version
v4.5.2
Plugin versions
Other versions
No response
Extra Labels
No response
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.