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

Check result of prospective merge in CircleCI #2060

Open
Tracked by #765
timobrembeck opened this issue Feb 10, 2023 · 1 comment
Open
Tracked by #765

Check result of prospective merge in CircleCI #2060

timobrembeck opened this issue Feb 10, 2023 · 1 comment
Labels
💡 feature New feature or request ❗ prio: medium Should be scheduled in the forseeable future. 😱 effort: high Big change, which requires >12h
Milestone

Comments

@timobrembeck
Copy link
Member

timobrembeck commented Feb 10, 2023

Motivation

At the moment, the CircleCI tests only check the state of a specific branch. It does not check whether the result of a merged PR is valid as well. This is bad because sometimes, there is no actual file conflicts which git detects, but an implicit conflict of e.g. the migration files, or side-effects of tests etc.

Proposed Solution

Add a new job to circleci to merge the changes into the develop branch (locally on the CI server without pushing yet) and then re-run all other jobs to make sure that everything works both on the branch and also after merging.

Unfortunately, there is no straight forward way for doing this in CircleCI, see e.g. this discussions:

Alternatives

We could also require PRs to be up to date with the default branch before they can be merged. This would add a little bit of overhead for PR authors and require even more rebases than right now.

@timobrembeck timobrembeck added 💡 feature New feature or request ❗ prio: medium Should be scheduled in the forseeable future. 😱 effort: high Big change, which requires >12h labels Feb 10, 2023
@timobrembeck timobrembeck added this to the Backlog milestone Feb 10, 2023
@timobrembeck timobrembeck mentioned this issue Feb 13, 2023
33 tasks
@timobrembeck
Copy link
Member Author

I think a single job to re-run all other tests is probably a bad idea - it would double our current credit usage... Maybe we can add an initial step of the following kind:

  • Check if the current workflow belongs to a PR
    • If yes:
      • Check if there are git conflicts
        • If yes: Run the tests on the specific branch only
        • If no: Merge the PR locally and run the tests on the merged state
    • If no: Run the tests on the specific branch only

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 feature New feature or request ❗ prio: medium Should be scheduled in the forseeable future. 😱 effort: high Big change, which requires >12h
Projects
None yet
Development

No branches or pull requests

1 participant