Skip to content

fix csiro dataset access - #276

Merged
NekoLyn merged 3 commits into
mainfrom
bugfix/9125-csiro-reading-path-in-pmtiles-and-estimatiion
Sep 7, 2026
Merged

fix csiro dataset access#276
NekoLyn merged 3 commits into
mainfrom
bugfix/9125-csiro-reading-path-in-pmtiles-and-estimatiion

Conversation

@NekoLyn

@NekoLyn NekoLyn commented Sep 2, 2026

Copy link
Copy Markdown
Contributor
entry_point.py                                    AWS Batch job starts
|
+-- api = API()
|     CODataRegistry()
|       AodnDataSrc()                             public AODN bucket
|       CsiroDataSrc()                     <===== KEY REQUEST 1
|         per configured csiro.datasets entry:
|           GET key_request_url
|           --> bucket, remoteDirectory, endpoint, keys
|           GetAodn(..., s3_fs_opts=keys)         keys stored inside GetAodn (s3fs)
|
+-- api.initialize_metadata()
|     AODN catalog + CSIRO catalog merged
|     uwy_csiro.parquet now appears in the dataset map
|                                                 (this is the only thing key 1
|                                                  is used for in a batch job)
|
+-- generate_pmtiles_for_all_parquets(api, uuid)
      work = every *.parquet in the map       
      |
      api.release_memory_for_pmtiles_batch()
        self._instance = None              <===== KEY 1 THROWN AWAY HERE
                                                  no CSIRO access left in the parent
      |
      +-- Phase 1   for dataset in work:
      |     fork --> pmtiles child
      |               HexbinProcessor
      |                 DatasetScanBase.__init__          location=None, so:
      |                   resolve_dataset_location(dataset)
      |                   |     co_data_registory, NOT batch/common any more
      |                   +-- AodnDataSrc.locate_dataset  --> None   (never claims,
      |                   |                                          no network)
      |                   +-- CsiroDataSrc.locate_dataset
      |                   |     in config csiro.datasets?
      |                   |       no  --> None
      |                   |       yes --> GET key_request_url  <===== KEY REQUEST 2
      |                   |               CsiroS3Access.to_dataset_location()
      |                   +-- nobody claimed it
      |                         --> DatasetLocation(BUCKET_OPTIMISED_DEFAULT)
      |                             AODN bucket, no keys
      |                   PmTileDuckDBClient()
      |                     create_s3_secret()              AODN secret
      |                   apply_location_credentials()      CSIRO secret,
      |                                                     skipped unless
      |                                                     location.is_external
      |                 get_s3_uri()
      |                   location.parquet_glob(dataset)
      |                   --> s3://dapprd-mnf/000072626v001/data/uwy_csiro.parquet/**/*.parquet
      |               stage / geojsonseq / tippecanoe / upload --> os._exit()
      |     waitpid                                          keys die with the child
      |
      +-- Phase 2   for dataset in work:            after all pmtiles are done
            fork --> estimation child
                      EstimationIndexBuilder
                        DatasetScanBase.__init__
                          resolve_dataset_location(dataset)  <===== KEY REQUEST 3
                                                             same fan-out as above
                          PmTileDuckDBClient()      AODN secret
                          apply_location_credentials()       CSIRO secret
                      |
                      +-- small dataset (<= chunk_files)
                      |     read in this process, one statement
                      |
                      +-- big dataset, for chunk in chunks:
                            fork --> chunk grandchild
                                      reset_after_fork()
                                      PmTileDuckDBClient()   NEW connection,
                                                             AODN secret only
                                      apply_location_credentials()
                                                             CSIRO secret again
                                                             (no new HTTP - the
                                                              keys came across
                                                              the fork by COW)
                                      --> part_i.parquet --> os._exit()
                            waitpid

@NekoLyn
NekoLyn requested a review from HavierD September 2, 2026 06:44

@HavierD HavierD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NekoLyn
NekoLyn merged commit 7d94336 into main Sep 7, 2026
2 checks passed
@NekoLyn
NekoLyn deleted the bugfix/9125-csiro-reading-path-in-pmtiles-and-estimatiion branch September 7, 2026 04:17
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

Successfully merging this pull request may close these issues.

2 participants