GenderedIntelligence / the-trans-dimension

The Trans Dimension is an online community hub connecting trans communities in the UK.
http://transdimension.uk
Other
3 stars 1 forks source link

[Bug]: Build fails on CloudFlare #366

Closed ivan-kocienski-gfsc closed 5 months ago

ivan-kocienski-gfsc commented 1 year ago

Description

elm is being tripped up by a dependency failure when being built on CloudFlare

https://dash.cloudflare.com/4933e92b8c4c0f225432779beb00a874/pages/view/transdimension/c0e39489-f7fd-46f8-ab03-f36485643b3e

14:28:36.073    Cloning repository...
14:28:37.660    From https://github.com/GenderedIntelligence/the-trans-dimension
14:28:37.661     * branch            8dfa0d748b9fd4acf68af36ac90f6d5d8aa4baea -> FETCH_HEAD
14:28:37.661    
14:28:37.791    HEAD is now at 8dfa0d7 Chore: build every 3 hours during office hours (#363)
14:28:37.792    
14:28:37.960    
14:28:37.990    Success: Finished cloning repository files
14:28:38.797    Installing dependencies
14:28:38.808    Python version set to 2.7
14:28:40.794    Attempting node version '14' from .nvmrc
14:28:42.242    Downloading and installing node v14.21.1...
14:28:42.689    Downloading https://nodejs.org/dist/v14.21.1/node-v14.21.1-linux-x64.tar.xz...
14:28:43.390    Computing checksum with sha256sum
14:28:43.521    Checksums matched!
14:28:48.158    Now using node v14.21.1 (npm v6.14.17)
14:28:48.570    Started restoring cached build plugins
14:28:48.584    Finished restoring cached build plugins
14:28:49.103    Attempting ruby version 2.7.1, read from environment
14:28:52.783    Using ruby version 2.7.1
14:28:53.157    Using PHP version 5.6
14:28:53.328    5.2 is already installed.
14:28:53.358    Using Swift version 5.2
14:28:53.359    Started restoring cached node modules
14:28:53.376    Finished restoring cached node modules
14:28:53.627    Installing NPM modules using NPM version 6.14.17
14:28:54.593    npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
14:29:02.440    
14:29:02.441    > the-trans-dimension@ postinstall /opt/buildhome/repo
14:29:02.441    > elm-tooling install
14:29:02.441    
14:29:02.593    /opt/buildhome/repo/elm-tooling.json
14:29:02.593      0% elm 0.19.1
14:29:02.594      0% elm-format 0.8.5
14:29:02.594      0% elm-test-rs 2.0.0
14:29:03.305      1% elm-format 0.8.5
14:29:03.404     25% elm-format 0.8.5
14:29:03.505     68% elm-format 0.8.5
14:29:03.536     16% elm-test-rs 2.0.0
14:29:03.606    100% elm-format 0.8.5
14:29:03.611     73% elm 0.19.1
14:29:03.633     38% elm-test-rs 2.0.0
14:29:03.737     84% elm-test-rs 2.0.0
14:29:03.796    100% elm-test-rs 2.0.0
14:29:03.968    100% elm 0.19.1
14:29:03.970    elm 0.19.1 link created: node_modules/.bin/elm -> /opt/buildhome/.elm/elm-tooling/elm/0.19.1/elm
14:29:03.970        To run: npx elm
14:29:03.970    elm-format 0.8.5 link created: node_modules/.bin/elm-format -> /opt/buildhome/.elm/elm-tooling/elm-format/0.8.5/elm-format
14:29:03.970        To run: npx elm-format
14:29:03.971    elm-test-rs 2.0.0 link created: node_modules/.bin/elm-test-rs -> /opt/buildhome/.elm/elm-tooling/elm-test-rs/2.0.0/elm-test-rs
14:29:03.971        To run: npx elm-test-rs
14:29:04.151    npm WARN the-trans-dimension@ No repository field.
14:29:04.157    npm WARN the-trans-dimension@ No license field.
14:29:04.169    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
14:29:04.169    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
14:29:04.169    
14:29:04.172    added 446 packages from 286 contributors and audited 448 packages in 9.623s
14:29:04.269    
14:29:04.269    32 packages are looking for funding
14:29:04.270      run `npm fund` for details
14:29:04.270    
14:29:04.272    found 14 vulnerabilities (1 low, 5 moderate, 3 high, 5 critical)
14:29:04.272      run `npm audit fix` to fix them, or `npm audit` for details
14:29:04.290    NPM modules installed
14:29:04.709    Installing Hugo 0.54.0
14:29:05.373    Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
14:29:05.377    Started restoring cached go cache
14:29:05.403    Finished restoring cached go cache
14:29:05.574    go version go1.14.4 linux/amd64
14:29:05.590    go version go1.14.4 linux/amd64
14:29:05.594    Installing missing commands
14:29:05.595    Verify run directory
14:29:05.595    Executing user command: npm run build
14:29:05.908    
14:29:05.909    > the-trans-dimension@ build /opt/buildhome/repo
14:29:05.910    > elm-constants && elm-pages build
14:29:05.910    
14:29:06.048    3 constants written to src/Constants.elm
14:29:13.218    Trace: Unhandled:  -- PROBLEM BUILDING DEPENDENCIES -----------------------------------------------
14:29:13.218    
14:29:13.219    I ran into a compilation error when trying to build the following package:
14:29:13.219    
14:29:13.219        bburdette/toop 1.2.0
14:29:13.219    
14:29:13.219    This probably means it has package constraints that are too wide. It may be
14:29:13.220    possible to tweak your elm.json to avoid the root problem as a stopgap. Head
14:29:13.221    over to https://elm-lang.org/community to get help figuring out how to take this
14:29:13.221    path!
14:29:13.221    
14:29:13.221    Note: To help with the root problem, please report this to the package author
14:29:13.221    along with the following information:
14:29:13.222    
14:29:13.223        elm/core 1.0.5
14:29:13.223    
14:29:13.223    If you want to help out even more, try building the package locally. That should
14:29:13.224    give you much more specific information about why this package is failing to
14:29:13.224    build, which will in turn make it easier for the package author to fix it!
14:29:13.226    
14:29:13.226    Compilation failed.
14:29:13.226    
14:29:13.226        at process.<anonymous> (/opt/buildhome/repo/node_modules/elm-pages/generator/src/build.js:25:11)
14:29:13.226        at process.emit (events.js:400:28)
14:29:13.227        at processPromiseRejections (internal/process/promises.js:245:33)
14:29:13.228        at processTicksAndRejections (internal/process/task_queues.js:96:32)
14:29:16.250    Threads:  4
14:29:16.272    (node:1537) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
14:29:16.274    (Use `node --trace-warnings ...` to show where the warning was created)
14:29:23.626    Generated /all-paths.json
14:29:23.629    1 /all-paths.json: 7.136s
14:29:23.723    Generated /manifest.json
14:29:23.725    1 /manifest.json: 90.08ms
14:29:24.495    1 /: 775.296ms
14:29:24.935    1 /privacy: 421.549ms
14:29:25.293    1 /partners: 356.487ms
14:29:25.566    1 /news: 268.755ms
14:29:25.770    1 /join-us: 200.657ms
14:29:26.230    Ran elm-review in 9977ms
14:29:26.230    -- PROBLEM BUILDING DEPENDENCIES -----------------------------------------------
14:29:26.230    
14:29:26.230    I ran into a compilation error when trying to build the following package:
14:29:26.231    
14:29:26.231        bburdette/toop 1.2.0
14:29:26.231    
14:29:26.231    This probably means it has package constraints that are too wide. It may be
14:29:26.231    possible to tweak your elm.json to avoid the root problem as a stopgap. Head
14:29:26.231    over to https://elm-lang.org/community to get help figuring out how to take this
14:29:26.232    path!
14:29:26.232    
14:29:26.232    Note: To help with the root problem, please report this to the package author
14:29:26.232    along with the following information:
14:29:26.232    
14:29:26.232        elm/core 1.0.5
14:29:26.232    
14:29:26.232    If you want to help out even more, try building the package locally. That should
14:29:26.232    give you much more specific information about why this package is failing to
14:29:26.233    build, which will in turn make it easier for the package author to fix it!
14:29:26.233    
14:29:26.233    Compilation failed.
14:29:26.233    
14:29:26.265    npm ERR! code ELIFECYCLE
14:29:26.265    npm ERR! errno 1
14:29:26.269    npm ERR! the-trans-dimension@ build: `elm-constants && elm-pages build`
14:29:26.269    npm ERR! Exit status 1
14:29:26.269    npm ERR! 
14:29:26.270    npm ERR! Failed at the the-trans-dimension@ build script.
14:29:26.270    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
14:29:26.284    
14:29:26.284    npm ERR! A complete log of this run can be found in:
14:29:26.284    npm ERR!     /opt/buildhome/.npm/_logs/2022-11-07T14_29_26_270Z-debug.log
14:29:26.293    Failed: build command exited with code: 1
14:29:27.245    Failed: an internal error occurred
katjam commented 1 year ago

Merged #367 - but not convinced this issue will be solved.

katjam commented 1 year ago

image

katjam commented 1 year ago

Raising new issue and closing this one. Build fail is due to some bad data.


-- Static Http Decoding Error --------------- TODO - path from request
--
12:23:32.692 | I encountered some errors while decoding this JSON:
12:23:32.692 |  
12:23:32.692 | At path /data/eventsByFilter/275
12:23:32.692 |  
12:23:32.692 | Json.Decode.oneOf failed in the following 2 ways:
12:23:32.692 |  
12:23:32.693 |  
12:23:32.693 |  
12:23:32.693 | (1) Problem with the value at json.longitude:
12:23:32.693 |  
12:23:32.693 | null
12:23:32.693 |  
12:23:32.694 | Expecting a STRING
12:23:32.694 |      -- Static Http Decoding Error --------------- TODO - path from request
12:23:32.692    I encountered some errors while decoding this JSON:
12:23:32.692    
12:23:32.692    At path /data/eventsByFilter/275
12:23:32.692    
12:23:32.692      Json.Decode.oneOf failed in the following 2 ways:
12:23:32.692    
12:23:32.693    
12:23:32.693    
12:23:32.693    (1) Problem with the value at json.longitude:
12:23:32.693        
12:23:32.693            null
12:23:32.693        
12:23:32.694        Expecting a STRING
12:23:32.694    
12:23:32.694    
12:23:32.694    
12:23:32.694    (2) Problem with the given value:
12:23:32.694        
12:23:32.694        {
12:23:32.694                "latitude": null,
12:23:32.695                "longitude": null
12:23:32.695            }
12:23:32.695        
12:23:32.695        Expecting null
12:23:32.695    
12:23:32.695        {
12:23:32.695          "id": "323631",
12:23:32.695          "name": "LxZ NYE - the black and gold party",
12:23:32.695          "summary": "LxZ NYE - the black and gold party",
12:23:32.696          "description": "Seeking a lesbian NYE party in London where you can shake your booty\nsurrounded by queer love in the heart of Central London? Looking to\nmingle with London's finest bisexual, non binary, trans and GNC babes as\nyou see in another year?Get your fine queer ass decked out in black or\ngold (or both. ) and come celebrate the end of another eventful year\nwith the LxZ events family at one of the city's most exciting bar and\nclubs - Core.Set over two floors, this sexy 400 capacity venue will be a\nqueer hotspot of your favourite dance, hiphop, trap, house, R&amp;amp;B\nand UK Garage tracks as we welcome 2023 with a bang.As always, the best\ndressed will win a boozy prize - so get shopping/sorting through your\nparty wardrobe. Our theme this year is blingtastic black and gold.You\ndon't want to miss London's sexiest night of queer glamour, joy and\ncelebration - get those early bird tickets fast before it's too late.\nDJs SizzlesShaynLDN YazMystery DJ This is due to be a sell out event, so\ntell your people and get your tickets before they go and the FOMO\nmonster gets you - he's not pretty… *Dress code: Black and/or Gold -\nbejewelled party dresses, obscenely flashy suits, gold tracksuits - you\ndecide. Just make it gay. \\*Lone Rangers needing party buddies contact\nus to hook you up*Gay boy buddies and trans men always welcome *Tables\navailable for anyone wanting to BALLER it up -\nsparklers/bottles/birthdays etc - contact us for bottle prices \\*No\ntoxic masculinity - we have the right to refuse entry*good vibes only\n\\*No government photographic ID no entry \\*LAST ENTRY 1AM NO REFUNDS -\nunless the event is cancelled",
12:23:32.696          "startDate": "2022-12-31T22:00:00+00:00",
12:23:32.696          "endDate": "2023-01-01T03:00:00+00:00",
12:23:32.696          "publisherUrl": null,
12:23:32.696          "address": {
12:23:32.696            "streetAddress": "Core Bar, 10-15 Queen Street, London",
12:23:32.696            "postalCode": "EC4N 1TY",
12:23:32.696            "geo": {
12:23:32.697              "latitude": null,
12:23:32.697              "longitude": null
12:23:32.697            }
12:23:32.697          },
12:23:32.697          "organizer": {
12:23:32.697            "id": "190"
12:23:32.697          }
12:23:32.697        }
12:23:32.698    1 /all-paths.json: 12.460s
12:23:32.694 |  
12:23:32.694 |  
12:23:32.694 | (2) Problem with the given value:
12:23:32.694 |  
12:23:32.694 | {
12:23:32.694 | "latitude": null,
12:23:32.695 | "longitude": null
12:23:32.695 | }
12:23:32.695 |  
12:23:32.695 | Expecting null
12:23:32.695 |  
12:23:32.695 | {
12:23:32.695 | "id": "323631",
12:23:32.695 | "name": "LxZ NYE - the black and gold party",
12:23:32.695 | "summary": "LxZ NYE - the black and gold party",
12:23:32.696 | "description": "Seeking a lesbian NYE party in London where you can shake your booty\nsurrounded by queer love in the heart of Central London? Looking to\nmingle with London's finest bisexual, non binary, trans and GNC babes as\nyou see in another year?Get your fine queer ass decked out in black or\ngold (or both. ) and come celebrate the end of another eventful year\nwith the LxZ events family at one of the city's most exciting bar and\nclubs - Core.Set over two floors, this sexy 400 capacity venue will be a\nqueer hotspot of your favourite dance, hiphop, trap, house, R&amp;amp;B\nand UK Garage tracks as we welcome 2023 with a bang.As always, the best\ndressed will win a boozy prize - so get shopping/sorting through your\nparty wardrobe. Our theme this year is blingtastic black and gold.You\ndon't want to miss London's sexiest night of queer glamour, joy and\ncelebration - get those early bird tickets fast before it's too late.\nDJs SizzlesShaynLDN YazMystery DJ This is due to be a sell out event, so\ntell your people and get your tickets before they go and the FOMO\nmonster gets you - he's not pretty… *Dress code: Black and/or Gold -\nbejewelled party dresses, obscenely flashy suits, gold tracksuits - you\ndecide. Just make it gay. \\*Lone Rangers needing party buddies contact\nus to hook you up*Gay boy buddies and trans men always welcome *Tables\navailable for anyone wanting to BALLER it up -\nsparklers/bottles/birthdays etc - contact us for bottle prices \\*No\ntoxic masculinity - we have the right to refuse entry*good vibes only\n\\*No government photographic ID no entry \\*LAST ENTRY 1AM NO REFUNDS -\nunless the event is cancelled",
12:23:32.696 | "startDate": "2022-12-31T22:00:00+00:00",
12:23:32.696 | "endDate": "2023-01-01T03:00:00+00:00",
12:23:32.696 | "publisherUrl": null,
12:23:32.696 | "address": {
12:23:32.696 | "streetAddress": "Core Bar, 10-15 Queen Street, London",
12:23:32.696 | "postalCode": "EC4N 1TY",
12:23:32.696 | "geo": {
12:23:32.697 | "latitude": null,
12:23:32.697 | "longitude": null
12:23:32.697 | }
12:23:32.697 | },
12:23:32.697 | "organizer": {
12:23:32.697 | "id": "190"
12:23:32.697 | }
12:23:32.697 | }
12:23:32.698 | 1 /all-paths.json: 12.460s
katjam commented 1 year ago

@r-ferrier I'm just going to re-open this one with the new info: https://discourse.elm-lang.org/t/problem-building-dependencies-solved/8232

katjam commented 1 year ago

We closed it previously because the build started failing for a different reason and then was OK for a while.

r-ferrier commented 1 year ago

After a bit more digging, it definitely looks like this problem could be to do with concurrent builds as you mentioned earlier @katjam https://discourse.elm-lang.org/t/problem-building-dependencies-error-in-pipeline-solved/8755

I see that cloudflare changed the way it builds Pages back in May - I would have thought the way they have containerised builds would have protected them from this sort of thing happening, but maybe not? https://blog.cloudflare.com/cloudflare-pages-build-improvements/

Anyhoo, from the above doc, it looks like this problem has maybe been fixed in the next elm pages release. Was going to suggest an upgrade but the only more recent versions than the one I can see referenced in the elm.json all appear to be in beta, but there are so many of them I think I must be missing something here?

katjam commented 1 year ago

Yes, good call. Elm 3.0 is ready now I think but it would not be a trivial upgrade. It would solve some of our other issues also though, so we probably will do that as a first step if we get funded to do further work.

katjam commented 5 months ago

Closing as resolved.