-
Notifications
You must be signed in to change notification settings - Fork 789
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
Delete app fails with cherry-pick error #6350
Comments
Under Specifically, there's this part of the error message:
I'm running into this issue due to untracked directories within |
Caused by the same issue as #5772 |
Looking at the commits referenced in a recent repeat of this problem, it appears that the system is trying to refresh ~/.jx/environments with a commit that is already in ~/.jx/environments/dev and git is refusing to create the ensuing Inception nesting. |
Ok, just verified that if you have a fresh boot cluster with gitops enabled and run |
Verified that it is specifically running |
Also adds `--auto-merge` to `jx delete app` fixes jenkins-x#6350 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Also adds `--auto-merge` to `jx delete app` fixes jenkins-x#6350 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Ah-ha, it's actually the logic behind |
Actually, why the heck is |
…te in JX_HOME Until this, `jx delete app`, `jx add app`, and `jx get apps` all did weird things with/under `~/.jx/environments`. All of them used `ForkAndPullRepo` to clone under there - `jx get apps` directly into `~/.jx/environments`, and `jx add app` and `jx delete app` into `~/.jx/environments/dev`. Literally none of this made sense. =) This changes `jx add app` and `jx delete app` to perform more standard PR creation via `ForkAndPullRepo`, using a temporary directory for the clone, and changes `jx get apps` to just clone (currently deleting/recloning each time it's called to make sure nothing has gone weird with the remotes) into `~/.jx/environments/dev`. Also adds `--auto-merge` to `jx delete app` fixes jenkins-x#6350 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Sooooo yeah. |
…te in JX_HOME Until this, `jx delete app`, `jx add app`, and `jx get apps` all did weird things with/under `~/.jx/environments`. All of them used `ForkAndPullRepo` to clone under there - `jx get apps` directly into `~/.jx/environments`, and `jx add app` and `jx delete app` into `~/.jx/environments/dev`. Literally none of this made sense. =) This changes `jx add app` and `jx delete app` to perform more standard PR creation via `ForkAndPullRepo`, using a temporary directory for the clone, and changes `jx get apps` to just clone to a temporary directory. This all just applies when gitops is enabled. Also adds `--auto-merge` to `jx delete app` fixes jenkins-x#6350 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…te in JX_HOME Until this, `jx delete app`, `jx add app`, and `jx get apps` all did weird things with/under `~/.jx/environments`. All of them used `ForkAndPullRepo` to clone under there - `jx get apps` directly into `~/.jx/environments`, and `jx add app` and `jx delete app` into `~/.jx/environments/dev`. Literally none of this made sense. =) This changes `jx add app` and `jx delete app` to perform more standard PR creation via `ForkAndPullRepo`, using a temporary directory for the clone, and changes `jx get apps` to just clone to a temporary directory. This all just applies when gitops is enabled. Also adds `--auto-merge` to `jx delete app` fixes jenkins-x#6350 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…te in JX_HOME Until this, `jx delete app`, `jx add app`, and `jx get apps` all did weird things with/under `~/.jx/environments`. All of them used `ForkAndPullRepo` to clone under there - `jx get apps` directly into `~/.jx/environments`, and `jx add app` and `jx delete app` into `~/.jx/environments/dev`. Literally none of this made sense. =) This changes `jx add app` and `jx delete app` to perform more standard PR creation via `ForkAndPullRepo`, using a temporary directory for the clone, and changes `jx get apps` to just clone to a temporary directory. This all just applies when gitops is enabled. Also adds `--auto-merge` to `jx delete app` fixes jenkins-x#6350 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
…te in JX_HOME Until this, `jx delete app`, `jx add app`, and `jx get apps` all did weird things with/under `~/.jx/environments`. All of them used `ForkAndPullRepo` to clone under there - `jx get apps` directly into `~/.jx/environments`, and `jx add app` and `jx delete app` into `~/.jx/environments/dev`. Literally none of this made sense. =) This changes `jx add app` and `jx delete app` to perform more standard PR creation via `ForkAndPullRepo`, using a temporary directory for the clone, and changes `jx get apps` to just clone to a temporary directory. This all just applies when gitops is enabled. Also adds `--auto-merge` to `jx delete app` fixes jenkins-x#6350 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Until this, `jx delete app`, `jx add app`, and `jx get apps` all did weird things with/under `~/.jx/environments`. All of them used `ForkAndPullRepo` to clone under there - `jx get apps` directly into `~/.jx/environments`, and `jx add app` and `jx delete app` into `~/.jx/environments/dev`. Literally none of this made sense. =) This reworks not just the app commands, but all commands that create PRs (i.e., gitops) against the dev/prod/staging environments to use temporary directories for the fork/clone/push, with the option, just used in tests, of specifying an existing directory to use instead, while `jx get apps` just clones to a temporary directory as well. Switching all this to temporary directories also really helps users who manage/work with multiple JX clusters from a single laptop/desktop/host, since namespacing `~/.jx/environments` by cluster is basically impossible so far as I can tell. Also adds `--auto-merge` to `jx delete app` because I was here. fixes jenkins-x#6350 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Until this, `jx delete app`, `jx add app`, and `jx get apps` all did weird things with/under `~/.jx/environments`. All of them used `ForkAndPullRepo` to clone under there - `jx get apps` directly into `~/.jx/environments`, and `jx add app` and `jx delete app` into `~/.jx/environments/dev`. Literally none of this made sense. =) This reworks not just the app commands, but all commands that create PRs (i.e., gitops) against the dev/prod/staging environments to use temporary directories for the fork/clone/push, with the option, just used in tests, of specifying an existing directory to use instead, while `jx get apps` just clones to a temporary directory as well. Switching all this to temporary directories also really helps users who manage/work with multiple JX clusters from a single laptop/desktop/host, since namespacing `~/.jx/environments` by cluster is basically impossible so far as I can tell. Also adds `--auto-merge` to `jx delete app` because I was here. fixes jenkins-x#6350 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Until this, `jx delete app`, `jx add app`, and `jx get apps` all did weird things with/under `~/.jx/environments`. All of them used `ForkAndPullRepo` to clone under there - `jx get apps` directly into `~/.jx/environments`, and `jx add app` and `jx delete app` into `~/.jx/environments/dev`. Literally none of this made sense. =) This reworks not just the app commands, but all commands that create PRs (i.e., gitops) against the dev/prod/staging environments to use temporary directories for the fork/clone/push, with the option, just used in tests, of specifying an existing directory to use instead, while `jx get apps` just clones to a temporary directory as well. Switching all this to temporary directories also really helps users who manage/work with multiple JX clusters from a single laptop/desktop/host, since namespacing `~/.jx/environments` by cluster is basically impossible so far as I can tell. Also adds `--auto-merge` to `jx delete app` because I was here. fixes jenkins-x#6350 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Until this, `jx delete app`, `jx add app`, and `jx get apps` all did weird things with/under `~/.jx/environments`. All of them used `ForkAndPullRepo` to clone under there - `jx get apps` directly into `~/.jx/environments`, and `jx add app` and `jx delete app` into `~/.jx/environments/dev`. Literally none of this made sense. =) This reworks not just the app commands, but all commands that create PRs (i.e., gitops) against the dev/prod/staging environments to use temporary directories for the fork/clone/push, with the option, just used in tests, of specifying an existing directory to use instead, while `jx get apps` just clones to a temporary directory as well. Switching all this to temporary directories also really helps users who manage/work with multiple JX clusters from a single laptop/desktop/host, since namespacing `~/.jx/environments` by cluster is basically impossible so far as I can tell. Also adds `--auto-merge` to `jx delete app` because I was here. fixes #6350 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Until this, `jx delete app`, `jx add app`, and `jx get apps` all did weird things with/under `~/.jx/environments`. All of them used `ForkAndPullRepo` to clone under there - `jx get apps` directly into `~/.jx/environments`, and `jx add app` and `jx delete app` into `~/.jx/environments/dev`. Literally none of this made sense. =) This reworks not just the app commands, but all commands that create PRs (i.e., gitops) against the dev/prod/staging environments to use temporary directories for the fork/clone/push, with the option, just used in tests, of specifying an existing directory to use instead, while `jx get apps` just clones to a temporary directory as well. Switching all this to temporary directories also really helps users who manage/work with multiple JX clusters from a single laptop/desktop/host, since namespacing `~/.jx/environments` by cluster is basically impossible so far as I can tell. Also adds `--auto-merge` to `jx delete app` because I was here. fixes jenkins-x#6350 Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Summary
Attempting to delete an App using
jx delete app
fails under some circumstances due to a cherry pick error.Steps to reproduce the behavior
Jx version
The output of
jx version
is:Jenkins type
The text was updated successfully, but these errors were encountered: