Skip to content

Make branch divergence logic alert only on tree (workspace) divergence #1066

@pratikmallya

Description

@pratikmallya

The warning adding in this PR is a bit expansive, since it will alert every time a PR branch has diverged from master (i.e. there are changes merged to the master, but not in the current repo code checked out by atlantis).

However, what users really care about is whether the master changes affected anything in the same workspace as the PR.

e.g. if I have PR-1 which makes changes to directory github.com/repo/a and PR-2 which makes changes to directory github.com/repo/b, and if PR-1 is merged, I don't really care in PR-2 since the changes are in a different workspace.

I'm assuming that repo/a and repo/b don't have relative terraform dependencies; if that dependency is specified with a when_modified, then it could be used in this logic.

The feature request is to make this logic warn users only when relevant changes are in master. So users only need to update their branch when their subdirectory (or git tree object) has diverged from master, not the entire repo.

One solution is to use "require branches be up to date" feature in Github. However, for larger repos with multiple users, this becomes annoying as every PR needs to be updated whenever another, completely unrelated PR is merged. When a certain number of concurrent users is reached, it becomes a real problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    StalefeatureNew functionality/enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions