-
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
Jx boot failing to modify its own configuration during execution #5929
Comments
So the second one seems to, in the immediate, be a clear ordering issue in chart generation, but yeah, the real problem seems to be that the dev env repo is being modified (presumably by a gitops PR?) while the local repo isn't picking up that update before it tries to change things. |
Waaaaaiiiit - that So here's what I think is happening:
In this case, there were legit changes to the files you're seeing conflicts in - jenkins-x/jenkins-x-boot-config#81 and jenkins-x/jenkins-x-boot-config#88 - but the cherrypicking logic is just failing horribly on them...not sure if that's because of the empty commit or our logic for cherrypicking is flawed, though. Need to think more on this... |
… boot Issues like jenkins-x#5929 make me suspect that there are bugs that are encountered when `jx boot` needs to clone `jenkins-x-boot-config` rather than operating in an already-existing clone. So I'm trying to reproduce that here. Let's see what happens. Signed-off-by: Andrew Bayer <[email protected]>
… boot Issues like jenkins-x#5929 make me suspect that there are bugs that are encountered when `jx boot` needs to clone `jenkins-x-boot-config` rather than operating in an already-existing clone. So I'm trying to reproduce that here. Let's see what happens. Signed-off-by: Andrew Bayer <[email protected]>
… boot Issues like jenkins-x#5929 make me suspect that there are bugs that are encountered when `jx boot` needs to clone `jenkins-x-boot-config` rather than operating in an already-existing clone. So I'm trying to reproduce that here. Let's see what happens. Signed-off-by: Andrew Bayer <[email protected]>
I suspect that changing the version stream value in jx-requirements.yml to master caused some of the code to refresh to 1.0.35 but doesn’t refresh |
Ah ha ! I have reproduced it with https://github.com/abayer/jx/blob/is-version-stream-clone-verifying-remote/jx/bdd/boot-vault/ci.sh. Now that I've got a reproduction in the wild, I should be able to nail down exactly what's not doing what it's supposed to tomorrow. |
dangit, I didn't actually reproduce it. That attempt used an existing dev env repo by accident. Sigh, more digging... |
I can confirm that
I deleted the folder and was able to run the install. |
Ok, that may be part of it, but from my experiments, I don't know if that's all of it. I verified that if you've already fetched the latest in |
I did finally, decisively reproduce - if you run |
Ok, so the problem is that we make uncommited changes in the local clone that then get stashed and unstashed onto the created dev env repo's master branch, and there's always a chance that those changes conflict with any changes that have happened in the master branch since the commit we're using as the baseline in the clone. I'm honestly not yet sure what to do about that. We could handle the most simple case easily enough - if we kick off I'm wondering if the "right" solution is to do that update, and if there are conflicts then (i.e., before we actually execute any steps), error out with a message saying "we had to update your local boot config, but there are conflicts. Please update your local boot config by running |
cc @daveconde @macox @garethjevans @pmuir @jstrachan - thoughts on the above? |
My reasoning here is that if we're going to have a conflict updating the local boot config to the version specified in |
Or, if we wanted to give the customer a better user experience, we could just beat them over the head repeatedly with a rusty bar? |
Hey, I'd say that failing before actually doing anything with an error message that actually tells you how to fix it is an improvement. =) |
So I'm about to put a WIP PR up with my semi-solution for this. It will try to update the local boot clone, let the user know it's doing so, and fail with what I hope is a useful error if it's unable to do so due to conflicts. The output will look like:
|
This will check if the boot clone isn't using the ref the desired tag points to, after cloning the boot config if needed. If the clone is using a different ref, it will try to stash any local changes, update the clone to use the appropriate ref, and unstash those local changes. If there are errors in the unstash due to conflicts, it'll report the `git stash pop` error message and tell the user what they need to do to fix it. fixes jenkins-x#5929 Signed-off-by: Andrew Bayer <[email protected]>
This will check if the boot clone isn't using the ref the desired tag points to, after cloning the boot config if needed. If the clone is using a different ref, it will try to stash any local changes, update the clone to use the appropriate ref, and unstash those local changes. If there are errors in the unstash due to conflicts, it'll report the `git stash pop` error message and tell the user what they need to do to fix it. fixes jenkins-x#5929 Signed-off-by: Andrew Bayer <[email protected]>
This will check if the boot clone isn't using the ref the desired tag points to, after cloning the boot config if needed. If the clone is using a different ref, it will try to stash any local changes, update the clone to use the appropriate ref, and unstash those local changes. If there are errors in the unstash due to conflicts, it'll report the `git stash pop` error message and tell the user what they need to do to fix it. fixes #5929 Signed-off-by: Andrew Bayer <[email protected]>
This will check if the boot clone isn't using the ref the desired tag points to, after cloning the boot config if needed. If the clone is using a different ref, it will try to stash any local changes, update the clone to use the appropriate ref, and unstash those local changes. If there are errors in the unstash due to conflicts, it'll report the `git stash pop` error message and tell the user what they need to do to fix it. fixes jenkins-x#5929 Signed-off-by: Andrew Bayer <[email protected]>
Summary
jx boot
fails during the installation of jx components due to git conflicts within jenkins-x.yml:If you manually merge the changes and restart, you just get the same problem in systems/acme/Chart.yaml.
Jx version
The output of
jx version
is:The text was updated successfully, but these errors were encountered: