-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
pre-workflow hooks are not re-run when a PR is open + closed #1700
Comments
hmm so is the underlying issue here that --parallel is breaking pre-workflow hooks because of this? #1618 |
It is not. Slightly different problem here, let me explain a little more. TLDR; pre-workflow hook is exec'd only on initial checkout, so auto config is not regenerated as the PR evolves, symptoms are: build output for projects no longer in PR, double runs if utilising Let's say we a single VCS repo & we utilise Atlantis pre-workflow hook to generate config for atlantis dynamically. During pre-workflow-hook auto-generation step we instruct the auto generator to use both parallel and dir separation per project found.
Where each dir has a full checkout of source code (presumably cp from This creates 2 distinct problems for us; 1). pre-workflow-hook infact is only exec'd once. not as the docs describe. pre-workflow hook would suggest it is run before every workflow execution. Could you provide some clarity on this? Problematic because, if during a PR review the author decides/is instructed to make additions/deletions to the PR these files are never correctly picked up in the auto-config generation as it only executes on PR open. despite suggesting (by name) that it runs before every workflow exec. We could of course utilise the custom 2). Secondly we've found that if a PR is generated lets say with 10 projects, each of which are represented in the config, then the PR author removes a project, Atlantis does not remove the projects it can no longer find. Meaning we get build output for things that are not even part of the PR or are removed in the PR now. This can be manually overcome by simply open+close the PR which essentially kills the project dir structure altogether before re-checking out from VCS and re-running the pre-workflow hook. Does this make a bit more sense? Suggestions: ensure or introduce a hook that is truly exec'd on each project workflow init, or have the default pre-workflow-hook be bumped manually, via some mechanism perhaps atlantis |
I noticed that I managed to get my Atlantis rather stuck after modifying the pre-workflow hooks custom Atlantis repo config generation to flip between
creating-workspace
anddefault
workspace. After re-opening the PR and running theatlantis plan
the generate config step (pre-workflow-step) is not re-run. Thus due to the --parallel flag being present the contention for thedefault
workspace remains, and breaks things.I also notice that the PR is not presently checked out at its regular location on disk
/home/atlantis/.atlantis/repos
.Why could this be? And is there anything more that can be done, beyond recreating the PR.
The text was updated successfully, but these errors were encountered: