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

Allow CI to run on old branches #26481

Closed
saraedum opened this issue Oct 12, 2018 · 9 comments
Closed

Allow CI to run on old branches #26481

saraedum opened this issue Oct 12, 2018 · 9 comments

Comments

@saraedum
Copy link
Member

CircleCI and GitLab CI currently both build-from-latest using sagemath/sagemath-dev:develop. This leads to annoying errors when building from older branches as the build process won't find the commit that sagemath-dev:develop was built from in that branch.

Instead, we should build from sagemath-dev:latest-tag-in-branch, so currently we would build from sagemath-dev:8.4.rc0 for new branches but also branches based on older states of the repository would still work. In particular, the build is more reproducible. Rerunning a build later, does not try to build from a different base build.

CC: @embray

Component: distribution

Keywords: ContinuousIntegration

Author: Julian Rüth

Branch/Commit: u/saraedum/26481 @ 28c48df

Reviewer: Michael Orlitzky

Issue created by migration from https://trac.sagemath.org/ticket/26481

@saraedum saraedum added this to the sage-8.4 milestone Oct 12, 2018
@saraedum
Copy link
Member Author

Branch: u/saraedum/26481

@saraedum
Copy link
Member Author

comment:2

I have not tested whether all the relevant combinations work yet.


New commits:

28c48dfAllow CI to run on old branches

@saraedum
Copy link
Member Author

Commit: 28c48df

@embray
Copy link
Contributor

embray commented Oct 28, 2018

comment:3

I have been getting bitten by this and it's confusing. That said, I wonder if this is really a good idea. For unmerged tickets we really want to make sure they work against the latest develop branch. Instead I think we should try to apply the ticket on top of the current develop.

Maybe that's what you're doing as well too; I might be missing something. I don't think there's much value in doing builds against old tags.

@embray
Copy link
Contributor

embray commented Oct 28, 2018

comment:4

E.g. If the last commit in the old branch is older than the current develop, then it should try automatically to rebase the branch on the newest develop, or merge it, and if there are merge conflicts then it should refuse to run the rest of the pipeline (on GitHub for example it generally won't run CI services if a PR has merge conflicts with the current master branch IIUC).

@saraedum
Copy link
Member Author

Changed keywords from none to ContinuousIntegration

@saraedum
Copy link
Member Author

saraedum commented Feb 6, 2020

comment:6

In principle I think you are right. But I have a feeling that this is going to cause quite some headaches if I think about typical reruns that we trigger manually. Say, I found out that an old tag did not build and push to docker hub. Now I click "retry" and it will actually merge in the latest develop and build that :(

So, there is ways to find out, and say, do not merge when you are on a tag. But maybe that's just adding too much complexity.

There's a reasonable message in the build log I think. Could not find commit cat docker/.commitin your local Git history. Please merge in the latest built develop branch to fix this: git fetch trac && git mergecat docker/.commit`. I think I'd just leave this alone.

@saraedum saraedum removed this from the sage-8.4 milestone Feb 6, 2020
@orlitzky
Copy link
Contributor

orlitzky commented Oct 4, 2021

comment:8

If the reporter/author says wontfix, I believe him.

@orlitzky
Copy link
Contributor

orlitzky commented Oct 4, 2021

Reviewer: Michael Orlitzky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants