Skip to content

Commit 004767b

Browse files
committed
fix(ci): License check on yml files
1 parent cfb8cea commit 004767b

File tree

6 files changed

+31
-8
lines changed

6 files changed

+31
-8
lines changed

.github/workflows/arrow-flight-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ jobs:
6161
runs-on: ubuntu-22.04
6262
container:
6363
image: prestodb/presto-native-dependency:0.292-20250204112033-cf8ba84
64+
concurrency:
65+
group: ${{ github.workflow }}-prestocpp-linux-build-for-test-${{ github.event.pull_request.number }}
66+
cancel-in-progress: true
6467
env:
6568
CCACHE_DIR: "${{ github.workspace }}/ccache"
6669
DEPENDENCY_DIR: "${{ github.workspace }}/adapter-deps/download"

.github/workflows/conventional-commit-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
server
5555
native
5656
native-pos
57+
native-connector
5758
testing
5859
docs
5960
build

.github/workflows/owasp-dependency-check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
jobs:
1515
dependency-check:
1616
runs-on: ubuntu-latest
17+
concurrency:
18+
group: ${{ github.workflow }}-owasp-dependency-check-${{ github.event.pull_request.number }}
19+
cancel-in-progress: true
1720
env:
1821
CVSS_THRESHOLD: ${{ github.event.inputs.cvss-threshold || '7.0' }}
1922
OWASP_VERSION: 12.1.3

.github/workflows/prestocpp-linux-build-and-unit-test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,9 @@ jobs:
339339
matrix:
340340
storage-format: [PARQUET, DWRF]
341341
enable-sidecar: ["true", "false"]
342+
concurrency:
343+
group: ${{ github.workflow }}-prestocpp-linux-presto-on-spark-e2e-tests-${{ matrix.storage-format }}-${{ matrix.enable-sidecar }}-${{ github.event.pull_request.number }}
344+
cancel-in-progress: true
342345
container:
343346
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
344347
env:
@@ -434,6 +437,9 @@ jobs:
434437
runs-on: ubuntu-22.04
435438
container:
436439
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
440+
concurrency:
441+
group: ${{ github.workflow }}-prestocpp-linux-presto-sidecar-tests-${{ github.event.pull_request.number }}
442+
cancel-in-progress: true
437443
env:
438444
MAVEN_OPTS: -Xmx4G -XX:+ExitOnOutOfMemoryError
439445
MAVEN_FAST_INSTALL: -B -V --quiet -T 1C -DskipTests -Dair.check.skip-all -Dmaven.javadoc.skip=true
@@ -523,6 +529,9 @@ jobs:
523529
runs-on: ubuntu-22.04
524530
container:
525531
image: prestodb/presto-native-dependency:0.296-20251021214746-7eb2686
532+
concurrency:
533+
group: ${{ github.workflow }}-prestocpp-linux-presto-plan-checker-router-plugin-tests-${{ github.event.pull_request.number }}
534+
cancel-in-progress: true
526535
env:
527536
MAVEN_OPTS: -Xmx4G -XX:+ExitOnOutOfMemoryError
528537
MAVEN_FAST_INSTALL: -B -V --quiet -T 1C -DskipTests -Dair.check.skip-all -Dmaven.javadoc.skip=true

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,12 @@ repos:
5656
name: license-header
5757
description: Add missing license headers.
5858
entry: presto-native-execution/scripts/license-header.py
59-
args: [-i]
59+
args: [-i, -v]
6060
language: python
6161
additional_dependencies: [regex]
6262
require_serial: true
63-
exclude: ^.github/.*
63+
exclude: ^.github/.*$
64+
verbose: true
6465

6566
# CMake
6667
- repo: https://github.com/BlankSpruce/gersemi

presto-native-execution/scripts/license-header.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ def wrapper_hash(header, args):
109109
}
110110
)
111111

112-
file_pattern = regex.compile(
113-
"|".join(["^" + fnmatch.translate(type) + "$" for type in file_types.keys()])
114-
)
112+
#file_pattern = regex.compile(
113+
# r"|".join(["^" + fnmatch.translate(type) + "$" for type in file_types.keys()])
114+
#)
115115

116116

117117
def get_filename(filename):
@@ -159,11 +159,17 @@ def main():
159159
files = [file.strip() for file in sys.stdin.readlines()]
160160
else:
161161
files = args.files
162-
163162
for filepath in files:
164163
filename = get_filename(filepath)
165-
166-
matched = file_pattern.match(filename)
164+
message(sys.stdout, "filename : " + filepath)
165+
pattern = "|".join(
166+
["^" + fnmatch.translate(type) + "$" for type in file_types.keys()]
167+
)
168+
message(sys.stdout, "pattern : " + pattern)
169+
fixed_pattern = pattern.replace(r"\z", "\\Z")
170+
message(sys.stdout, "pattern : " + fixed_pattern)
171+
172+
matched = regex.compile(fixed_pattern).match(filename)
167173

168174
if not matched:
169175
message(log_to, "Skip : " + filepath)

0 commit comments

Comments
 (0)