Skip to content

Improve: Improve ci-loader#724

Open
lokidundun wants to merge 1 commit intoapache:masterfrom
lokidundun:ciImprove
Open

Improve: Improve ci-loader#724
lokidundun wants to merge 1 commit intoapache:masterfrom
lokidundun:ciImprove

Conversation

@lokidundun
Copy link
Copy Markdown

Purpose of the PR

Main Changes

  1. .github/workflows/loader-ci.yml
  • Migrated MySQL to GitHub Actions services: Adopted the official mysql:5.7 container service with health check configured. This eliminates the need to execute docker pull and docker run for every workflow run.
  • Added Hadoop caching: Cached ~/hadoop-2.8.5.tar.gz with a fixed cache key hadoop-2.8.5.
  • Added HugeGraph Server caching: Cached ~/hugegraph-cache-${{ env.COMMIT_ID }}; the cache key contains the commit ID to enable auto-invalidation when the version changes.
  • Removed the invocation of install-mysql.sh: MySQL is now provisioned by GitHub Actions services.
  1. hugegraph-loader/assembly/travis/install-hadoop.sh
  • Added local installation & cache validation: Skip re-download/extraction if /usr/local/hadoop already exists; use the cached tar.gz file directly if it exists (while the local directory is missing) to avoid repeated downloads from archive.apache.org.
  • Added writes to GITHUB_ENV: Ensure subsequent steps can correctly obtain HADOOP_HOME and PATH environment variables.
  • Made configuration writes idempotent: Only write core-site.xml and hdfs-site.xml if the configuration files do not exist or their content is mismatched.
  1. hugegraph-loader/assembly/travis/install-mysql.sh
  • Added idempotent check: Directly skip docker pull and docker run if the mysql:5.7 container is already running (e.g., provided by GitHub Actions services).
  1. hugegraph-loader/assembly/travis/install-hugegraph-from-source.sh
  • Added build caching: Check if the packaged apache-hugegraph-*.tar.gz exists in ~/hugegraph-cache-${COMMIT_ID} before building. Use the cached tarball directly and skip the time-consuming git clone + mvn package if it exists; copy the tarball to the cache directory for reuse in future runs after the build if it does not exist.

Verifying these changes

  • Trivial rework / code cleanup without any test coverage. (No Need)
  • Already covered by existing tests, such as (please modify tests here).
  • Need tests and can be verified as follows:
    • xxx

Does this PR potentially affect the following parts?

  • Nope
  • Dependencies (add/update license info)
  • Modify configurations
  • The public API
  • Other affects (typed here)

Documentation Status

  • Doc - TODO
  • Doc - Done
  • Doc - No Need

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Apr 12, 2026
@github-actions github-actions bot added the loader hugegraph-loader label Apr 12, 2026
@dosubot dosubot bot added the ci Continuous integration label Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continuous integration loader hugegraph-loader size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improve][CI] Avoid repeated environment downloads in loader-ci

1 participant