Skip to content

Feature: Geodata pre-cache command for hazaar tool

Problem Statement

Currently, downloading and caching the GeoData file from the Hazaar API platform requires running manual CLI commands. This is often done in a Dockerfile during CI builds and deployments, making the process less efficient and more error-prone.

Who will benefit?

  • Developers using Hazaar who need to prepare an application with GeoData.
  • CI/CD pipelines that need a streamlined way to download and cache GeoData.
  • Teams looking to automate their deployment process.

Benefits and risks

Benefits:

  • Automates a previously manual process, improving efficiency.
  • Reduces human error when downloading and caching GeoData.
  • Simplifies CI/CD workflows, allowing for more streamlined deployments.
  • Provides a standardized way to prepare an application for use.

Risks:

  • May require additional validation to ensure the download completes successfully.
  • Could introduce potential failure points if the Hazaar API platform is down during execution.
  • Needs proper error handling and logging to avoid silent failures.

Proposed solution

Add a new command to the Hazaar CLI tool that forces the GeoData file to be downloaded and cached from the Hazaar API platform. The command could be something like:

hazaar geodata:cache

Alternatively, integrating this into a broader build command like:

hazaar build

would help automate application preparation. The command should:

  • Download the GeoData file from the Hazaar API platform.
  • Store it in the appropriate cache location.
  • Provide output logs indicating success or failure.
  • Optionally allow flags for different cache locations or API endpoints.

Examples

  • Symfony's cache:clear command automates cache management.
  • Laravel has artisan migrate --force for database migrations in CI/CD.

Priority/Severity

  • High (This will bring a huge increase in performance/productivity/usability/legislative cover)
  • Medium (This will bring a good increase in performance/productivity/usability)
  • Low (anything else e.g., trivial, minor improvements)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information