-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to re-run 'jx boot' from the initial boot config directory #5772
Comments
This relates to #5463. A solution to the problem would be proper handling of credentials locally, eg via a git credential helper. As a temporary solution, we could manually update the ref. This might unlock this particular use case, but won't scale. |
This is also breaking in the same way on legacy |
As of 2.0.866, this is now failing during the first execution of
|
Hmmm, looks like this may have been due to a jx release occurring during a cluster deployment. |
I think this is partially dealt with by #5949 merging. |
@hferentschik will pick up in the coming week. Only happens when running from clone of boot config when you have a dev env repo. It is assumed git is configured which contributes to matter but this issue is not relevant to that. Issues with regards to upgrade boot are prioritized in this context as well. |
I tried today to run boot multiple times in the same folder which was created by the initial run. Second run was successful but without making any change in the config. In the third run, I enabled the TLS which was successfully configured for vault but I encountered the first error mentioned above related to local commits cherry picking during the environments verification:
|
I am wondering whether |
Summary
When using
jx boot
to bootstrap a cluster, one should be allowed to re-runjx boot
from within the initial boot config directory, however, this currently results in errors of the form:Steps to reproduce the behavior
Install Jenkins-X on a new cluster via
jx boot
, then re-runjx boot
from within the initial boot config directory.Expected behavior
The second
jx boot
succeeds as well, resulting in no changes to the cluster.Actual behaviour
See above.
The problem is how we try to merge / cherry-pick local changes during verify environment. Effectively we get the latest master and then cherry-pick any local changes which are not in the remotes on top of it. This happens in
helpers.ForkAndPullRepo
or the more particular ingitter.GetCommitsNotOnAnyRemote
. Under the hood this callsgit log master --not --remotes
. This will fail for us due to the way we are pushing to the remote. To avoid having to store credentials for the remote environment repository, we internally (in code) construct an authenticated push URL to which we push. This pushes the code to the remote correctly, but it does not update the remote ref in .git/refs/remotes/origin. This meansgit log master --not --remotes
will report the local commits which are actually already on the remote as well missing and we will attempt to cherry pick them leading to a merge conflict.The problematic code is:
The text was updated successfully, but these errors were encountered: