Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add setup action for hadoop to avoid build failures #5353

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ inputs:
github-token:
description: "Github Token"
default: ""
need-hadoop:
description: "This setup needs hadoop or not"

runs:
using: "composite"
Expand Down Expand Up @@ -152,3 +154,18 @@ runs:
rm foundationdb-clients_7.1.17-1_amd64.deb
rm foundationdb-server_7.1.17-1_amd64.deb

- name: Cache hadoop
meteorgan marked this conversation as resolved.
Show resolved Hide resolved
id: cache-hadoop
uses: actions/cache@v4
if: inputs.need-hadoop == 'true'
with:
path: /home/runner/hadoop-3.3.5
key: r0-hadoop-3.3.5

- name: Build hadoop if not cached
if: steps.cache-hadoop.outputs.cache-hit != 'true' && inputs.need-hadoop == 'true'
shell: bash
run: |
set -e
curl -LsSf https://dlcdn.apache.org/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz | tar zxf - -C /home/runner

1 change: 0 additions & 1 deletion .github/services/hdfs/hdfs_cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ runs:
- name: Setup hadoop env
Copy link
Member

Choose a reason for hiding this comment

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

Hi, I think adding a separate action only complicates things further. How about using the cache exclusively for hadoop-3.3.5.tar.gz here? Here is no other place uses this action.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Every action related with hdfs may require this action. They all require setting up Java and a Hadoop environment.

shell: bash
run: |
curl -LsSf https://dlcdn.apache.org/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz | tar zxf - -C /home/runner
export HADOOP_HOME=/home/runner/hadoop-3.3.5
echo "HADOOP_HOME=${HADOOP_HOME}" >> $GITHUB_ENV
echo "CLASSPATH=$(${HADOOP_HOME}/bin/hadoop classpath --glob)" >> $GITHUB_ENV
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ runs:
- name: Setup hadoop env
shell: bash
run: |
curl -LsSf https://dlcdn.apache.org/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz | tar zxf - -C /home/runner
export HADOOP_HOME=/home/runner/hadoop-3.3.5
echo "HADOOP_HOME=${HADOOP_HOME}" >> $GITHUB_ENV
echo "CLASSPATH=$(${HADOOP_HOME}/bin/hadoop classpath --glob)" >> $GITHUB_ENV
Expand Down
2 changes: 0 additions & 2 deletions .github/services/hdfs/hdfs_default/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ runs:
- name: Setup
shell: bash
run: |
curl -LsSf https://dlcdn.apache.org/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz | tar zxf - -C /home/runner

export HADOOP_HOME="/home/runner/hadoop-3.3.5"
export CLASSPATH=$(${HADOOP_HOME}/bin/hadoop classpath --glob)

Expand Down
2 changes: 0 additions & 2 deletions .github/services/hdfs/hdfs_default_gcs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ runs:
- name: Setup
shell: bash
run: |
curl -LsSf https://dlcdn.apache.org/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz | tar zxf - -C /home/runner

export HADOOP_HOME="/home/runner/hadoop-3.3.5"

curl -LsSf -o ${HADOOP_HOME}/share/hadoop/common/lib/gcs-connector-hadoop3-2.2.19-shaded.jar https://github.com/GoogleCloudDataproc/hadoop-connectors/releases/download/v2.2.19/gcs-connector-hadoop3-2.2.19-shaded.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ runs:
OPENDAL_AZBLOB_ACCOUNT_NAME=devstoreaccount1
OPENDAL_AZBLOB_ACCOUNT_KEY=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==

curl -LsSf https://dlcdn.apache.org/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz | tar zxf - -C /home/runner

export HADOOP_HOME="/home/runner/hadoop-3.3.5"

curl -LsSf -o ${HADOOP_HOME}/share/hadoop/common/lib/hadoop-azure-3.3.5.jar https://repo1.maven.org/maven2/org/apache/hadoop/hadoop-azure/3.3.5/hadoop-azure-3.3.5.jar
Expand Down
2 changes: 0 additions & 2 deletions .github/services/hdfs/hdfs_default_on_minio_s3/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ runs:
- name: Setup
shell: bash
run: |
curl -LsSf https://dlcdn.apache.org/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz | tar zxf - -C /home/runner

export HADOOP_HOME="/home/runner/hadoop-3.3.5"

curl -LsSf -o ${HADOOP_HOME}/share/hadoop/common/lib/hadoop-aws-3.3.5.jar https://repo1.maven.org/maven2/org/apache/hadoop/hadoop-aws/3.3.5/hadoop-aws-3.3.5.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ runs:
- name: Setup
shell: bash
run: |
curl -LsSf https://dlcdn.apache.org/hadoop/common/hadoop-3.3.5/hadoop-3.3.5.tar.gz | tar zxf - -C /home/runner

export HADOOP_HOME="/home/runner/hadoop-3.3.5"
export CLASSPATH=$(${HADOOP_HOME}/bin/hadoop classpath --glob)

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_behavior_binding_nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
need-nextest: true
need-protoc: true
need-rocksdb: true
need-hadoop: true
github-token: ${{ secrets.GITHUB_TOKEN }}

# TODO: 1password is only supported on linux
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_behavior_binding_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
need-nextest: true
need-protoc: true
need-rocksdb: true
need-hadoop: true
github-token: ${{ secrets.GITHUB_TOKEN }}

# TODO: 1password is only supported on linux
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test_behavior_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
with:
need-protoc: true
need-rocksdb: true
need-hadoop: true
github-token: ${{ secrets.GITHUB_TOKEN }}

# TODO: 1password is only supported on linux
Expand Down
Loading