jmckenzie-dev commented on code in PR #2554:
URL: https://github.com/apache/cassandra/pull/2554#discussion_r1287727184


##########
.build/config/cassandra_ci.yaml:
##########
@@ -0,0 +1,342 @@
+# 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.
+
+#
+# Contains definitions of all pipelines and jobs (test suites) in Apache 
Cassandra's CI.
+#
+
+# We have 2 concepts in CI:
+#   1. Pipelines: a collection of test suites to be run
+#   2. Jobs: a set of tests to be run with a corresponding command that 
executes said testing
+#
+# We also have a variety of parameterizable settings in tests that need to be 
exercised to confirm different configurations
+# both work in isolation and work when combined with other params.
+
+
+#-----------------------------------------------------------------------------
+# PIPELINES
+#-----------------------------------------------------------------------------
+pipelines:
+  # All jobs in the pre-commit pipeline must run within constraints and pass
+  # before a commit is merged upstream. Committers are expected to validate
+  # and sign off on this if using non-reference CI environments.
+  #
+  # Failure to do so will lead to commits being reverted.
+  - name: pre-commit
+    jobs:
+      - unit
+      - jvm-dtest
+      - jvm-dtest-upgrade
+      - dtest
+      - dtest-large
+      - dtest-upgrade
+      - dtest-upgrade-large
+      - long-test
+      - cqlsh-test
+
+  # The post-commit pipeline is a larger set of tests that will be matrixed
+  # across other configuration axes (see parameters below) where we expect
+  # different implementations or configurations to only fail rarely if at all.
+  # Failures in tests here will be made visible on JIRA tickets shortly after
+  # test run on reference CI and committers are expected to prioritize
+  # rectifying any failures introduced by their work.
+  - name: post-commit
+    jobs:
+      - unit
+      - cdc
+      - compression
+      - test-oa
+      - test-system-keyspace-directory
+      - test-tries
+      - jvm-dtest
+      - jvm-dtest-upgrade
+      - dtest
+      - dtest-novnode
+      - dtest-offheap
+      - dtest-large
+      - dtest-large-novnode
+      - dtest-upgrade
+      - dtest-upgrade-large
+      - long-test
+      - cqlsh-test
+
+  # These are longer-term, much more rarely changing pieces of infrastructure 
or
+  # testing. We expect these to fail even more rarely than post-commit.
+  - name: nightly
+    jobs:
+      - stress-test
+      - fqltool-test
+      - test-burn
+
+#-----------------------------------------------------------------------------
+# JOBS
+#
+# Parameters:
+#   job: the name
+#   runtime_env: which runtime_env above to base self off
+#   description: text description of the job
+#   cmd: command to run in shell to execute tests
+#   testlist: command to run in shell to generate full list of tests to run. 
Expected to output filename value to TESTLIST= env var.
+#   test_timeout: timeout for the test in ms
+#   multiplex: Number of times to multiplex a test of the given suite on 
addition or change
+#
+# Required env vars:
+#   DIST_DIR=<C*/build dir>
+#   CASSANDRA_DIR=<C* dir>
+#   TESTLIST=<populated by testlist: tag entry on a given job>
+#   JOB=<populated by job: tag entry on a given job>
+#
+# Jobs can replace any base params defined in their resource class, and map
+# types will append new or overwriting keys.
+#
+#-----------------------------------------------------------------------------
+# RUNTIME ENVIRONMENTS
+# i.e. common resource classes
+#-----------------------------------------------------------------------------
+runtime_env:
+  - type: jvm
+    resources: {cpu=4, memory=4g, storage=25g}
+    env:
+      ANT_TEST_OPTS: "-Dno-build-test=true"
+    testlist: find test/unit -name '*Test.java' | sed "s;^test/unit/;;g" | sort
+    test_timeout: 480000
+    multiplex: 500
+
+  - type: jvm-dtest
+    resources: {cpu=4, memory=16g, storage=25g}
+    env:
+      ANT_TEST_OPTS: "-Dno-build-test=true"
+    test_timeout: 900000
+    multiplex: 500
+
+  - type: python
+    resources: {cpu=4, memory=6g, storage=50g}
+    testlist: echo "WARNING! You have to define a testlist entry for this 
job." && exit 1
+    test_timeout: 900000
+    multiplex: 500
+    cmd: pytest ${PYTEST_OPTS} --cassandra-dir=${CASSANDRA_DIR} 
--keep-failed-test-dir ${DTEST_ARGS} ${TESTLIST}
+    env:

Review Comment:
   From an ordering perspective, ISTM we can document / enforce / expect a 
"everything else needs to be resolved and parsed before you parse `cmd` and 
`env`.", and only allow those 2 to interpolate env variables.
   
   There's some hand-waving around "some of these items become environment 
variables and other env var are declared explicitly in the env: section" I 
don't currently love. I'm not familiar enough w/yaml to know if there's an 
idiomatic solution to that or if this is something we should document and punt 
on.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to