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: add other-vcs-status-names-to-ignore #4978

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

bakayolo
Copy link

@bakayolo bakayolo commented Oct 4, 2024

what

other-vcs-status-names-to-ignore is a comma-separated list of atlantis vcs status names that will be ignored when deciding if the PR is mergeable or not. This allows us to set mergeable with multiple atlantis running with multiple vcs status names for the same repository.

why

This PR is a proposal to close #2848

tests

I have only run make test but planning on testing in my own environment if the proposal is accepted.
Tested with make test and on my environment with bappr/atlantis:cud-ignore-vcs-status-names-ca1171e0dd174edbbd63f8f6ae560caa6af4c0c7-0.

references

closes #2848

`other-vcs-status-names-to-ignore` is a comma-separated list of atlantis vcs status names that will be ignored when deciding if the PR is mergeable or not.

This PR is a proposal to solve [runatlantis#2848](runatlantis#2848) for github client.
@bakayolo bakayolo requested review from a team as code owners October 4, 2024 03:07
@bakayolo bakayolo requested review from GenPage, lukemassa and nitrocode and removed request for a team October 4, 2024 03:07
@dosubot dosubot bot added the feature New functionality/enhancement label Oct 4, 2024
@jamengual
Copy link
Contributor

interesting proposition.
one quick thing I will say that instead of adding a flag for this it will be much better to add it to the server side repo config with something like :

vcs-status-to-ignore:
  - name1
  - name2
  - etc

@bakayolo
Copy link
Author

bakayolo commented Oct 4, 2024

@jamengual thanks for the feedback, why do you think it is much better? I would actually imagine that having other-vcs-status-names-to-ignore close to vcs-status-name would be less confusing no?

@jamengual
Copy link
Contributor

Because we have a trillion flags, and we want to avoid having more that is the main reason, plus if is moved there then you can have different repos regexes with different statuses.

@bakayolo
Copy link
Author

bakayolo commented Oct 4, 2024

@jamengual I've been looking at the code and I believe it's gonna be pretty complex to do

plus if is moved there then you can have different repos regexes with different statuses.

because the FetchPullStatus is not called at the repo config level. It's basically a sort of boolean ("has been approved" and "is mergeable", no conditions)

Also, I am struggling to understand the benefit of having different repos regexes with different statuses. Simply put, #2848 is basically a bug where multiple atlantis instances with different vcs status name conflict with each other and forbid the apply when mergeable is set. Which means that if we do not make atlantis aware of ALL the others atlantis running for the repo, they will continue conflicting with each others. So I think that config should be global.

Wdyt?

@jamengual
Copy link
Contributor

Sorry, this is a standard ask we ask everyone.
I did not look at the code to see if the context will be present at that point in the execution for you to do it.
As you mentioned, it could get pretty complex, so keeping the flag then is better.

@anryko
Copy link
Contributor

anryko commented Oct 4, 2024

Small nitpick, other in the name seems redundant. The vcs-status-names-to-ignore would be sufficient, but considering the pattern in other arguments naming (hide-, silence-, include-, allow-), the name should resemble ingnore-vsc-status-names.

@bakayolo
Copy link
Author

bakayolo commented Oct 4, 2024

FYI, I've tested this change on my environment (Dev, Staging, prod) with bappr/atlantis:cud-ignore-vcs-status-names-ca1171e0dd174edbbd63f8f6ae560caa6af4c0c7-0.

@jamengual jamengual added the waiting-on-review Waiting for a review from a maintainer label Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement go Pull requests that update Go code provider/azuredevops provider/bitbucket provider/github provider/gitlab waiting-on-review Waiting for a review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--gh-allow-mergeable-bypass-apply for multiple servers
3 participants