abstractdog commented on code in PR #498: URL: https://github.com/apache/tez/pull/498#discussion_r3256665002
########## dev-support/tez-personality.sh: ########## @@ -0,0 +1,119 @@ +#!/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. + +# Apache Yetus personality for Apache Tez + +personality_plugins "all" + +## @description Globals for this personality +## @audience private +## @stability evolving +## @replaceable no +function personality_globals +{ + # shellcheck disable=SC2034 + PROJECT_NAME=tez + # shellcheck disable=SC2034 + BUILDTOOL=maven + # shellcheck disable=SC2034 + PATCH_BRANCH_DEFAULT=master + # shellcheck disable=SC2034 + JIRA_ISSUE_RE='^TEZ-[0-9]+$' + # shellcheck disable=SC2034 + GITHUB_REPO="apache/tez" + + # Increase memory for maven + # shellcheck disable=SC2034 + MAVEN_OPTS="${MAVEN_OPTS:-"-Xmx4g -XX:+UseG1GC"}" + + # Default Yetus settings + # shellcheck disable=SC2034 + DOCKER_MEMORY="20g" + # shellcheck disable=SC2034 + PROC_LIMIT=5500 + + # Force-enable core verification plugins + add_test compile + add_test unit +} + +## @description Module selection +## @audience private +## @stability evolving +## @replaceable no +function personality_modules +{ + local repostatus=$1 + local testtype=$2 + local extra="" + local MODULES=("${CHANGED_MODULES[@]}") + + yetus_debug "Personality: ${repostatus} ${testtype}" + + clear_personality_queue + + extra="-Ptools" + + # Apply strict linting profile for all phases except unit tests + if [[ ${testtype} != "unit" ]]; then + extra="${extra} -Ptest-patch" + fi + + # Execute core compilation and unit tests globally (project root) + if [[ ${testtype} == unit || ${testtype} == compile ]]; then + yetus_debug "Forcing root module for ${testtype}" + MODULES=(.) + fi + + if [[ ${testtype} == spotbugs ]]; then + extra="${extra} -Pspotbugs" + fi + + for module in "${MODULES[@]}"; do + # shellcheck disable=SC2086 + personality_enqueue_module ${module} ${extra} + done +} + +## @description File filter to determine which tests to run +## @audience private +## @stability evolving +## @replaceable no +function personality_file_filter +{ + local filename=$1 + + yetus_debug "Tez file filter: ${filename}" Review Comment: thanks, I'm fine with that, so in case of an evil pre-commit issue, `--debug` can be added to the jenkins pipeline script while manually Replaying the job <img width="721" height="572" alt="Screenshot 2026-05-18 at 11 30 56" src="https://github.com/user-attachments/assets/6da9c17f-c48c-45ff-8a2e-0fe7a803718e" /> I'm usually against comments containing code, but in this case, a commented-out `--debug` option could be really helpful, what do you think? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
