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

feat: support atlantis.yaml without defined projects #2300

Merged
merged 12 commits into from
Dec 1, 2022

Conversation

csainty
Copy link
Contributor

@csainty csainty commented Jun 7, 2022

I'd like to propose supporting atlantis.yaml config without having to specify the projects section. Enabling, for example, to set parallel_plan while still having atlantis determine the project list.

I totally understand if this doesn't fit with your own ideas, so there are no hard feelings if you disagree and close.

The code gets a bit fiddly, and I am not Go expert, but this looks like to relevant section to change, there just may be side-effects I am unaware of.

Relates to #2708

@csainty csainty requested a review from a team as a code owner June 7, 2022 00:06
@jamengual jamengual added feature New functionality/enhancement needs discussion Large change that needs review from community/maintainers waiting-on-review Waiting for a review from a maintainer labels Jun 7, 2022
@chenrui333 chenrui333 changed the title Support atlantis.yaml without defined projects feat: support atlantis.yaml without defined projects Jun 29, 2022
@nitrocode
Copy link
Member

@csainty please fix conflicts and see above comment

@nitrocode
Copy link
Member

@csainty I resolved the conflicts here to merge from main. Please see the test failures.

@nitrocode nitrocode added waiting-on-response Waiting for a response from the user and removed waiting-on-review Waiting for a review from a maintainer labels Nov 20, 2022
@csainty
Copy link
Contributor Author

csainty commented Nov 20, 2022

Fixed up the test, sorry it took me a while to get back to this one, the first comments came through while I was on vacation, so it fell out of the inbox.

@nitrocode nitrocode removed the waiting-on-response Waiting for a response from the user label Nov 22, 2022
@nitrocode
Copy link
Member

@csainty Thank you for resolving! We are planning the v0.21.0 release at the moment so this PR will have to wait after that to avoid too many changes.

@jamengual regarding this change, I saw you added the needs-discussion label. Could you expand on that?

@jamengual
Copy link
Contributor

I was trying to understand the need for the feature and if it was not going to break anything in the current atlantis.yaml parsing process

@csainty
Copy link
Contributor Author

csainty commented Nov 22, 2022

I was trying to understand the need for the feature and if it was not going to break anything in the current atlantis.yaml parsing process

You can't, to my knowledge, turn on parallel processing without listing all your projects in the config file.

@csainty
Copy link
Contributor Author

csainty commented Nov 25, 2022

Regarding a more general refactor, my inclination is to abstract the notion of the configuration file so that the calling code just asks for the config and then the parser layer either returns the file or a generated default.
Then you could isolate the default behaviours to that generation step, do project scanning, propagate server params, etc.

I haven't attempted it yet, but I assume it will have tendrils that reach to a lot of code, which is where the diff-vs-code comment came from. I can find some time to give it a shot though and see just how far it reaches out.

@nitrocode
Copy link
Member

@csainty the new version has been released and I'm sorry to say there are 2 small conflicts. Could you resolve those one last time and we can merge? Thank you again

@csainty csainty force-pushed the atlantis-yaml-with-no-projects branch from f5ea697 to 5b6a04b Compare November 29, 2022 22:45
@csainty
Copy link
Contributor Author

csainty commented Nov 29, 2022

@nitrocode done.

@nitrocode nitrocode merged commit e60dd84 into runatlantis:main Dec 1, 2022
krrrr38 pushed a commit to krrrr38/atlantis that referenced this pull request Dec 16, 2022
* Support atlantis.yaml without defined projects

* Update server/events/project_command_builder.go

* Update server/events/project_command_builder.go

* Correct test of no modified projects

* Flip if statement

* Remove duplicate check on hasRepoCfg

Co-authored-by: nitrocode <[email protected]>
@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
feature New functionality/enhancement needs discussion Large change that needs review from community/maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants