This is an automated email from the ASF dual-hosted git repository. rusackas pushed a commit to branch ci/cache-apt-pkgs in repository https://gitbox.apache.org/repos/asf/superset.git
commit e84730dc5b4bca2b165e7acc5b31dd6319bbc4cd Author: Evan Rusackas <[email protected]> AuthorDate: Mon Jul 27 21:39:42 2026 -0700 ci: cache apt packages with awalsh128/cache-apt-pkgs-action setup-backend runs `apt-get update && apt-get install -y libldap2-dev libsasl2-dev` unconditionally on every job (17 call sites) -- `apt-get update` alone is a real per-job tax paid on every push regardless of whether the package list ever changes. awalsh128/cache-apt-pkgs-action caches the resolved .deb archives, keyed on the requested package list/version/arch, and reinstalls from cache on a hit instead of hitting the network. Same swap applied to two other one-off apt-get installs that had the identical unconditional-update shape (gettext in superset-translations.yml, graphviz in superset-docs-deploy.yml). --- .github/actions/setup-backend/action.yml | 8 ++++++-- .github/workflows/superset-docs-deploy.yml | 5 ++++- .github/workflows/superset-translations.yml | 5 ++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-backend/action.yml b/.github/actions/setup-backend/action.yml index 8c073c81624..c50536eb165 100644 --- a/.github/actions/setup-backend/action.yml +++ b/.github/actions/setup-backend/action.yml @@ -45,14 +45,18 @@ runs: with: python-version: ${{ steps.set-python-version.outputs.python-version }} enable-cache: true + - name: Install apt packages + if: inputs.install-superset == 'true' + uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3 + with: + packages: libldap2-dev libsasl2-dev + version: 1.0 - name: Install dependencies env: INPUT_INSTALL_SUPERSET: ${{ inputs.install-superset }} INPUT_REQUIREMENTS_TYPE: ${{ inputs.requirements-type }} run: | if [ "$INPUT_INSTALL_SUPERSET" = "true" ]; then - sudo apt-get update && sudo apt-get -y install libldap2-dev libsasl2-dev - if [ "$INPUT_REQUIREMENTS_TYPE" = "dev" ]; then uv pip install --system -r requirements/development.txt elif [ "$INPUT_REQUIREMENTS_TYPE" = "base" ]; then diff --git a/.github/workflows/superset-docs-deploy.yml b/.github/workflows/superset-docs-deploy.yml index 8b5f4287cfb..85760832834 100644 --- a/.github/workflows/superset-docs-deploy.yml +++ b/.github/workflows/superset-docs-deploy.yml @@ -76,7 +76,10 @@ jobs: distribution: "zulu" java-version: "21" - name: Install Graphviz - run: sudo apt-get install -y graphviz + uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3 + with: + packages: graphviz + version: 1.0 - name: Compute Entity Relationship diagram (ERD) env: SUPERSET_SECRET_KEY: not-a-secret diff --git a/.github/workflows/superset-translations.yml b/.github/workflows/superset-translations.yml index d0a3eb69006..68dbd1d47b8 100644 --- a/.github/workflows/superset-translations.yml +++ b/.github/workflows/superset-translations.yml @@ -78,7 +78,10 @@ jobs: - name: Install gettext tools if: steps.check.outputs.python == 'true' || steps.check.outputs.frontend == 'true' - run: sudo apt-get update && sudo apt-get install -y gettext + uses: awalsh128/cache-apt-pkgs-action@553a35bb8ebd9fcabcb1c9451aa4c98e1b4ca8a9 # v1.6.3 + with: + packages: gettext + version: 1.0 # Fetch the base ref so we can compare PR-introduced regressions # against a fair baseline (also runs babel_update against the base
