Repository navigation
test: tag each Comet suite with its CI test group, and add run-comet-tests.sh #7484
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
Open
andygrove
wants to merge
3
commits into
apache:main
Choose a base branch
from
andygrove:ci-test-group-tags
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| #!/usr/bin/env bash | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
| # | ||
| # Run one group of the Comet JVM test suites. Each concrete suite carries one | ||
| # group tag, such as org.apache.comet.tags.ExecGroup, and CI runs each group as | ||
| # its own job. | ||
| # Arguments after the group go to Maven: | ||
| # | ||
| # dev/ci/run-comet-tests.sh exec -Pspark-4.0 | ||
| # | ||
| # The group tag does not select integration suites (@IntegrationTestSuite, such as | ||
| # ParquetEncryptionITCase). The ScalaTest plugin excludes them, and they run under | ||
| # maven-failsafe-plugin, which ignores the tag. So the default `test` goal never runs | ||
| # them, and `--goal install` runs all of them whichever group is named. | ||
| # | ||
| # Build the native library first: `make core`, or `make release` with -Prelease. | ||
| # Written for bash 3.2. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" | ||
| # Each group is a tag annotation here, such as ExecGroup.java for `exec`. | ||
| TAGS_DIR="$REPO/spark/src/test/java/org/apache/comet/tags" | ||
|
|
||
| usage() { | ||
| groups="" | ||
| for tag in "$TAGS_DIR"/*Group.java; do | ||
| tag="$(basename "$tag" Group.java)" | ||
| groups="$groups $(printf '%s' "$tag" | tr '[:upper:]' '[:lower:]')" | ||
| done | ||
| cat >&2 <<USAGE | ||
| Usage: dev/ci/run-comet-tests.sh [--goal <goal>] <group> [maven args...] | ||
|
|
||
| groups $groups | ||
| --goal the Maven goal to run (default: test). install also runs the | ||
| spark-integration checks, which are not selected by the group: | ||
| every *ITCase suite runs, whichever group is named. | ||
| USAGE | ||
| exit 2 | ||
| } | ||
|
|
||
| GOAL="test" | ||
| while [ $# -gt 0 ]; do | ||
| case "$1" in | ||
| --goal) | ||
| [ $# -ge 2 ] || usage | ||
| GOAL="$2" | ||
| shift 2 | ||
| ;; | ||
| -h | --help) usage ;; | ||
| *) break ;; | ||
| esac | ||
| done | ||
| [ $# -ge 1 ] || usage | ||
|
|
||
| # exec -> ExecGroup | ||
| TAG="$(printf '%s' "${1:0:1}" | tr '[:lower:]' '[:upper:]')${1:1}Group" | ||
| if [ ! -f "$TAGS_DIR/$TAG.java" ]; then | ||
| echo "Unknown test group: $1" >&2 | ||
| usage | ||
| fi | ||
| shift | ||
|
|
||
| cd "$REPO" | ||
|
|
||
| export SPARK_HOME="${SPARK_HOME:-$REPO}" | ||
| export SPARK_LOCAL_HOSTNAME="${SPARK_LOCAL_HOSTNAME:-localhost}" | ||
| export SPARK_LOCAL_IP="${SPARK_LOCAL_IP:-127.0.0.1}" | ||
| export MAVEN_OPTS="${MAVEN_OPTS:--Xmx4G -Xms2G -XX:+UnlockDiagnosticVMOptions -XX:+ShowMessageBoxOnError -XX:+HeapDumpOnOutOfMemoryError -XX:ErrorFile=./hs_err_pid%p.log}" | ||
|
|
||
| set -x | ||
| exec ./mvnw -B "$GOAL" "-DtagsToInclude=org.apache.comet.tags.$TAG" "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing only Spark 3.5's
CometWidthBucketSuitetoExecGroupstill passes: its 4.x copy overwrites the group here. Check every(suite, group)pair against the workflows before deduplicating names.