Commit Graph

42 Commits

Author SHA1 Message Date
Alexey Kuleshevich
bdcdd1887a
Store fallback cabal files into pantry. And few follow up improvements:
* Fix atomic durable writing, since issue in RIO was fixed

* Log information about falling back onto the core-cabal-files repo

* Convert conduit pipe to Maybe fishes.

* Make sure module names, package name and version are added for fallback
  cabal files
2020-02-12 19:44:34 +03:00
Alexey Kuleshevich
8e247dde03
Update to ghc-8.8, pantry-0.2 and Cabal-3.0 2020-02-12 02:10:14 +03:00
Alexey Kuleshevich
722260e1d4
Addition of fallback repository with core cabal files 2020-02-12 00:40:31 +03:00
YAMAMOTO Yuji
cc7b12dcd7
Try to fix #277 by deleting verbose info
Problem
====

Too slow response from stackage.org/feed/.
So slow that my favorite RSS client (Slack's RSS integration) doesn't work due to timeout.
See https://github.com/fpco/stackage-server/issues/277 for details.

How?
====

Delete the content of the feed if stackage.org/feed is given `withDiff=False` as its query parameter.

Why?
====

I can't confirm it's the true cause of the slowdown (because the server is too hard to run on my machine!).
But anyway I think the html content of the feed is too much:
I just want to know the new LTS Haskell is released by the feed.
I'll click the link if I do want to see the detailed updates.

In addition, there's a reason generating the content causes the slowdown:
Other pages using `getSnapshots` (e.g. https://www.stackage.org/snapshots, https://www.stackage.org/)
are not as slow as https://www.stackage.org/feed/.
So the `getSnapshots` query dosen't seem to be the biggest cause.
And the left possible cause is `mkFeed`.

NOTE
====

I've tested nothing because it's too hard to run this app
without configuring my AWS account.
2020-01-13 11:48:53 +09:00
Michael Snoyman
ab8d383cd5
Disable custom Haddock style by default #278 2019-10-15 09:55:10 +03:00
Michael Snoyman
2701f186ca
Try to avoid chunkedFile #275 2019-09-25 14:43:31 +03:00
Michael Snoyman
dfe0122edf
Cron job: more Hoogle debug info 2019-09-25 12:02:18 +03:00
Alexey Kuleshevich
cbfb68bdc8
Implemented automatic undeprecation of previously deprecated packages, also:
* Made sure update of deprecated is done each run, independently of Hackage update
2019-07-30 13:28:17 +03:00
Alexey Kuleshevich
39d1e0c867
Make sure links to haddocks are not generated for modules that have no haddock 2019-07-11 14:07:42 +03:00
Alexey Kuleshevich
05307bded8
Fix priority of core packages:
* `global-hints.yaml` is now used as a fallback for packages that
  are not included in the snapshot
* Fix ordering of dependencies on the package page
2019-07-06 20:52:52 +03:00
Alexey Kuleshevich
3d426e1e9d
Fix the query for selecting the newest package version. Related to 07f3ef293f 2019-06-26 14:06:48 +03:00
Alexey Kuleshevich
78b019a915
Fix missing "Latest on Hackage" for packages from global-hints 2019-06-26 12:21:01 +03:00
Alexey Kuleshevich
d9a285a87f
Fix memory leak during stackage cron job when caching is enabled 2019-06-26 12:15:23 +03:00
Deni Bertovic
f909a18e83
Merge pull request #267 from fpco/healthz-as-middleware
healthz is a middleware
2019-06-20 14:08:34 +02:00
Michael Snoyman
07f3ef293f
Cast text[] to integer[] for version comparison 2019-06-20 10:12:54 +03:00
Michael Snoyman
0eea4ca99a
healthz is a middleware 2019-06-19 12:07:08 +03:00
Deni Bertovic
98d0d61958 Adds /healthz endpoint
And points k8s readiness and liveness probes on it
2019-06-18 10:11:43 +02:00
Alexey Kuleshevich
385620e185
Made status reporting and cabal file caching optional for the cron job 2019-05-25 20:00:28 +03:00
Alexey Kuleshevich
f5e147ab97
Integration with Pantry and usage of new stackage-snapshots:
* Moved all extensions into modules that are using them, rather than globally,
  since they mess up ghci session and introduce conflicts among
  packages. Removed those from `.ghci` file as well
* Redesigned the schema to use Pantry and moved it into it's own module
* Switched all of the db and cron related stuff to RIO. Yesod part is
  still on classy-prelude
* Got pantry to update stackage-server database from hackage
* Got import of stackage-snapshots implemented
* Moved some logic from all-cabal-tool
* Switched everything to `PackageNameP`, `VersionP`, etc. from a la Text.
* Fixed haddock, so it now does proper redirects and pipes the docs
  correctly. Also implemented piping of json files from S3 bucket,
  so index-doc.json is also served by stackage-server thus making
  Ctrl+S feature work properly on haddock. Fix for commercialhaskell/stackage#4301
* Import of modules is done through cabal file parsing, which slows
  down the initial import process drastically, but incremental update
  is not a problem.
* Just as with modules, dependencies are also imported from cabal file.
* In general improved type safety by introducing a few data types:
  eg. `ModuleNameP`, `HackageCabalInfo`, and many more.
* Implemented pulling of deprecation map from hackages and storing it in db
* Implementation of forward/backward dependencies within a snapshot only.
* Drastically improved performance of cron import job, by checking which
  snapshots are not up to date
* Implemented pulling haddock list from S3 bucket. Modules that have
  documentation are marked from the availability of actual haddock. This
  process happens concurrently with snapshots loading.
* Rearranged modules a bit:
  * github related functions went into it's own module
  * cron related functions where moved from Database to Cron module
  * Split up some functions to reduce individual complexity
* Parallelized package loading in cron job
* Implemented parsed cabal file caching.
* All queries where reqritten with esqueleto
* Syntactic improvements:
  * Added stylish-haskell config
  * Formatted all imports and extensions with stylish-haskell.
  * Fixed inconsistent indentation across all modules
* Many improvements to the package page as well as few others.
* Reimplemented hoogledb creation.
* Dropped dependency on tar in favor of tar-conduit
* Added cli for stackage-server-cron
* Add cabal sha and size to the package page
* Fixed links in hoogle searches. Improved type safety for a hoogle handler
* satckage-server-cron is customizable with cli arguments

Final adjustments for the new stackage server release:

* Upgrade to lts-13.16.
* Stackage server related code has been merged to pantry. Made the code
  compatible with the newer version pantry
* Added cli '--snapshots-repo'
* Add readme to package page
* Adjust snapshots expected format:
  * Added `publish-time`
  * Removed name `field`
  * `compiler` field is now in the `resolver` field with fallback to
    the root
2019-04-30 17:10:33 +03:00
Dan Burton
809ca83b0a
Bump to lts-13.9 2019-02-25 20:29:58 -05:00
Michael Snoyman
40e551a6f2
Don't overpopulate the Schema table 2018-12-19 08:55:09 +02:00
Sibi Prabakaran
9ea91909c2
Add CPP flags 2018-08-25 22:13:09 +05:30
Michael Snoyman
64c1f9519e
Navbar link to blog 2018-07-02 07:26:29 +03:00
Michael Snoyman
760b356c0c
Use yesod-gitrev and githash 2018-06-25 12:35:42 +03:00
Michael Snoyman
96e9a53a17
Remove system-file(path/io) 2018-06-21 19:30:48 +03:00
Michael Snoyman
014114855b
Switch to cmark-gfm 2018-06-21 19:19:41 +03:00
Michael Snoyman
77b0b3b396
Drop dependency on stackage-curator 2018-06-21 18:52:45 +03:00
Michael Snoyman
856ac728b4
Fix warnings 2018-06-21 17:51:47 +03:00
Michael Snoyman
cf14304ee3
Upgrade snapshots 2018-06-21 17:26:58 +03:00
Michael Snoyman
f8aa5bc4de Error out on no packages 2018-06-05 13:40:23 -06:00
Michael Snoyman
1dbbde2abf
Don't show spam packages 2018-04-29 10:36:38 +03:00
Michael Snoyman
800b8907c8
Better parse error messages #252 2018-03-12 11:27:06 +02:00
Michael Snoyman
f732899303
Upgrade to GHC 8.2/Cabal 2.2
Inlines stackage-metadata as well
2018-03-12 11:26:40 +02:00
Michael Snoyman
115feaa219
Stackage blog 2018-01-28 14:28:41 +02:00
Michael Snoyman
04ad964983
Use <ins> and <del> 2017-12-31 18:23:12 +02:00
Andrei Dziahel
7473c0cb42 Handler.Feed: colorize package version diff as well 2017-12-31 13:54:39 +03:00
Michael Snoyman
354374b0db
Link to the snapshot listing 2017-12-24 15:51:37 +02:00
Michael Snoyman
f9632d734c
Warn about revivions in cabal.config #232 2017-12-20 06:45:18 +02:00
Andrei Dziahel
51759cbbbc Diff: style fix 2017-12-20 01:36:23 +03:00
Andrei Dziahel
cfb9ed248f Introduces highlighting package version differences 2017-12-20 01:22:53 +03:00
Michael Snoyman
298d1d5b52
Limit number of deps/revdeps shown 2017-12-11 20:05:31 +02:00
Michael Snoyman
e05cc3a20d
Move to src dir 2017-12-11 18:52:11 +02:00