LukePrior / nbn-upgrade-map

Interactive map showing premises eligible for the NBN FTTP upgrade program.
https://lukeprior.github.io/nbn-upgrade-map/
MIT License
91 stars 10 forks source link

Update to GNAF 202402 #338

Closed lyricnz closed 2 months ago

lyricnz commented 2 months ago

https://github.com/minus34/gnaf-loader/releases

lyricnz commented 2 months ago

Tested locally

❯ cd extra/db
❯ ./update.sh
...
❯ docker images
REPOSITORY                         TAG       IMAGE ID       CREATED              SIZE
lukeprior/nbn-upgrade-map-db       202402    f0f8e16fbe23   About a minute ago   2.98GB
lukeprior/nbn-upgrade-map-db       latest    f0f8e16fbe23   About a minute ago   2.98GB
❯ docker run --publish=5433:5432 lukeprior/nbn-upgrade-map-db:latest
PostgreSQL Database directory appears to contain a database; Skipping initialization

2024-04-01 22:02:30.799 UTC [1] LOG:  starting PostgreSQL 16.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014, 64-bit
2024-04-01 22:02:30.800 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-04-01 22:02:30.801 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2024-04-01 22:02:30.804 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2024-04-01 22:02:30.811 UTC [24] LOG:  database system was shut down at 2024-04-01 21:59:03 UTC
2024-04-01 22:02:30.819 UTC [1] LOG:  database system is ready to accept connections

another window

❯ . ./venv/bin/activate
❯ pip install --upgrade -r code/requirements.txt
❯ python code/main.py --suburb Somerville --state VIC
2024-04-02 09:04:34,456 INFO MainThread Checking for externally updated geojson results...
2024-04-02 09:04:42,466 INFO MainThread ...done
2024-04-02 09:04:42,578 INFO MainThread Creating DB index...
2024-04-02 09:04:42,620 INFO MainThread Selecting explicit Somerville, VIC
2024-04-02 09:04:42,620 INFO MainThread Processing Somerville, VIC
2024-04-02 09:04:42,621 INFO MainThread Fetching all addresses for Somerville, VIC
2024-04-02 09:04:42,753 INFO MainThread Fetched 6012 addresses from database
2024-04-02 09:04:42,776 INFO MainThread Loaded 5591 addresses from output file
2024-04-02 09:04:42,778 INFO MainThread Submitting 6012 requests to add NBNco data...
2024-04-02 09:04:43,389 WARNING nbn_4 No valid suggestions for 12A APPLEWOOD RISE SOMERVILLE 3912
...
2024-04-02 09:17:09,931 WARNING nbn_5 No valid suggestions for 91 DANDENONG-HASTINGS ROAD SOMERVILLE 3912
2024-04-02 09:17:14,351 INFO nbn_5 Completed 6012 requests
2024-04-02 09:17:14,392 INFO MainThread Completed. Tally of tech types: {'FTTP': 1366, 'FTTN': 4029, 'WIRELESS': 201, None: 365, 'SATELLITE': 47, 'FTTB': 1, 'NULL': 1, 'FTTC': 2}
2024-04-02 09:17:14,394 INFO MainThread Location ID types: {'LOC': 5647, 'None': 365}
2024-04-02 09:17:14,396 INFO MainThread Writing results to results/VIC/somerville.geojson
2024-04-02 09:17:14,989 INFO MainThread Updating progress.json
lyricnz commented 2 months ago

This should be as simple as @LukePrior manually running the GHA for this purpose.

LukePrior commented 2 months ago

https://github.com/LukePrior/nbn-upgrade-map/actions/runs/8514540964

lyricnz commented 2 months ago

Looks like the GHA failed:

Unmounting and removing swap file.
Creating LVM Volume.
  Creating LVM PV on root fs.
fallocate: invalid length value specified
Error: Process completed with exit code 1.

The GHA step is

    steps:
      - name: Maximize build space
        uses: easimon/maximize-build-space@master
        with:
          root-reserve-mb: 32000
          swap-size-mb: 1024
          remove-dotnet: 'true'
          remove-android: 'true'

If you have the capability you can just run extra/db/update.sh as described above - it attempts to push at the end (which fails for me, no access)

    docker push $IMG_NAME:$LAST_TAG
    docker push $IMG_NAME:latest
lyricnz commented 2 months ago

Could be https://github.com/easimon/maximize-build-space/issues/42

LukePrior commented 2 months ago

I'm away from my main workstation so will need to find a GHA fix or wait a few days.

lyricnz commented 2 months ago

@LukePrior can you try again, see if the new runner has the same root volume size? Issue appears to be that we're attempting to reserve 32G of disk on a root partition that's only 21G.

LukePrior commented 2 months ago

No luck seems GitHub has changed the way storage works...

lyricnz commented 2 months ago

Maybe we don't need so much storage anymore, since we don't use the upstream gnaf docker image any more? I might PR a change into the GHA, see if that helps?

lyricnz commented 2 months ago

Looks like it's done