Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Disable broken and outdated CI #39467

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from

Conversation

tobiasdiez
Copy link
Contributor

@tobiasdiez tobiasdiez commented Feb 6, 2025

Many of the CI runs after a new release are failing, for months now, see eg https://github.com/sagemath/sage/actions/runs/12979684199/job/36218126145. Some of these failures are genuine (eg a certain package cannot be built on a certain system) and some others are due to constraints of the build system (eg running out of free space). Since there is very little point in senselessly burning energy, all runs that were failing for the last releases are disabled. Once the underlying issues are fixed, they can be easily be re-enabled.

Moreover, the "minimal" runs where only a couple of systems packages are installed and most are build using sage are removed, keeping only the "standard" where all available system packages (corresponding to standard sage packages) are installed.

New test run: https://github.com/tobiasdiez/sage/actions/runs/13199372232/job/36847711005

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

Copy link

github-actions bot commented Feb 6, 2025

Documentation preview for this PR (built with commit 1364c41; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@user202729
Copy link
Contributor

There's a risk of we just forget to reenable it. Is there a good way to do this dynamically (i.e. check which tests the last release fail and skip these)?

@tobiasdiez
Copy link
Contributor Author

There's a risk of we just forget to reenable it.

I'll open an issue where we can track which systems are failing, so we don't forget it. The issue tracker might actually be a more visible place in the first place as most people will not check the CI runs.

Is there a good way to do this dynamically (i.e. check which tests the last release fail and skip these)?

Not that I know.

@tobiasdiez tobiasdiez marked this pull request as ready for review February 7, 2025 12:04
@tobiasdiez tobiasdiez requested review from dimpase and kwankyu February 7, 2025 12:04
@dimpase
Copy link
Member

dimpase commented Feb 7, 2025

Great, thanks for taking care of this.

@dimpase

This comment was marked as off-topic.

@kwankyu
Copy link
Collaborator

kwankyu commented Feb 8, 2025

Removing things in CI may break other things elsewhere. Especially the developer guide. In particular, https://doc-release--sagemath.netlify.app/html/en/developer/portability_testing. Did you check?

The docker images created by CI linux are used by developers. The sage binder repo (https://github.com/sagemath/sage-binder-env) is using them (in particular the "minimal" image). The interactive sage doc relies on them. This PR will break the doc.

Changes affecting developers widely should be discussed or at least posted on sage-devel. This PR falls in the category.

all runs that were failing for the last releases are disabled. Once the underlying issues are fixed, they can be easily be re-enabled.

We do not remove code for temporary change. Do not invent a new protocol that code is removed to be disabled.

Improving CI is good, but the present PR is also destructive. I object to this PR.

@kwankyu kwankyu added disputed PR is waiting for community vote, see https://groups.google.com/g/sage-devel/c/IgBYUJl33SQ and removed s: positive review labels Feb 8, 2025
@dimpase
Copy link
Member

dimpase commented Feb 8, 2025

@kwankyu What exactly is broken by this PR?
Please point it out. This PR is removing CI bits which have been broken for a long time. There is nothing wrong with this.

@dimpase

This comment was marked as abuse.

@dimpase dimpase added s: needs info and removed disputed PR is waiting for community vote, see https://groups.google.com/g/sage-devel/c/IgBYUJl33SQ labels Feb 8, 2025
@user202729
Copy link
Contributor

Technically you're right in that this merely remove part of CI that has been broken by some other change made months ago (thus doesn't "in addition" break anything), and reverting this is as simple as a git revert, but I think there is a small disadvantage in deleting the code entirely (compared to e.g. just comment it out): people unfamiliar with the change, coming across the file, would have no indication that something was temporarily disabled.

I don't personally use the minimal configurations and have no strong opinion on whether they're actually useful to developers. Of course having more configurations lead to additional maintenance burden and spent computing power (such as the maintenance cost needed now to make the minimal configuration build again), the cost may not be justified by the usefulness to developers/users.

Anyway, since the intention of this PR is to temporarily disable the run until the bug is fixed, can't we just comment it out?

I mean, we're all volunteers, if anyone volunteers to fix the minimal configurations then of course that will supersede this pull request and everyone are happy [1]… but if nobody does, the feature unfortunately will remain broken.

[1] maybe except those who prefer the minimal configurations to be deleted anyway, but I think the usual workflow is deleting a feature requires 1-year deprecation period and/or announcement of some sort.

@dimpase

This comment was marked as off-topic.

@kwankyu
Copy link
Collaborator

kwankyu commented Feb 8, 2025

@kwankyu What exactly is broken by this PR? Please point it out. This PR is removing CI bits which have been broken for a long time. There is nothing wrong with this.

Did you see the section of the developer guide that I pointed out?

The removed chunks of ci-linux are responsible to push various docker images. One of the image, ubuntu-jammy-standard, is used in the CI check workflows for PRs. This PR will collapse the whole CI checks.

Other images, ubuntu-jammy-minimal-with-targets and ubuntu-jammy-minimal-with-system-packages, are used in sage-binder-env. This PR will collapse it and the interactive sage doc that is using it.

@user202729
Copy link
Contributor

user202729 commented Feb 8, 2025

Can we not escalate this, thanks.

Anyway, I think a good compromise is

  • just merge this
  • open an issue to track which systems it fails on (i.e. equivalent to saying "it is a known bug that the build fails on system X")
  • if someone comes forward with a pull request to fix it later we should incorporate it (the burden is on them to show it works well across multiple operating systems, and we may add a big red warning that tool X or package Y is better installed with operating system installer)

Do you think this is reasonable? (anyway I'm not a maintainer and would be happy with anything)

p/s. @kwankyu , I don't really completely understand what's going on, but if the particular CI has been failing for months, how come the incremental things etc. still work (this is test-new right?) Or does this PR also remove working runs?

@dimpase
Copy link
Member

dimpase commented Feb 23, 2025

I understand that @orlitzky basically stopped doing anything related to Sage the distro. I will do the same sooner or later, as given the ongoing pushback against its simplification, it's not productive.

Please separate the two things: the build system and the CI infrastructure. We are discussing here about the CI Linux. Why do you keep talking about the complicated build system, in particular, what should constitute "_prereq" and "standard packages"?

Because these two things are tied up together. The main objection I heard is that without the current sage the distro setting up CI runs is more complicated.

@dimpase
Copy link
Member

dimpase commented Feb 23, 2025

If you think the whole CI Linux is just useless, then we don't need to continue discussion here.

In the present shape it's not very useful, indeed, and it improving it is important.

@kwankyu
Copy link
Collaborator

kwankyu commented Feb 23, 2025

Please separate the two things: the build system and the CI infrastructure. We are discussing here about the CI Linux. Why do you keep talking about the complicated build system, in particular, what should constitute "_prereq" and "standard packages"?

Because these two things are tied up together.

How? The CI Linux (I mean the code in .ci and .github) does not change whether gcc is in "_prereq" or not, or whether "standard packages" consists of 500 or 100 packages.

Off-topic:

... I will do the same sooner or later, as given the ongoing pushback against its simplification, it's not productive.

Testing less sage-the-distribution would work, if at all, toward "sooner".

max_parallel: 50

standard-constraints_pkgs-norequirements:
if: ${{ success() || failure() }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just turn this off. Please do not remove things broken. They may be fixed later.


standard-sitepackages:
if: ${{ success() || failure() }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just turn this off. Please do not remove things broken. They may be fixed later.

max_parallel: 24

maximal-pre:
if: ${{ success() || failure() }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intended to test "optional packages" installed as system package.

docker_push_repository: ghcr.io/${{ github.repository }}/

optional:
if: ${{ success() || failure() }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intended to test "optional sage packages"

targets_optional: '$(echo $(export PATH=build/bin:$PATH && sage-package list :optional: --has-file "spkg-install.in|spkg-install|requirements.txt" --no-file "huge|has_nonfree_dependencies" | grep -v sagemath_doc | grep -v ^_))'

experimental:
if: ${{ success() || failure() }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intended to test "experimental sage packages"

@kwankyu
Copy link
Collaborator

kwankyu commented Feb 24, 2025

In the present shape it's not very useful, indeed, and it improving it is important.

#39009 puts CI Linux in good shape.

@user202729
Copy link
Contributor

I have already explained many times why "minimal" configs and the corresponding vendoring of every Python and non-Python package sucks the life out of the project, which is scientic software, and not a distribution.

I haven't been looking at the maths-related issues in Sage for months, because there is always something more urgent, related to building and infrastructure. And it's mostly sage the distro -related. I recall @orlitzky reporting basically the same experience. Both him and I are active research mathematicians with PhDs and research related to maths done by Sage, but we are denied an opportunity to work on maths in Sage, for years. And this is not improving, installing Sage for development isn't getting much easier. To the contrary, the number of Sage the distro packages will reach 500.

I understand that @orlitzky basically stopped doing anything related to Sage the distro. I will do the same sooner or later, as given the ongoing pushback against its simplification, it's not productive.

On one hand, while I don't understand what exactly the work consist of, I'm sure many of us appreciate your effort in creating the releases.

On the other hand, I feel you aren't expressing yourself well, which makes it sound like you're "fighting a religious war against anything that is called minimal", which certainly doesn't help your case.

So: can you explain how exactly does this pull request make your (@dimpase 's) life easier compared to (#39009 with gcc python gfortran added to prereq and a few more if: false sprinkled in)? The build system remains exactly as complicated and finicky as before.

@dimpase
Copy link
Member

dimpase commented Feb 26, 2025

So: can you explain how exactly does this pull request make your (@dimpase 's) life easier compared to (#39009 with gcc python gfortran added to prereq and a few more if: false sprinkled in)? The build system remains exactly as complicated and finicky as before.

as soon as minimal in its present form is gone, we can start simplifying the build system to get rid of a lot of complexity there. Otherwise it's will be blocked with the argument that it's needed to support minimal.

@dimpase
Copy link
Member

dimpase commented Feb 26, 2025

meanwhile, @kwankyu engages in hooliganism - coming to my random PR (related to macOS, ironically) and leaving a (totally irrelevant there) comment #39492 (comment)

It seems that we need CI macOS incremental / minimal | standard...

Is he looking to get blocked?

@kwankyu
Copy link
Collaborator

kwankyu commented Feb 26, 2025

So: can you explain how exactly does this pull request make your (@dimpase 's) life easier compared to (#39009 with gcc python gfortran added to prereq and a few more if: false sprinkled in)? The build system remains exactly as complicated and finicky as before.

as soon as minimal in its present form is gone, we can start simplifying the build system to get rid of a lot of complexity there. Otherwise it's will be blocked with the argument that it's needed to support minimal.

What do you mean by "minimal in its present form is gone"? Which of

(1) _prereq contains gcc, python, gfortran

(2) _prereq contains gcc, python, gfortran, and most of standard packages

?

Unless all standard packages are required to be installed as system packages, "minimal" configuration in CI still makes sense.

@user202729
Copy link
Contributor

user202729 commented Feb 26, 2025

simplifying the build system to get rid of a lot of complexity there

That's a good goal.

But there's a technical issue I don't understand — you can remove support for building from source for common packages like gcc python etc. (which if I understood correctly would count toward "what goes into _prereq"), but even if you move everything installable to _prereq, minimal CI jobs would still run just fine. (or at least about as fine as how it is currently)

Can you explain that?

Or, more simply: what simplification are you envisioning for the build system?

(personally I use conda+meson, so I haven't need to touch the sage-the-distro build system for a long time. So I might make some wrong assumptions here)

@dimpase
Copy link
Member

dimpase commented Feb 27, 2025

So: can you explain how exactly does this pull request make your (@dimpase 's) life easier compared to (#39009 with gcc python gfortran added to prereq and a few more if: false sprinkled in)? The build system remains exactly as complicated and finicky as before.

as soon as minimal in its present form is gone, we can start simplifying the build system to get rid of a lot of complexity there. Otherwise it's will be blocked with the argument that it's needed to support minimal.

What do you mean by "minimal in its present form is gone"? Which of

(1) _prereq contains gcc, python, gfortran

at least these, and the rest of the "toolchain", e.g. patch.

(2) _prereq contains gcc, python, gfortran, and most of standard packages

A lot of standard packages are Python packages (numerically, a vast majority).
No normal Python project vendors a Python package hosted on PyPI, unless they have to patch it in a way that can't be a monkey-patch. Their versions (possibly, hashes, if one does not trust PyPI) suffice, there's no need to put them on mirrors, download them in upstream/, have dedicated entries for them in build/pkgs/, etc.
pip (or its alternatives such as uv) and PyPI do all of it much better. There is hardly a need to even pin every package involved; e.g. why do we care about dependencies of sphinx, or of pip, or of notebook?
These are mature projects on their own, all you need to know is their versions. They can manage their dependencies better than us.

The complexity should be reduced from two sides - putting more packages in _prereq, and getting rid of dependencies of dependencies.

@kwankyu
Copy link
Collaborator

kwankyu commented Feb 27, 2025

No one would object to reducing complexity of the build system. The build system changes first, and then CI will follow. Not the other way around.

As far as I understand, the complexity of the current build system is mainly rooted in the long-held doctrine that sage should be buildable from source without internet connection. Abolishing the doctrine seems the first thing to do to proceed in the direction of your vision. I am all for it, but I think there are people against it...

@dimpase
Copy link
Member

dimpase commented Feb 27, 2025

No one would object to reducing complexity of the build system. The build system changes first, and then CI will follow. Not the other way around.

you cannot CI with build targets/configs which are not there any more. So it can't be done sequentially.

As far as I understand, the complexity of the current build system is mainly rooted in the long-held doctrine that sage should be buildable from source without internet connection. Abolishing the doctrine seems the first thing to do to proceed in the direction of your vision. I am all for it, but I think there are people against it...

That's not a problem, just populate your pip cache with all the packages not in upstream/ that Sage needs, and then you don't need an internet connection.

@tobiasdiez
Copy link
Contributor Author

It seems to me all arguments have been exchanged now (actually multiple times) and it is long enough under "disputed" that people interested in it could have weighted in. So let's get this in and we reiterate on the CI in follow-ups.

Counting:
+1: me as author, @dimpase
-1: @kwankyu

@tobiasdiez
Copy link
Contributor Author

Follow-up is at #39603 for anyone interested in fixing the most serious issues.

@kwankyu
Copy link
Collaborator

kwankyu commented Feb 27, 2025

No one would object to reducing complexity of the build system. The build system changes first, and then CI will follow. Not the other way around.

you cannot CI with build targets/configs which are not there any more. So it can't be done sequentially.

If you makes changes to targets/configs in Makefile.in or config.ac, then you need to adjust CI reflecting the changes in the build system. If you do both at the same time, that is nice.

But if you make changes in the build system without adjusting CI, and thus CI is broken temporarily until someone fixes CI, then that is not ideal. But that is really not a big deal.

That's not a problem, just populate your pip cache with all the packages not in upstream/ that Sage needs, and then you don't need an internet connection.

OK.

vbraun pushed a commit to vbraun/sage that referenced this pull request Mar 1, 2025
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Many of the CI runs after a new release are failing, for months now, see
eg https://github.com/sagemath/sage/actions/runs/12979684199/job/3621812
6145. Some of these failures are genuine (eg a certain package cannot be
built on a certain system) and some others are due to constraints of the
build system (eg running out of free space). Since there is very little
point in senselessly burning energy, all runs that were failing for the
last releases are disabled. Once the underlying issues are fixed, they
can be easily be re-enabled.

Moreover, the "minimal" runs where only a couple of systems packages are
installed and most are build using sage are removed, keeping only the
"standard" where all available system packages (corresponding to
standard sage packages) are installed.

New test run: https://github.com/tobiasdiez/sage/actions/runs/1319937223
2/job/36847711005

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

- sagemath#39251 (to resolve merge conflicts)

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39467
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik, Kwankyu Lee, Tobias Diez, user202729
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
disputed PR is waiting for community vote, see https://groups.google.com/g/sage-devel/c/IgBYUJl33SQ s: positive review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants