Skip to content

Use RetroCap.jl to add monotonic "caps" (upper-bounded compat entries) to all packages #11114

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

Merged
merged 1 commit into from
Sep 8, 2020

Conversation

DilumAluthge
Copy link
Member

@DilumAluthge DilumAluthge commented Mar 17, 2020

This pull request uses RetroCap.jl to add monotonic upper-bounded compat entries to all packages.

cc: @KristofferC

The script to reproduce this PR:

julia> import Pkg
julia> Pkg.add("RetroCap")
julia> import RetroCap
julia> rm("General"; force = true, recursive = true)
julia> run(`git clone [email protected]:JuliaRegistries/General.git General`)
julia> cd("General")
julia> run(`git checkout master`)
julia> run(`git checkout -B dpa/add-caps`)
julia> RetroCap.add_caps(RetroCap.MonotonicUpperBound(), RetroCap.CapLatestVersion(), pwd()) 
julia> run(`git add -A`)
julia> run(`git commit -m "Use RetroCap.jl to add monotonic \"caps\" (upper-bounded compat entries) to all packages"`)
julia> run(`git push --force origin dpa/add-caps`)
julia> cd("..")
julia> rm("General"; force = true, recursive = true)

@DilumAluthge DilumAluthge changed the title Use RetroCap.jl to add monotonic upper bounds to all packages Use RetroCap.jl to add monotonic "caps" (upper-bounded compat entries) to all packages Mar 17, 2020
@DilumAluthge
Copy link
Member Author

@maleadt Can you run PkgEval on the master branch of the General registry and on this PR branch (dpa/add-caps), and compare the two runs? Since this PR modifies so many packages, we'd like to make sure that it doesn't break anything.

@maleadt
Copy link
Contributor

maleadt commented Mar 19, 2020

@KristofferC
Copy link
Member

A bit too many just to be able to merge but not too crazy. Most of those resolver errors would be good to investigate.

@KristofferC
Copy link
Member

KristofferC commented Mar 19, 2020

@DilumAluthge, does RetroCap.jl respect yanked releases (ignores them)?

@DilumAluthge
Copy link
Member Author

@DilumAluthge, does RetroCap.jl respect yanked releases (ignores them)?

No. We should fix that, I.e. tell RetroCap to ignore yanked releases.

@DilumAluthge
Copy link
Member Author

Some of these failures are due to the fact that in 1.3.1, if something is "fixed" in the project manifest, then it doesn't get re-resolved when we resolve test dependencies.

That is, we first resolve the project dependencies, and we fix those, and then we resolve test dependencies with no possibility of changing the project dependencies.

I believe this has been fixed in either 1.4 or 1.5, in which we now have the ability to re-resolve project dependencies when we resolve test-dependencies.

@DilumAluthge
Copy link
Member Author

I think the tiered resolver will be available in 1.4. Let's put this on hold until 1.4 is released, and then we can return to it.

@DilumAluthge
Copy link
Member Author

So, I think most of the "unsatisfiable" errors should be fixed on 1.4 with the tiered resolver.

As for the others, here is my stream of consciousness:


One of these is really puzzling. The latest release of AIBECS is AIBECS version 0.4.13. It was released 21 days ago. But the retrocap pkgeval job tested AIBECS 0.2.9:

The master pkgeval job correctly tested AIBECS 0.4.13.:

Why did the two jobs test such drastically different versions of the same package?


Actually, that's not the only package I saw this on. Take InverseDistanceWeighting. Master ran it on 0.3.2:

But retrocap branch ran it on 0.3.0:


A whole bunch of these are a _vec not defined error in OrdinaryDiffEq:

ERROR: LoadError: UndefVarError: _vec not defined
Stacktrace:
 [1] include at ./boot.jl:328 [inlined]
 [2] include_relative(::Module, ::String) at ./loading.jl:1105
 [3] include(::Module, ::String) at ./Base.jl:31
 [4] top-level scope at none:2
 [5] eval at ./boot.jl:330 [inlined]
 [6] eval(::Expr) at ./client.jl:425
 [7] top-level scope at ./none:3
