Browse Source

fix: use explicit $HOME path for Maven mount and add verification

Issue: docker-compose was using ~ which may not expand correctly in CI

Changes:
1. docker-compose.yml: Changed ~/.m2 to ${HOME}/.m2
   - Ensures proper path expansion in GitHub Actions
   - $HOME is /home/runner in GitHub Actions runners

2. Added verification step in workflow:
   - Lists all SNAPSHOT artifacts before tests
   - Shows what's available in Maven local repo
   - Will help diagnose if artifacts aren't being restored correctly

This should ensure the Maven container can access the locally built
3.80.1-SNAPSHOT JARs with our debug logging code.
pull/7526/head
chrislu 6 days ago
parent
commit
052365a627
  1. 12
      .github/workflows/spark-integration-tests.yml
  2. 2
      test/java/spark/docker-compose.yml

12
.github/workflows/spark-integration-tests.yml

@ -199,10 +199,22 @@ jobs:
curl -s http://localhost:9333/dir/status | jq '.' || echo "jq not available"
echo "✓ Volume server registered, volumes will be created on-demand during tests"
- name: Verify Maven artifacts before tests
run: |
echo "Verifying Maven artifacts are available in ~/.m2/repository..."
echo "Checking for SNAPSHOT artifacts:"
find ~/.m2/repository/com/seaweedfs -name "*3.80.1-SNAPSHOT*" 2>/dev/null | sort || echo "No SNAPSHOT artifacts found!"
echo ""
echo "All seaweedfs JARs:"
find ~/.m2/repository/com/seaweedfs -name "*.jar" 2>/dev/null | sort
- name: Run Spark integration tests in Docker
working-directory: test/java/spark
run: |
echo "Running Spark integration tests in Docker container..."
echo "Maven repository path on host: $HOME/.m2"
echo "Will be mounted as /root/.m2 in container"
echo ""
echo "Docker networks:"
docker network ls
echo "Starting spark-tests container (will start dependencies automatically)..."

2
test/java/spark/docker-compose.yml

@ -71,7 +71,7 @@ services:
container_name: seaweedfs-spark-tests
volumes:
- .:/workspace
- ~/.m2:/root/.m2
- ${HOME}/.m2:/root/.m2
working_dir: /workspace
environment:
- SEAWEEDFS_TEST_ENABLED=true

Loading…
Cancel
Save