Skip to content
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

Feature: Priority Directories, Priority Plans #3241

Open
1 task
natalysheinin opened this issue Mar 17, 2023 · 4 comments
Open
1 task

Feature: Priority Directories, Priority Plans #3241

natalysheinin opened this issue Mar 17, 2023 · 4 comments
Labels
collab feature New functionality/enhancement

Comments

@natalysheinin
Copy link

natalysheinin commented Mar 17, 2023

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Describe the user story
As a developer, I want to be able to create a PR that bootstraps a bunch of required infrastructure & targets changes across various directories (1+ statefiles). For a good UX, I want to guarantee that the atlantis workflow will help me succeed without the complexities of order of operations.

As an atlantis admin, I want to configure certain statefiles/directories to have priority such that in a single PR, atlantis ensures that a priority plan/apply workflow gets completed before others.

Describe the solution you'd like

  • I want to be able to identify which "dir" are priority in atlantis.yaml.
  • I want this to be achievable within 1 PR.
  • I want this to be solved with staged plans (don't generate an atlantis plan for any directories until a plan/apply is complete for the priority directory that is modified). This will be important to stay consistent with mergeable requirements.

Describe the drawbacks of your solution

Describe alternatives you've considered

  1. Do this in 2 separate PRs - annoying UX
  2. Consolidate state and use "depends_on"- breaks intended code organization of state file per team function / infrastructure function
@natalysheinin natalysheinin added the feature New functionality/enhancement label Mar 17, 2023
@jamengual
Copy link
Contributor

have you seen this? #2146

@natalysheinin
Copy link
Author

Related to: #391

@jamengual
Copy link
Contributor

@natalysheinin do you think that this : #3292 could work for you?

@vincentgna
Copy link
Contributor

vincentgna commented Oct 9, 2023

As I'm working on this feature currently, I would like to propose the following functionality expanding #3292 depends_on functionality with a configurable behaviour:

  1. During plan, do not plan projects which have unapplied dependencies, update the commit status for these projects with a new state flag indicating "plan is pending"
  2. During apply, only apply planned projects
  3. (potentially automatically after apply?) Autoplan any dependant projects in "pending" state after apply run is complete
  4. Repeat until all projects impacted by a PR are in applied state (automerge PR when all planned projects are successfully applied)

I see a few concerns:

  • Should Atlantis “re-request” PR review after first apply to ensure the approval is requested for each phase? (this could be configurable, initially we won’t implement this and behaviour would be to not re-request approval(s))

  • This may result in more long lived PRs with partially applied plans (Atlantis locks exist for this reason, once the PR is partially applied, the projects applied should be locked to the PR).

    When issuing the atlantis unlock comment, in future implementations, we could warn that already applied projects could cause significant issues if the PR lock is discarded)

Without this built-in functionality within Atlantis, it is the "executor" that is responsible to orchestrate the plan/apply steps.

For example:

Refs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collab feature New functionality/enhancement
Projects
None yet
Development

No branches or pull requests

3 participants