in expression starting at /home/pkgeval/.julia/packages/OrdinaryDiffEq/TUKTm/src/OrdinaryDiffEq.jl:41
ERROR: LoadError: Failed to precompile OrdinaryDiffEq [1dea7af3-3e70-54e6-95c3-0bf5283fa5ed] to /home/pkgeval/.julia/compiled/v1.3/OrdinaryDiffEq/DlSvy_Eo4xI.ji.

Some of these seem to be network errors during the build step of a package. For example:

  • Error: Download failed: curl: (7) Failed to connect to github.com port 443: Connection timed out

Some of these are artifact installation errors. For example:

  • ERROR: Unable to automatically install 'OpenSpecFun' from '/home/pkgeval/.julia/packages/OpenSpecFun_jll/HMSwk/Artifacts.toml'
  • ERROR: Unable to automatically install 'Rmath' from '/home/pkgeval/.julia/packages/Rmath_jll/dkU4a/Artifacts.toml'
  • ERROR: Unable to automatically install 'Xorg_fixesproto' from '/home/pkgeval/.julia/packages/Xorg_fixesproto_jll/m5mh5/Artifacts.toml'

It would be nice if we could automatically retry the ones that are artifact installation errors.


There are some others that seem like compat problems on the master branch of General.

  • For example, the latest registered version of BEAST (BEAST 1.1.0) claims compatibility with CompScienceMeshes = "0.2.2-0". But, BEAST directly accesses fields of structs in CompScienceMeshes. And CompScienceMeshes 0.2.5 has different field names for one of the structs than does CompScienceMeshes 0.2.2. But BEAST tries to access the field using the field names from CompScienceMeshes 0.2.2. So, BEAST is not actually compatible with CompScienceMeshes 0.2.2. But the master branch of General says that it is. This isn't actually a problem with this PR. But anyway, we can fix that in this PR by e.g. manually changing the compat entry for BEAST 1.1.0 to be CompScienceMeshes = "0.2.2".

@DilumAluthge
Copy link
Member Author

DilumAluthge commented Mar 21, 2020

@maleadt Do you think you could do another PkgEval comparison, but this time, use the latest Julia-1.4 release candidate?

@DilumAluthge DilumAluthge force-pushed the dpa/add-caps branch 2 times, most recently from 9f34f61 to 905542c Compare March 21, 2020 07:57
@maleadt
Copy link
Contributor

maleadt commented Mar 21, 2020

On v1.4.0-rc2+retrocap, out of 3254 packages 1288 passed, 1660 failed, 5 got killed and 301 were skipped.

Comparing against v1.4.0-rc2+general:
In summary, 0 packages now succeed, while 0 have started to fail.

@DilumAluthge
Copy link
Member Author

DilumAluthge commented Mar 21, 2020

Well, that’s quite nice!

@KristofferC how do you feel about merging this once 1.4 is released and 1.4 binaries are available for download?

@DilumAluthge
Copy link
Member Author

1.4.0-rc2 is exactly the same as 1.4.0, right?

If so, what do you guys say we merge this PR?

@KristofferC
Copy link
Member

I don't really understand how 1.4 could fix those cases like

A whole bunch of these are a _vec not defined error in OrdinaryDiffEq:

Also, I am surprised not a single package started failing or passing. Usually, there are a few packages that are noisy and pass / fail a bit randomly.

@KristofferC
Copy link
Member

KristofferC commented Mar 23, 2020

For example, I tried to add AIBECS and test it and got:

(Caps) pkg> test AIBECS
    Testing AIBECS
...
ERROR: Unsatisfiable requirements detected for package Unitful [1986cc42]:
 Unitful [1986cc42] log:
 ├─possible versions are: [0.9.0, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.14.0, 0.15.0, 0.16.0, 0.17.0, 0.18.0, 1.0.0] or uninstalled
 ├─restricted to versions 1 by an explicit requirement, leaving only versions 1.0.0
 └─restricted by compatibility requirements with WorldOceanAtlasTools [04f20302] to versions: [0.9.0, 0.10.0, 0.11.0, 0.12.0, 0.13.0, 0.14.0, 0.15.0, 0.16.0, 0.17.0, 0.18.0] — no versions left
   └─WorldOceanAtlasTools [04f20302] log:
     ├─possible versions are: [0.2.0-0.2.4, 0.3.0-0.3.5, 0.4.0-0.4.1] or uninstalled
     └─restricted to versions * by an explicit requirement, leaving only versions [0.2.0-0.2.4, 0.3.0-0.3.5, 0.4.0-0.4.1]

