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

Enable or disable repo_locking per repo in repos.yaml and atlantis.yaml #2700

Merged
merged 4 commits into from
Dec 9, 2022

Conversation

krrrr38
Copy link
Contributor

@krrrr38 krrrr38 commented Nov 20, 2022

What did I change?

  • add repo_locking setting in repo config and atlantis.yaml.
  • allow override repo_locking by atlantis.yaml
  • ProjectLocker has NoOpLocker and TryLock check repoLocking bool arg.
    • if repoLocking is false, ProjectLocker doesn't get a lock using NoOpLocker

Check

I just add some unit tests and check manually in krrrr38/atlantis-debug#1 and krrrr38/atlantis-debug#2.

In this case, I use the following repo config which contains allowed_overrides: [repo_locking].

export ATLANTIS_REPO_CONFIG_JSON='{"repos":[{"id":"/.*/", "allowed_overrides": ["repo_locking"], "apply_requirements":["mergeable"]}]}'

And put atlantis.yaml which contains repo_locking: false.

version: 3
projects:
- name: project
  branch: /master/
  dir: .
  repo_locking: false

then, plan works in the 2 PR without any lock.

image

Closes #1391

@krrrr38 krrrr38 changed the title disable repo locking repos.yaml and atlantis.yaml with allow override disable repo locking in repos.yaml and atlantis.yaml with allow override Nov 21, 2022
@krrrr38 krrrr38 marked this pull request as ready for review November 21, 2022 00:02
@krrrr38 krrrr38 requested a review from a team as a code owner November 21, 2022 00:02
@krrrr38 krrrr38 changed the title disable repo locking in repos.yaml and atlantis.yaml with allow override customize repo locking in repos.yaml and atlantis.yaml with allow override Nov 21, 2022
@krrrr38 krrrr38 force-pushed the disable-repo-locking-by-repo branch from 0c4240b to 9d52bbc Compare November 21, 2022 15:40
@nitrocode nitrocode changed the title customize repo locking in repos.yaml and atlantis.yaml with allow override Enable or disable repo_locking per repo in repos.yaml and atlantis.yaml Nov 21, 2022
@nitrocode
Copy link
Member

Thank you @krrrr38 for addressing the feedback.

@jamengual and the other maintainers have locked the main branch for now in order to finish the 0.21.0 release. After that is released by EOW, we'll open up new changes to the default branch again.

@nitrocode nitrocode added the waiting-on-review Waiting for a review from a maintainer label Nov 24, 2022
@krrrr38 krrrr38 force-pushed the disable-repo-locking-by-repo branch from e1dfe10 to 795328f Compare December 5, 2022 21:06
@krrrr38 krrrr38 requested a review from nitrocode December 5, 2022 21:16
Copy link
Member

@nitrocode nitrocode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsure why the tests are failing but it does not seem relevant to this PR.

@nitrocode
Copy link
Member

cc: @jamengual please review if you a some time since there have been changes. If you're good, then I'm ok with this as well

@nitrocode
Copy link
Member

Verbal agreement from @jamengual in slack. Merging!

@nitrocode nitrocode merged commit 4d95783 into runatlantis:main Dec 9, 2022
@nitrocode
Copy link
Member

Thank you @krrrr38 for the contribution!

@nitrocode
Copy link
Member

@krrrr38 let us know if you're interested in becoming a maintainer. We're looking for more maintainers with high quality PRs who are interested in keeping atlantis in a well-maintained state.

@krrrr38
Copy link
Contributor Author

krrrr38 commented Dec 9, 2022

@nitrocode Sounds good to me. I'm not sure to support how much time I can spend, but I can focus on Atlantis a little bit more when I become a maintainer. I will use terraform and atlantis for a while in the future, cause this is a great product which supports continuous delivery with git-* flow. So I'm happy to contribute atlantis.
If require more contributions or reviews to become it, I will try it. Thanks.

Fabianoshz pushed a commit to Fabianoshz/atlantis that referenced this pull request Dec 10, 2022
…is.yaml` (runatlantis#2700)

* disable repo locking repos.yaml and atlantis.yaml with allow override

* rename disable_repo_locking into repo_locking

* add both enable/disable repo_locking test

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
krrrr38 added a commit to krrrr38/atlantis that referenced this pull request Dec 16, 2022
…is.yaml` (runatlantis#2700)

* disable repo locking repos.yaml and atlantis.yaml with allow override

* rename disable_repo_locking into repo_locking

* add both enable/disable repo_locking test

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
@nitrocode nitrocode added this to the 0.22.0 milestone Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-review Waiting for a review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

disable locking per directory using atlantis.yaml
4 participants