Skip to content

Conversation

@kerneltime
Copy link
Contributor

What changes were proposed in this pull request?

Currently there are no test for dashboard changes but the PRs still run the entire CI workflow.
Skip the CI if only the dashboards have been updated.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-10340

How was this patch tested?

Pushed this change and a dashboard change to https://github.com/kerneltime/ozone/commits/HDDS-10339-skip-ci/

@kerneltime kerneltime requested a review from adoroszlai February 9, 2024 06:00
@kerneltime kerneltime marked this pull request as draft February 9, 2024 06:09
Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @kerneltime for working on this.

Filtering checks based on paths is performed by dev-support/ci/selective_ci_checks.sh. Please add it to the pattern here:

local ignore_array=(
"^hadoop-ozone/dist/src/main/k8s"
"^hadoop-ozone/dist/src/main/license"
"\.md$"
)

and here:

# Counts other files which do not need to trigger any functional test
# (i.e. no compose/integration/kubernetes)
function get_count_misc_files() {
start_end::group_start "Count misc. files"
local pattern_array=(
"^dev-support/ci/pr_title_check"
"^.github"
"^hadoop-hdds/dev-support/checkstyle"
"^hadoop-ozone/dev-support/checks"
"^hadoop-ozone/dev-support/intellij"
"^hadoop-ozone/dist/src/main/license"
"\.bats$"
"\.txt$"
"\.md$"
"findbugsExcludeFile.xml"
"/NOTICE$"
)

We also have a unit test for this script. Please add a test case similar to the following, using the hash of a commit that only changed dashboard files (e.g. 039dea9):

@test "IntelliJ config" {
run dev-support/ci/selective_ci_checks.sh 92bf0913b6
assert_output -p 'basic-checks=["rat"]'
assert_output -p needs-build=false
assert_output -p needs-compile=false
assert_output -p needs-compose-tests=false
assert_output -p needs-dependency-check=false
assert_output -p needs-integration-tests=false
assert_output -p needs-kubernetes-tests=false
}

You can then test it locally by running:

hadoop-ozone/dev-support/checks/bats.sh

@kerneltime
Copy link
Contributor Author

Thanks will do!

Change-Id: Iad966750ea821605bba21aafe4b9b423b977749c
@kerneltime kerneltime marked this pull request as ready for review February 9, 2024 17:38
Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

ok 3 dashboard only

@kerneltime kerneltime added the CI label Feb 9, 2024
@kerneltime kerneltime merged commit af25a48 into apache:master Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants