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

Hoogle database backing stackage.org down? #7314

Closed
iustin opened this issue Feb 11, 2024 · 13 comments
Closed

Hoogle database backing stackage.org down? #7314

iustin opened this issue Feb 11, 2024 · 13 comments
Assignees

Comments

@iustin
Copy link

iustin commented Feb 11, 2024

Upon searching for any package, I get:

The given Hoogle database is not available.

[Return to snapshot homepage](https://www.stackage.org/lts-22.10)

Both in exact and free-form search mode. The list of packages can be displayed upon navigating to the respective snapshot, but searching is broken.

Let me know if this is the wrong repository to file such bugs against. Thanks!

@alaendle
Copy link
Member

Thanks for the report, currently we face some infrastructure issues.

@chreekat
Copy link
Member

Hey, I'll be fixing this today.

I found the cause of this particular problem. A new package in the latest LTS uses a version of Cabal syntax (3.4) that is not yet supported by the service that registers Haddocks in the Stackage database.

Feb 11 01:14:59 stackage-builder stackage-update-start[865892]: stackage-server-cron: Unable to parse cabal file from package nettle-0.3.1@sha256:14ed52a51d4e803034a15da15da355975de29cfa043446c01bfd698314ba7f7a,4418 (from Hackage)
Feb 11 01:14:59 stackage-builder stackage-update-start[865892]: - 0:0: Unsupported cabal-version 3.4. See https://github.com/haskell/cabal/issues/4899.
Feb 11 01:14:59 stackage-builder stackage-update-start[865892]: - 0:0: Unsupported cabal-version. See https://github.com/haskell/cabal/issues/4899.
Feb 11 01:14:59 stackage-builder stackage-update-start[865892]: The cabal file uses the cabal specification version 3.4, but we only support up to version 3.0.
Feb 11 01:14:59 stackage-builder stackage-update-start[865892]: Recommended action: upgrade your build tool (e.g., `stack upgrade`).
Feb 11 01:14:59 stackage-builder systemd[1]: stackage-update.service: Main process exited, code=exited, status=1/FAILURE
Feb 11 01:14:59 stackage-builder systemd[1]: stackage-update.service: Failed with result 'exit-code'.
Feb 11 01:14:59 stackage-builder systemd[1]: Failed to start Stackage server updater.

The immediate fix is fairly mechanical. Preventing this in the future is a good followup task.

@iustin
Copy link
Author

iustin commented Feb 12, 2024

Thanks a lot for the very fast reply! I can't comment on the actual fix, but on the prevention/detection - adding to monitoring a simple search query would help detect this faster.

Thanks again!

@chreekat
Copy link
Member

Here's the latest:

This won't get fixed today, unfortunately.

I was able to patch stackage-server to work with a newer LTS, but when I deployed the changes, both stackage-server (powering the website in general) and stackage-server-cron (powering the data migrations that enable haddock links) broke.

stackage-server started saying

Feb 12 14:28:27 stackage-builder stackage-server-start[3838488]: 12/Feb/2024:14:28:26 +0000 [Error#yesod-core] PersistMarshalError "Was unable to parse VersionRange: -any" @(yesod-core-1.6.25.1-2OdVfbPqtmLIYsvtMNdLda:Yesod.Core.Class.Yesod src/Yesod/Core/Class/Yesod.hs:705:6)

Feb 12 14:28:27 stackage-builder stackage-server-start[3838488]: 127.0.0.1 - - [12/Feb/2024:14:28:27 +0000] "GET /nightly-2020-04-22/package/file-path-th-0.1.0.0 HTTP/1.0" 500 - "" "(redact)"```

While stackage-server-cron started saying

stackage-server-cron: SQLite3 returned ErrorError while attempting to perform prepare "SELECT \"file_path\".\"path\", \"tree_entry\".\"id\"\nFROM \"tree_entry\" INNER JOIN \"file_path\" ON \"tree_entry\".\"path\" = \"file_path\".\"id\"\nWHERE (\"tree_entry\".\"tree\" = ?) AND (\"file_path\".\"path\" ILIKE (? || '%'))\n": near "ILIKE": syntax error

Luckily I was able to revert the change quickly, and stackage.org started working better again. The original issue still remains.

@alaendle would it be much work to cut a new LTS that excludes nettle? Since Stackage search relies on the latest LTS, it will be broken until either this problem gets fixed or a new LTS is created.

@Bodigrim
Copy link
Contributor

Judging from stbuehler/haskell-nettle@e450021, I don't think there is a particularly strong reason for nettle to require cabal-version: 3.4. Cutting a new LTS is a big deal, it would be easier to release nettle with a lower cabal-version. CC @clinty.

@clinty
Copy link

clinty commented Feb 12, 2024

Judging from stbuehler/haskell-nettle@e450021, I don't think there is a particularly strong reason for nettle to require cabal-version: 3.4. Cutting a new LTS is a big deal, it would be easier to release nettle with a lower cabal-version. CC @clinty.

@Bodigrim Which cabal-version should I target?

@Bodigrim
Copy link
Contributor

@clinty is cabal-version: 2.0 sufficient for nettle?

@clinty
Copy link

clinty commented Feb 12, 2024

@Bodigrim , yes, it was at >= 1.8 and I raised it because Hackage complained. nettle 0.3.1.1 released.

@chreekat
Copy link
Member

Thanks for helping out! Unfortunately it looks like stackage-server-cron is bailing out on 22.10 even though @bergmark created a 22.11 to try to help work around this problem. I'll continue trying to make stackage-server-cron support cabal-3.4 with one more experiment now (pinning pantry to the previously-used version)

@chreekat
Copy link
Member

chreekat commented Feb 13, 2024

That almost worked, but stackage-server uses Distribution.Text.simpleParse to parse version ranges, which uses the last-known cabal version, and cabal-3.4 doesn't support the version range -any, and the stackage database is full of such values. :D Patching it now.

@chreekat
Copy link
Member

The patch worked, but along the way I tried splitting using different versions of the underlying package that provides stackage-server and stackage-server-cron, thinking it would allow me to tackle incompatibilities within the apps individually. I learned the hard way that that is a bad idea. At the very least, they need to use the same version of Cabal, hoogle, and pantry. Currently both apps are working fine, but stackage-server-cron is producing hoogle databases that stackage-server can't use. I will repair this in the morning.

@chreekat
Copy link
Member

It's back up! Closing for now. Report new issues if you see them!

@iustin
Copy link
Author

iustin commented Feb 14, 2024

Thank you!

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

No branches or pull requests

5 participants