Seems like that should have happened in PkgEval as well?

Note that the reason for this failure is exactly due to the reason that we want to fix. On standard General it uses an old version of WorldOceanAtlasTools which does not have compat on Unitful.

@KristofferC
Copy link
Member

A lot of the failures are from RecipesBase that tagged a new breaking release because it caused the highly coupled Plots.jl to fail........

@maleadt
Copy link
Contributor

maleadt commented Mar 23, 2020

A lot of the failures are from RecipesBase that tagged a new breaking release because it caused the highly coupled Plots.jl to fail........

I was surprised as well, but made sure to compare this PR against two commits prior so that I could make sure one package got legitimately upgraded. Anyway, let me rerun just to be sure. @DilumAluthge, can you rebase once more to make sure it includes a fixed RecipesBase (or instead rebase right before that breaking release?).

@DilumAluthge
Copy link
Member Author

A lot of the failures are from RecipesBase that tagged a new breaking release because it caused the highly coupled Plots.jl to fail........

I was surprised as well, but made sure to compare this PR against two commits prior so that I could make sure one package got legitimately upgraded. Anyway, let me rerun just to be sure. @DilumAluthge, can you rebase once more to make sure it includes a fixed RecipesBase (or instead rebase right before that breaking release?).

Yep I'll do it when I get back to a computer.

@DilumAluthge
Copy link
Member Author

Alright, I ran RetroCap on the latest General master.

@maleadt
Copy link
Contributor

maleadt commented Mar 24, 2020

OK, so this was a false positive indeed, sorry for that. New results up here:

In summary, 44 packages now succeed, while 112 have started to fail.

However, only 3 unsatisfiables.

@KristofferC
Copy link
Member

KristofferC commented Mar 24, 2020

I think something weird is happening with the second run, almost all failures seem to be related do some download problems:

Cloning failure:

