Skip to content

Commit 5ea8e99

Browse files
authored
Enable authentication using htpasswd (#1166)
Description ----------- A standard `.htpasswd` file can be used to providing the authentication information for vineyardd. The basic usage of `htpasswd` can be found at https://httpd.apache.org/docs/2.4/programs/htpasswd.html Related issue number -------------------- Fixes #1072 --------- Signed-off-by: Tao He <[email protected]>
1 parent 64db68f commit 5ea8e99

27 files changed

+569
-195
lines changed

.github/workflows/build-archlinux-latest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
9090
- name: Setup tmate session
9191
if: false
92-
uses: mxschmitt/action-tmate@v2
92+
uses: mxschmitt/action-tmate@v3
9393

9494
- name: Install apache-arrow
9595
run: |

.github/workflows/build-centos-latest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ jobs:
186186
187187
- name: Setup tmate session
188188
if: false
189-
uses: mxschmitt/action-tmate@v2
189+
uses: mxschmitt/action-tmate@v3
190190

191191
- name: CMake
192192
run: |

.github/workflows/build-compatibility.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ concurrency:
2424
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
2525
cancel-in-progress: true
2626

27+
env:
28+
CMAKE_C_COMPILER_LAUNCHER: ccache
29+
CMAKE_CXX_COMPILER_LAUNCHER: ccache
30+
2731
jobs:
2832
build:
2933
runs-on: ${{ matrix.os }}
@@ -63,9 +67,6 @@ jobs:
6367
- name: Install Dependencies for Linux
6468
if: runner.os == 'Linux'
6569
run: |
66-
# leverage ccache
67-
export PATH=/usr/lib/ccache:$PATH
68-
6970
# Note:
7071
#
7172
# install libgandiva-dev for workaround for https://issues.apache.org/jira/browse/ARROW-10495
@@ -108,6 +109,11 @@ jobs:
108109
sudo apt update
109110
sudo apt install -y libarrow-dev=${{ matrix.arrow }}
110111
112+
# avoid possible permission errors
113+
ccache -o cache_dir=~/.ccache
114+
sudo mkdir -p ~/.ccache
115+
sudo chmod -R a+wrx ~/.ccache
116+
111117
# install python packages for codegen
112118
sudo pip3 install -U pip
113119
sudo pip3 install libclang parsec setuptools wheel twine
@@ -138,8 +144,7 @@ jobs:
138144
139145
- name: Install libgrape-lite
140146
run: |
141-
# leverage ccache
142-
export PATH=/usr/lib/ccache:$PATH
147+
export PATH=/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH
143148
144149
git clone https://github.com/alibaba/libgrape-lite.git
145150
cd libgrape-lite
@@ -151,12 +156,11 @@ jobs:
151156
152157
- name: Setup tmate session
153158
if: false
154-
uses: mxschmitt/action-tmate@v2
159+
uses: mxschmitt/action-tmate@v3
155160

156161
- name: CMake
157162
run: |
158-
# leverage ccache
159-
export PATH=/usr/lib/ccache:$PATH
163+
export PATH=/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH
160164
161165
# set LLVM clang/clang++ on MacOS
162166
export PATH=/opt/homebrew/opt/llvm/bin:/usr/local/opt/llvm/bin:$PATH
@@ -181,9 +185,6 @@ jobs:
181185
182186
- name: Build
183187
run: |
184-
# leverage ccache
185-
export PATH=/usr/lib/ccache:$PATH
186-
187188
# set LLVM clang/clang++ on MacOS
188189
export PATH=/opt/homebrew/opt/llvm/bin:/usr/local/opt/llvm/bin:$PATH
189190

.github/workflows/build-test.yml

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ jobs:
6060
- name: Install Dependencies for Linux
6161
if: runner.os == 'Linux'
6262
run: |
63-
# leverage ccache
6463
export PATH=/usr/lib/ccache:$PATH
6564
6665
sudo apt update -y
@@ -109,11 +108,26 @@ jobs:
109108
libplasma-dev=11.0.0-1 \
110109
libarrow-cuda-dev=11.0.0-1
111110
111+
# install clang-format
112+
sudo curl -L https://github.com/muttleyxd/clang-tools-static-binaries/releases/download/master-22538c65/clang-format-8_linux-amd64 --output /usr/bin/clang-format
113+
sudo chmod +x /usr/bin/clang-format
114+
115+
# avoid possible permission errors
116+
ccache -o cache_dir=~/.ccache
117+
sudo mkdir -p ~/.ccache
118+
sudo chmod -R a+wrx ~/.ccache
119+
112120
# install pyarrow from scratch
113121
export PYARROW_WITH_PARQUET=1
114122
export PYARROW_WITH_ORC=1
115123
export PYARROW_WITH_DATASET=1
116-
sudo -E pip3 install --no-binary pyarrow pyarrow==11.0.0
124+
export PYARROW_BUILD_VERBOSE=1
125+
export PYARROW_PARALLEL=$(nproc)
126+
export PYARROW_CMAKE_OPTIONS="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
127+
sudo -E env PATH=$PATH pip3 install --no-binary pyarrow pyarrow==11.0.0
128+
129+
# restore the permission of ccache directory
130+
sudo chmod -R a+wrx ~/.ccache
117131
118132
# install python packages for codegen, and io adaptors
119133
sudo pip3 install -U "Pygments>=2.4.1"
@@ -122,19 +136,13 @@ jobs:
122136
# install linters
123137
sudo pip3 install auditwheel black isort flake8 twine
124138
125-
# install clang-format
126-
sudo curl -L https://github.com/muttleyxd/clang-tools-static-binaries/releases/download/master-22538c65/clang-format-8_linux-amd64 --output /usr/bin/clang-format
127-
sudo chmod +x /usr/bin/clang-format
128-
129-
# install latest ccache
130-
wget https://github.com/ccache/ccache/releases/download/v4.7.3/ccache-4.7.3-linux-x86_64.tar.xz
131-
tar -xf ccache-4.7.3-linux-x86_64.tar.xz
132-
sudo mv ccache-4.7.3-linux-x86_64/ccache /usr/bin/ccache
139+
- name: Setup tmate session
140+
if: false
141+
uses: mxschmitt/action-tmate@v3
133142

134143
- name: Install libgrape-lite
135144
if: runner.os == 'Linux'
136145
run: |
137-
# leverage ccache
138146
export PATH=/usr/lib/ccache:$PATH
139147
140148
git clone https://github.com/alibaba/libgrape-lite.git
@@ -184,11 +192,10 @@ jobs:
184192
185193
- name: Setup tmate session
186194
if: false
187-
uses: mxschmitt/action-tmate@v2
195+
uses: mxschmitt/action-tmate@v3
188196

189197
- name: CMake
190198
run: |
191-
# leverage ccache
192199
export PATH=/usr/lib/ccache:$PATH
193200
194201
mkdir build
@@ -282,8 +289,6 @@ jobs:
282289
283290
- name: Build
284291
run: |
285-
# leverage ccache
286-
export PATH=/usr/lib/ccache:$PATH
287292
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/lib64
288293
289294
pushd build
@@ -316,7 +321,7 @@ jobs:
316321
317322
- name: Setup tmate session
318323
if: false
319-
uses: mxschmitt/action-tmate@v2
324+
uses: mxschmitt/action-tmate@v3
320325

321326
- name: Run Tests
322327
run: |
@@ -331,7 +336,7 @@ jobs:
331336
332337
- name: Setup tmate session
333338
if: false
334-
uses: mxschmitt/action-tmate@v2
339+
uses: mxschmitt/action-tmate@v3
335340

336341
- name: Run Python Tests with Debug
337342
if: ${{ github.event_name == 'push' }}
@@ -379,7 +384,7 @@ jobs:
379384
380385
- name: Setup tmate session
381386
if: false
382-
uses: mxschmitt/action-tmate@v2
387+
uses: mxschmitt/action-tmate@v3
383388

384389
- name: Run IO Tests
385390
run: |
@@ -413,7 +418,7 @@ jobs:
413418
414419
- name: Setup tmate session
415420
if: false
416-
uses: mxschmitt/action-tmate@v2
421+
uses: mxschmitt/action-tmate@v3
417422

418423
- name: Upload Coverage
419424
if: runner.os == 'Linux'

.github/workflows/docs.yaml

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ concurrency:
3131
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
3232
cancel-in-progress: true
3333

34+
env:
35+
CMAKE_C_COMPILER_LAUNCHER: ccache
36+
CMAKE_CXX_COMPILER_LAUNCHER: ccache
37+
3438
jobs:
3539
docs:
3640
runs-on: ${{ matrix.os }}
@@ -49,12 +53,22 @@ jobs:
4953
ref: ${{github.event.pull_request.head.ref}}
5054
submodules: true
5155

56+
- name: Generate Summary for Submodules
57+
run: |
58+
git submodule > git-modules.txt
59+
cat git-modules.txt
60+
61+
- name: Cache for cccahe
62+
uses: actions/cache@v3
63+
with:
64+
path: ~/.ccache
65+
key: ${{ matrix.os }}-docs-cache-${{ hashFiles('**/git-modules.txt') }}
66+
restore-keys: |
67+
${{ matrix.os }}-docs-cache-
68+
5269
- name: Install Dependencies for Linux
5370
if: runner.os == 'Linux'
5471
run: |
55-
# leverage ccache
56-
export PATH=/usr/lib/ccache:$PATH
57-
5872
sudo apt update -y
5973
sudo apt install -y ca-certificates \
6074
ccache \
@@ -91,6 +105,16 @@ jobs:
91105
sudo apt update
92106
sudo apt install -y libarrow-dev=3.0.0-1
93107
108+
# install latest ccache
109+
wget https://github.com/ccache/ccache/releases/download/v4.7.4/ccache-4.7.4-linux-x86_64.tar.xz
110+
tar -xf ccache-4.7.4-linux-x86_64.tar.xz
111+
sudo mv ccache-4.7.4-linux-x86_64/ccache /usr/bin/ccache
112+
113+
# avoid possible permission errors
114+
ccache -o cache_dir=~/.ccache
115+
sudo mkdir -p ~/.ccache
116+
sudo chmod -R a+wrx ~/.ccache
117+
94118
# install python packages for codegen, and io adaptors
95119
sudo pip3 install -U "Pygments>=2.4.1"
96120
sudo pip3 install -r requirements-setup.txt -r requirements.txt -r requirements-dev.txt
@@ -101,9 +125,6 @@ jobs:
101125
- name: Install libgrape-lite
102126
if: runner.os == 'Linux'
103127
run: |
104-
# leverage ccache
105-
export PATH=/usr/lib/ccache:$PATH
106-
107128
git clone https://github.com/alibaba/libgrape-lite.git
108129
cd libgrape-lite
109130
mkdir build
@@ -114,7 +135,6 @@ jobs:
114135
115136
- name: CMake
116137
run: |
117-
# leverage ccache
118138
export PATH=/usr/lib/ccache:$PATH
119139
120140
mkdir build
@@ -132,9 +152,6 @@ jobs:
132152
133153
- name: Code generation
134154
run: |
135-
# leverage ccache
136-
export PATH=/usr/lib/ccache:$PATH
137-
138155
pushd build
139156
make vineyard_basic_gen -j
140157
make vineyard_client_python -j

0 commit comments

Comments
 (0)