�[?25l�[2K�[?25hERROR: failed to clone from https://github.com/queryverse/IteratorInterfaceExtensions.jl.git, error: GitError(Code:ERROR, Class:OS, failed to connect to github.com: Connection timed out)

Why is it cloning? Means the tarball download failed:

  Installed IterTools ────────── v1.3.0
    Cloning [a81c6b42-2e10-5240-aca2-a61377ecd94b] Compose from https://github.com/GiovineItalia/Compose.jl.git
�[?25l    Fetching: [>                                        ]  0.0 %

Other download failures:

│ [ Info: Downloading https://github.com/bicycle1885/ZlibBuilder/releases/download/v1.0.4/Zlib.v1.2.11.x86_64-linux-gnu.tar.gz to /home/pkgeval/.julia/packages/ImageMagick/vMfoS/deps/usr/downloads/Zlib.v1.2.11.x86_64-linux-gnu.tar.gz...
│ [ Info: Downloading https://github.com/JuliaIO/LibpngBuilder/releases/download/v1.0.3/libpng.v1.6.37.x86_64-linux-gnu.tar.gz to /home/pkgeval/.julia/packages/ImageMagick/vMfoS/deps/usr/downloads/libpng.v1.6.37.x86_64-linux-gnu.tar.gz...
│ [ Info: Downloading https://github.com/JuliaIO/LibJPEGBuilder/releases/download/v10/libjpeg.v9.0.0-b.x86_64-linux-gnu.tar.gz to /home/pkgeval/.julia/packages/ImageMagick/vMfoS/deps/usr/downloads/libjpeg.v9.0.0-b.x86_64-linux-gnu.tar.gz...
│ ┌ Error: Download failed: curl: (22) The requested URL returned error: 401 UNAUTHORIZED
│ curl: (22) The requested URL returned error: 401 UNAUTHORIZED
│ [ Info: Attempting to create directory /home/pkgeval/.julia/packages/CMake/ULbyn/deps/downloads
│ [ Info: Downloading file https://github.com/Kitware/CMake/releases/download/v3.15.3/cmake-3.15.3-Linux-x86_64.tar.gz
│ ERROR: LoadError: failed process: Process(`curl -f -o /home/pkgeval/.julia/packages/CMake/ULbyn/deps/downloads/cmake-3.15.3-Linux-x86_64.tar.gz -L https://github.com/Kitware/CMake/releases/download/v3.15.3/cmake-3.15.3-Linux-x86_64.tar.gz`, ProcessExited(22)) [22]
│ 

etc.

@maleadt
Copy link
Contributor

maleadt commented Mar 24, 2020

Maybe GitHub rate limited me? I can try rerunning. But aren't failures due to this change mostly going to manifest as failures to install

@DilumAluthge
Copy link
Member Author

401 does suggest rate limiting.

The reason it doesn’t manifest at install time is that the build step doesn’t actually throw errors. So we don’t realize that the build failed until we try to import.

@DilumAluthge
Copy link
Member Author

Should I rerun RetroCap, and then we can do another PkgEval run?

@DilumAluthge
Copy link
Member Author

DilumAluthge commented Sep 2, 2020

Just as an example, if I apply the following patch to the dpa/add-caps branch, it fixes the unsatisfiable error for ODEInterfaceDiffEq:

From 4c6496dcb96065fd26777b22ed484a7f27db3d42 Mon Sep 17 00:00:00 2001
From: Dilum Aluthge <[email protected]>
Date: Wed, 2 Sep 2020 06:27:23 -0400
Subject: [PATCH] Fix ODEInterfaceDiffEq

---
 D/DiffEqBiological/Compat.toml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/D/DiffEqBiological/Compat.toml b/D/DiffEqBiological/Compat.toml
index f8ee030c24..c0bc7e5b8b 100644
--- a/D/DiffEqBiological/Compat.toml
+++ b/D/DiffEqBiological/Compat.toml
@@ -34,7 +34,6 @@ Parameters = "0.10.3 - 0.12"
 DiffEqBase = "5.1-5"

 ["3.8-3"]
-DataStructures = "0.0.0 - 0.17"
 MacroTools = "0.0.0 - 0.5"
 Parameters = "0.0.0 - 0.12"
 Reexport = "0.0.0 - 0.2"
@@ -46,6 +45,9 @@ DiffEqBase = "5"
 ["3.8-4"]
 DiffEqJump = "6"

+["3.8-4.0.1"]
+DataStructures = "0.0.0 - 0.17"
+
 ["3.8.1-3.9.0"]
 Compat = "0.0.0 - 3"

@@ -62,7 +64,6 @@ Latexify = ["0.11", "2"]

 ["4.0"]
 Compat = "0.0.0 - 3"
-DataStructures = "0.0.0 - 0.17"
 DynamicPolynomials = "0.0.0 - 0.3"
 HomotopyContinuation = "0.0.0 - 1"
 MacroTools = "0.0.0 - 0.5"
@@ -73,6 +74,7 @@ SymEngine = "0.0.0 - 0.7"
 julia = "1"

 ["4.0.2-4.0"]
+DataStructures = "0.0.0 - 0.18"
 Latexify = "0.11.0 - 0.12"

 ["4.1"]
--
2.28.0

@DilumAluthge
Copy link
Member Author

DilumAluthge commented Sep 2, 2020

To explain a little bit on the strategy for fixing these: I look at the PkgEval log for the pre-cap registry (i.e. the master branch of the registry) - the log includes a full printout of all of the specific package versions that were used during the test suite. Then, I add my dpa/add-caps registry to Julia. Now I go down the list and do ] add [email protected]; ] pin [email protected] for each Foo in the list of packages that were resolved during the test suite. This makes it much easier to quickly and easily identify the problem.

@DilumAluthge
Copy link
Member Author

@KristofferC you cool with me updating this branch and merging it?

@KristofferC
Copy link
Member

Should be ok, but it would indeed be good to follow up with the ones that started failing.

@DilumAluthge
Copy link
Member Author

Yep. There are 12 unsatisfiables, which I will fix as soon as I merge this.

  1. FSInteraction: was ok (missing), now fail (unsatisfiable)
  2. Seleroute: was ok (missing), now fail (unsatisfiable)
  3. TropicalYao: was ok (missing), now fail (unsatisfiable)
  4. Sundials: was ok (missing), now fail (unsatisfiable)
  5. DiffEqJump: was ok (missing), now fail (unsatisfiable)
  6. YaoLang: was ok (missing), now fail (unsatisfiable)
  7. Dashboards: was ok (missing), now fail (unsatisfiable)
  8. WordCloud: was ok (missing), now fail (unsatisfiable)
  9. BioMakie: was ok (missing), now fail (unsatisfiable)
  10. AIBECS: was ok (missing), now fail (unsatisfiable)
  11. NeuroAnalysis: was ok (missing), now fail (unsatisfiable)
  12. ODEInterfaceDiffEq: was ok (missing), now fail (unsatisfiable)

@DilumAluthge
Copy link
Member Author

I just merged #21035, which fixes those 12 unsatisfiables.

Hopefully there will only be at most a handful of additional error reports.

timholy added a commit to JuliaIO/ImageMagick.jl that referenced this pull request Sep 9, 2020
timholy added a commit to JuliaIO/ImageMagick.jl that referenced this pull request Sep 9, 2020
xref JuliaRegistries/General#11114
By switching to depending on just ImageCore we make the dependencies
easier to maintain (e.g., JuliaIO/QuartzImageIO.jl#66).
timholy added a commit to JuliaIO/ImageMagick.jl that referenced this pull request Sep 9, 2020
xref JuliaRegistries/General#11114
By switching to depending on just ImageCore we make the dependencies
easier to maintain (e.g., JuliaIO/QuartzImageIO.jl#66).
timholy added a commit to JuliaIO/ImageMagick.jl that referenced this pull request Sep 10, 2020
xref JuliaRegistries/General#11114
By switching to depending on just ImageCore we make the dependencies
easier to maintain (e.g., JuliaIO/QuartzImageIO.jl#66).
@timholy
Copy link
Member

timholy commented Sep 10, 2020

Thanks for doing this, @DilumAluthge! I do think this will make a lot of things more robust.

We fixed a couple of compat issues for Julia 1.0 in JuliaIO/ImageMagick.jl#186. (Reference example: https://github.com/JuliaImages/ImageCore.jl/pull/140/checks?check_run_id=1090119276). Note that this was a conflict between the package (which loaded fine) and a test dependency (where version checks are performed after Julia commits to a particular set of versions for the package itself).

@DilumAluthge
Copy link
Member Author

Note that this was a conflict between the package (which loaded fine) and a test dependency (where version checks are performed after Julia commits to a particular set of versions for the package itself).

Yep, on more recent versions of Julia, the tiered resolver can work around this, but obviously that's not available on Julia 1.0.

Let me know if you also want to add those compat fixes into the General registry itself!

@timholy
Copy link
Member

timholy commented Sep 10, 2020

Let's see how far we get with the one-package-at-a-time approach. Releasing an updated version of ImageMagick was enough to solve the issues for ImageCore---I suspect that most of the issues will arise from packages that jumped to a minimum of 1.3 to exploit the lovely artifacts system, and JuliaImages doesn't really have that many packages with binary dependencies.

bors bot added a commit to JuliaRegistries/RegistryCI.jl that referenced this pull request Sep 22, 2020
269: Do not automerge packages that have `[compat]` entries of the form `PkgA = "0"`, etc. r=DilumAluthge a=DilumAluthge

I have realized that some people have `[compat]` entries of the form:
```toml
[compat]
PkgA = "0"
```

This `[compat]` entry includes an infinite number of breaking releases, which defeats the purpose of having upper-bounded `[compat]` entries.

**The good news**: [RetroCap.jl](https://github.com/bcbi/RetroCap.jl) already recognizes that these `[compat]` entries are not true upper-bounded `[compat]` entries. Therefore, when we did the recent retrocapping in JuliaRegistries/General#11114, RetroCap.jl fixed these `[compat]` entries, replacing entries like this:
```toml
[compat]
PkgA = "0"
```

With something like this:
```toml
[compat]
PkgA = "0.0.0 - 0.3.7"
```

Where `0.3.7` would be the latest registered version of `PkgA`.

**The bad news**: AutoMerge currently considers `PkgA = "0"` to be an upper-bounded `[compat]` entry. Therefore, AutoMerge is currently merging packages that have these `[compat]` entries, which is thus actively undoing the work we did in JuliaRegistries/General#11114.

This pull request patches AutoMerge so that it no longer considers `PkgA = "0"` to be an upper-bounded `[compat]` entry.


Co-authored-by: Dilum Aluthge <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants