From f6f69928969ce99596268edb98f2196e2fef7333 Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Fri, 11 Jun 2021 15:40:54 -0500 Subject: [PATCH 01/15] Just testing some things out --- .github/workflows/adelphi-python.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/adelphi-python.yaml diff --git a/.github/workflows/adelphi-python.yaml b/.github/workflows/adelphi-python.yaml new file mode 100644 index 0000000..7270afc --- /dev/null +++ b/.github/workflows/adelphi-python.yaml @@ -0,0 +1,24 @@ +name: adelphi Python + +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.x + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + cd python/adelphi + pip install -r test-requirements.txt + python bin/test-adelphi -c 2.1.22 -p py2 From e0ad69636ac3abb6641958ffe48dcc7977bb8215 Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Fri, 11 Jun 2021 15:49:01 -0500 Subject: [PATCH 02/15] Try specifying a branch --- .github/workflows/adelphi-python.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/adelphi-python.yaml b/.github/workflows/adelphi-python.yaml index 7270afc..a320d41 100644 --- a/.github/workflows/adelphi-python.yaml +++ b/.github/workflows/adelphi-python.yaml @@ -2,9 +2,9 @@ name: adelphi Python on: push: - branches: [ $default-branch ] + branches: [ 115-breadth-first-testing ] pull_request: - branches: [ $default-branch ] + branches: [ 115-breadth-first-testing ] jobs: build: From c9096cef251b8ccd8078ae9bf13a7f0d7ed3d39f Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Mon, 14 Jun 2021 16:30:38 -0500 Subject: [PATCH 03/15] Moved tests.util.cassandra_util into adelphi.store so that necessary fns are available after installing adelphi Python package. Also cleaned up some unused imports and some excessive logging configs. --- python/adelphi/adelphi/anonymize.py | 1 - python/adelphi/adelphi/gh.py | 1 - python/adelphi/adelphi/store.py | 56 +++++++++++++++----- python/adelphi/bin/test-adelphi | 10 ++-- python/adelphi/tests/integration/__init__.py | 13 +++-- python/adelphi/tests/util/cassandra_util.py | 52 ------------------ 6 files changed, 58 insertions(+), 75 deletions(-) delete mode 100644 python/adelphi/tests/util/cassandra_util.py diff --git a/python/adelphi/adelphi/anonymize.py b/python/adelphi/adelphi/anonymize.py index f2622ba..13264ed 100644 --- a/python/adelphi/adelphi/anonymize.py +++ b/python/adelphi/adelphi/anonymize.py @@ -15,7 +15,6 @@ # Functions and constants related to the anonymization process from adelphi.store import get_standard_columns_from_table_metadata -import re # default prefixes for the anonymized names KEYSPACE_PREFIX = "ks" diff --git a/python/adelphi/adelphi/gh.py b/python/adelphi/adelphi/gh.py index a6a14b7..4610053 100644 --- a/python/adelphi/adelphi/gh.py +++ b/python/adelphi/adelphi/gh.py @@ -22,7 +22,6 @@ from github import Github -logging.basicConfig(level=logging.INFO) log = logging.getLogger('adelphi') # We're assuming any storage repo will be created after the conversion to "main" diff --git a/python/adelphi/adelphi/store.py b/python/adelphi/adelphi/store.py index b3f2d69..4b250e7 100644 --- a/python/adelphi/adelphi/store.py +++ b/python/adelphi/adelphi/store.py @@ -27,7 +27,8 @@ from cassandra.cluster import Cluster, ExecutionProfile, EXEC_PROFILE_DEFAULT, default_lbp_factory from cassandra.auth import PlainTextAuthProvider -logging.basicConfig(level=logging.INFO) +from tenacity import retry + log = logging.getLogger('adelphi') system_keyspaces = set(["system", @@ -39,20 +40,26 @@ "system_views"]) def build_auth_provider(username = None,password = None): - # instantiate auth provider if credentials have been provided - auth_provider = None - if username is not None and password is not None: - auth_provider = PlainTextAuthProvider(username=username, password=password) - return auth_provider + """Instantiate auth provider if credentials have been provided""" + if username is None or password is None: + return None + return PlainTextAuthProvider(username=username, password=password) +@retry def with_cluster(cluster_fn, hosts, port, username = None, password = None): ep = ExecutionProfile(load_balancing_policy=default_lbp_factory()) cluster = Cluster(hosts, port=port, auth_provider=build_auth_provider(username,password), execution_profiles={EXEC_PROFILE_DEFAULT: ep}) - cluster.connect() - rv = cluster_fn(cluster) - cluster.shutdown() - return rv + try: + cluster.connect() + return cluster_fn(cluster) + finally: + cluster.shutdown() + + +@retry +def with_local_cluster(cluster_fn): + return with_cluster(cluster_fn, ["127.0.0.1"], port=9042) def build_keyspace_objects(keyspaces, metadata): @@ -71,9 +78,7 @@ def partition(pred, iterable): def get_standard_columns_from_table_metadata(table_metadata): - """ - Return the standard columns and ensure to exclude pk and ck ones. - """ + """Return the standard columns and ensure to exclude pk and ck ones""" partition_column_names = [c.name for c in table_metadata.partition_key] clustering_column_names = [c.name for c in table_metadata.clustering_key] standard_columns = [] @@ -96,3 +101,28 @@ def set_replication_factor(selected_keyspaces, factor): log.debug("Replication for keyspace " + ks.name+ ": " + str(ks.replication_strategy)) strategy = ks.replication_strategy strategy.replication_factor_info = factor + + +def create_schema(session, schemaPath): + """Read schema CQL document and apply CQL commands to cluster""" + log.info("Creating schema on Cassandra cluster from file {}".format(schemaPath)) + with open(schemaPath) as schema: + buff = "" + for line in schema: + realLine = line.strip() + if len(realLine) == 0: + log.debug("Skipping empty statement") + continue + if realLine.startswith("//") or realLine.startswith("--"): + log.debug("Skipping commented statement") + continue + buff += (" " if len(buff) > 0 else "") + buff += realLine + if buff.endswith(';'): + log.debug("Executing statement {}".format(buff)) + try: + session.execute(buff) + except Exception as exc: + log.error("Exception executing statement: {}".format(buff), exc_info=exc) + finally: + buff = "" diff --git a/python/adelphi/bin/test-adelphi b/python/adelphi/bin/test-adelphi index 63e3891..563afb8 100644 --- a/python/adelphi/bin/test-adelphi +++ b/python/adelphi/bin/test-adelphi @@ -11,7 +11,7 @@ import configparser import os -from tests.util.cassandra_util import connectToLocalCassandra +from adelphi.store import with_local_cluster import click import docker @@ -36,7 +36,6 @@ def runCassandraContainer(client, version): def writeToxIni(version): config = configparser.ConfigParser() config["tox"] = { "envlist": "py2, py3" } - envs = {"CASSANDRA_VERSION": version} config["testenv"] = {"deps": TOX_DEPENDENCIES, \ "commands": "pytest {posargs}", \ "setenv": "CASSANDRA_VERSION = {}".format(version)} @@ -63,7 +62,12 @@ def runtests(cassandra, python, pytest): container = runCassandraContainer(client, version) print("Validating connection to local Cassandra") - connectToLocalCassandra() + def validationFn(cluster): + session = cluster.connect() + rs = session.execute("select * from system.local") + print("Connected to Cassandra cluster, first row of system.local: {}".format(rs.one())) + return (cluster, session) + with_local_cluster.retry_with(stop=stop_after_attempt(5), wait=wait_fixed(3))(validationFn) try: if os.path.exists(TOX_CONFIG): diff --git a/python/adelphi/tests/integration/__init__.py b/python/adelphi/tests/integration/__init__.py index 14abec5..87da0e2 100644 --- a/python/adelphi/tests/integration/__init__.py +++ b/python/adelphi/tests/integration/__init__.py @@ -10,7 +10,7 @@ from collections import namedtuple -from tests.util.cassandra_util import callWithCassandra, createSchema +from adelphi.store import with_local_cluster, create_schema log = logging.getLogger('adelphi') @@ -22,21 +22,24 @@ def __keyspacesForCluster(cluster): def setupSchema(schemaPath): - return callWithCassandra(lambda _,s: createSchema(s, schemaPath)) + def schemaFn(cluster): + return create_schema(cluster.connect(), schemaPath) + return with_local_cluster(schemaFn) def getAllKeyspaces(): - return callWithCassandra(lambda c,s: __keyspacesForCluster(c)) + return with_local_cluster(__keyspacesForCluster) def dropNewKeyspaces(origKeyspaces): - def dropFn(cluster, session): + def dropFn(cluster): currentKeyspaces = __keyspacesForCluster(cluster) droppingKeyspaces = currentKeyspaces - origKeyspaces log.info("Dropping the following keyspaes created by this test: {}".format(",".join(droppingKeyspaces))) + session = cluster.connect() for keyspace in droppingKeyspaces: session.execute("drop keyspace {}".format(keyspace)) - return callWithCassandra(dropFn) + return with_local_cluster(dropFn) class SchemaTestCase(unittest.TestCase): diff --git a/python/adelphi/tests/util/cassandra_util.py b/python/adelphi/tests/util/cassandra_util.py deleted file mode 100644 index 02a40b2..0000000 --- a/python/adelphi/tests/util/cassandra_util.py +++ /dev/null @@ -1,52 +0,0 @@ -# A few utility methods for interacting with Cassandra from within tests -import logging -import time - -from cassandra.cluster import Cluster - -from tenacity import retry, wait_fixed - -log = logging.getLogger('adelphi') - -@retry(wait=wait_fixed(3)) -def connectToLocalCassandra(): - cluster = Cluster(["127.0.0.1"], port=9042) - session = cluster.connect() - - # Confirm that the session is actually functioning before calling things good - rs = session.execute("select * from system.local") - log.info("Connected to Cassandra cluster, first row of system.local: {}".format(rs.one())) - return (cluster, session) - - -def createSchema(session, schemaPath): - log.info("Creating schema on Cassandra cluster from file {}".format(schemaPath)) - with open(schemaPath) as schema: - buff = "" - for line in schema: - realLine = line.strip() - if len(realLine) == 0: - log.debug("Skipping empty statement") - continue - if realLine.startswith("//") or realLine.startswith("--"): - log.debug("Skipping commented statement") - continue - buff += (" " if len(buff) > 0 else "") - buff += realLine - if buff.endswith(';'): - log.debug("Executing statement {}".format(buff)) - try: - session.execute(buff) - except Exception as exc: - log.error("Exception executing statement: {}".format(buff), exc_info=exc) - finally: - buff = "" - - -def callWithCassandra(someFn): - cluster = None - try: - (cluster,session) = connectToLocalCassandra() - return someFn(cluster, session) - finally: - cluster.shutdown() From 0ed80b7532002be702fcab34d8322e00cffa1095 Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Mon, 14 Jun 2021 16:56:23 -0500 Subject: [PATCH 04/15] Promote test-adelphi to a full bin script within the package; should simplify the import of functionality from adelphi packages. Also simplify the dependency specification; test-requirements.txt really should be testing-only stuff now. --- .github/workflows/adelphi-python.yaml | 6 +++--- python/adelphi/setup.py | 5 +++-- python/adelphi/test-requirements.txt | 3 --- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/adelphi-python.yaml b/.github/workflows/adelphi-python.yaml index a320d41..d7d1e33 100644 --- a/.github/workflows/adelphi-python.yaml +++ b/.github/workflows/adelphi-python.yaml @@ -19,6 +19,6 @@ jobs: python-version: '3.x' - name: Install dependencies run: | - cd python/adelphi - pip install -r test-requirements.txt - python bin/test-adelphi -c 2.1.22 -p py2 + cd python + pip install ./adelphi + test-adelphi -c 2.1.22 -p py2 diff --git a/python/adelphi/setup.py b/python/adelphi/setup.py index 79bc65c..9e30846 100644 --- a/python/adelphi/setup.py +++ b/python/adelphi/setup.py @@ -8,7 +8,8 @@ 'cassandra-driver ~= 3.24', 'click ~= 7.1', 'PyGithub ~= 1.45', - 'PyYAML ~= 5.4' + 'PyYAML ~= 5.4', + 'tenacity ~= 7.0' ] if not PY3: @@ -48,6 +49,6 @@ 'Topic :: Software Development :: Libraries :: Python Modules' ], packages=['adelphi'], - scripts=['bin/adelphi'], + scripts=['bin/adelphi','bin/test-adelphi'], install_requires=dependencies, ) diff --git a/python/adelphi/test-requirements.txt b/python/adelphi/test-requirements.txt index 087a0ae..9c59653 100644 --- a/python/adelphi/test-requirements.txt +++ b/python/adelphi/test-requirements.txt @@ -1,5 +1,2 @@ -click ~= 7.1 -cassandra-driver ~= 3.24 docker ~= 4.4 -tenacity ~= 7.0 tox ~= 3.22 From f633eb3956e87dc0c6aa3a6935286d2a989d950d Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Mon, 14 Jun 2021 17:08:37 -0500 Subject: [PATCH 05/15] Forgot to include pip install of test dependencies as well --- .github/workflows/adelphi-python.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/adelphi-python.yaml b/.github/workflows/adelphi-python.yaml index d7d1e33..fe92cff 100644 --- a/.github/workflows/adelphi-python.yaml +++ b/.github/workflows/adelphi-python.yaml @@ -21,4 +21,5 @@ jobs: run: | cd python pip install ./adelphi + pip install -r ./adelphi/test-requirements.txt test-adelphi -c 2.1.22 -p py2 From 340a2b0f6924ce4cde209b4b6d23b5294851af40 Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Mon, 14 Jun 2021 17:25:48 -0500 Subject: [PATCH 06/15] Make sure we're in the directory with setup.py when we invoke test-adelphi (since this will in turn be required for tox) --- .github/workflows/adelphi-python.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/adelphi-python.yaml b/.github/workflows/adelphi-python.yaml index fe92cff..7c43944 100644 --- a/.github/workflows/adelphi-python.yaml +++ b/.github/workflows/adelphi-python.yaml @@ -21,5 +21,6 @@ jobs: run: | cd python pip install ./adelphi - pip install -r ./adelphi/test-requirements.txt + cd adelphi + pip install -r ./test-requirements.txt test-adelphi -c 2.1.22 -p py2 From 68109c1781bb0826b9757c34a771d729f18a8da4 Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Tue, 15 Jun 2021 10:46:40 -0500 Subject: [PATCH 07/15] Explicit step for running tests + removal of constraints around C*/Python versions --- .github/workflows/adelphi-python.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/adelphi-python.yaml b/.github/workflows/adelphi-python.yaml index 7c43944..d8524ad 100644 --- a/.github/workflows/adelphi-python.yaml +++ b/.github/workflows/adelphi-python.yaml @@ -23,4 +23,6 @@ jobs: pip install ./adelphi cd adelphi pip install -r ./test-requirements.txt - test-adelphi -c 2.1.22 -p py2 + - name: Execute tests + run: | + test-adelphi From 439143630cc91246738ea697b1e8333dcb2921f5 Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Tue, 15 Jun 2021 10:56:23 -0500 Subject: [PATCH 08/15] Separate cd for the separate command --- .github/workflows/adelphi-python.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/adelphi-python.yaml b/.github/workflows/adelphi-python.yaml index d8524ad..5e11473 100644 --- a/.github/workflows/adelphi-python.yaml +++ b/.github/workflows/adelphi-python.yaml @@ -25,4 +25,5 @@ jobs: pip install -r ./test-requirements.txt - name: Execute tests run: | + cd python/adelphi test-adelphi From d1e3d61017fbeb11adf4c846c08f51c24d00df08 Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Tue, 15 Jun 2021 15:25:41 -0500 Subject: [PATCH 09/15] Breaking 2.1 CQL integration tests to confirm that GH actions tests correctly report failure --- .../adelphi/tests/integration/resources/cql-schemas/2.1.22.cql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/adelphi/tests/integration/resources/cql-schemas/2.1.22.cql b/python/adelphi/tests/integration/resources/cql-schemas/2.1.22.cql index 26d7af8..f253d2b 100644 --- a/python/adelphi/tests/integration/resources/cql-schemas/2.1.22.cql +++ b/python/adelphi/tests/integration/resources/cql-schemas/2.1.22.cql @@ -2,7 +2,7 @@ CREATE KEYSPACE IF NOT EXISTS ks_0 WITH replication = {'class': 'SimpleStrategy' CREATE TYPE IF NOT EXISTS ks_0.udt_0 ( fld_0 text, - fld_1 int + fld_2 int ); CREATE TYPE IF NOT EXISTS ks_0.udt_1 ( From 728d2eb8ea9599ae936245ae952b5b712a8d101b Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Wed, 16 Jun 2021 14:33:40 -0500 Subject: [PATCH 10/15] Fix CLI logic to handle specification of partial C* version numbers --- python/adelphi/bin/test-adelphi | 36 +++++++++++++++++++-- python/adelphi/tests/integration/test_nb.py | 1 - 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/python/adelphi/bin/test-adelphi b/python/adelphi/bin/test-adelphi index 563afb8..558ece0 100644 --- a/python/adelphi/bin/test-adelphi +++ b/python/adelphi/bin/test-adelphi @@ -10,6 +10,7 @@ # suite, which in turn should allow us to write simpler tests. import configparser import os +import re from adelphi.store import with_local_cluster @@ -42,6 +43,34 @@ def writeToxIni(version): with open(TOX_CONFIG, 'w') as configfile: config.write(configfile) + +def buildVersionMap(): + assert sorted(DEFAULT_CASSANDRA_VERSIONS) + rv = {v:v for v in DEFAULT_CASSANDRA_VERSIONS} + majorMinorPattern = re.compile(r"(\d\.\d).*") + for v in DEFAULT_CASSANDRA_VERSIONS: + majorMinorMatch = majorMinorPattern.match(v) + if majorMinorMatch: + majorMinor = majorMinorMatch.group(1) + rv[majorMinor] = v + # The reason we needed to asset that our input was sorted; we want the last + # major version entry we discover in the list to map to the major version. + # So "2" => "2.2.whatever" rather than "2.1.whatever" + rv[majorMinor.split('.')[0]] = v + return rv + + +def resolveCassandraVersions(cassandra_versions): + if not cassandra_versions: + return DEFAULT_CASSANDRA_VERSIONS + versionMap = buildVersionMap() + computedVersions = [x for x in [versionMap.get(v) for v in cassandra_versions] if x is not None] + if not computedVersions: + print("Could not compute valid Cassandra versions based on args, using defaults") + return DEFAULT_CASSANDRA_VERSIONS + return computedVersions + + @click.command() @click.option('--cassandra', '-c', multiple=True, type=str) @click.option('--python', '-p', multiple=True, type=click.Choice(["py2","py3"], case_sensitive = False)) @@ -54,9 +83,9 @@ def runtests(cassandra, python, pytest): tox_args.append(pytest) print("Full tox args: {}".format(tox_args)) - cassandra_versions = cassandra or DEFAULT_CASSANDRA_VERSIONS + cassandra_versions = resolveCassandraVersions(cassandra) print("Cassandra versions to test: {}".format(','.join(cassandra_versions))) - for version in cassandra_versions: + for version in resolveCassandraVersions(cassandra_versions): print("Running test suite for Cassandra version {}".format(version)) container = runCassandraContainer(client, version) @@ -77,7 +106,8 @@ def runtests(cassandra, python, pytest): # cmdline() will raise SystemExit when it's done so trap that here to avoid # exiting all the things try: - tox.cmdline(tox_args) + status = tox.cmdline(tox_args) + print("tox status: {}".format(status)) except SystemExit: pass except Exception as exc: diff --git a/python/adelphi/tests/integration/test_nb.py b/python/adelphi/tests/integration/test_nb.py index 66edab4..7c711f5 100644 --- a/python/adelphi/tests/integration/test_nb.py +++ b/python/adelphi/tests/integration/test_nb.py @@ -49,7 +49,6 @@ def compareToReferenceYaml(self, comparePath, version=None): # ========================== Test functions ========================== def test_stdout(self): - print("All keyspaces: {}".format(getAllKeyspaces())) stdoutPath = self.stdoutPath(self.version) stderrPath = self.stderrPath(self.version) subprocess.run("adelphi export-nb > {} 2>> {}".format(stdoutPath, stderrPath), shell=True) From b577c2a6db1dd544ccefe40f76ef8f872e7271b5 Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Wed, 16 Jun 2021 15:52:17 -0500 Subject: [PATCH 11/15] Set test-adelphi exit status code based on the number of tox invocations which returned a non-zero status code themselves --- python/adelphi/bin/test-adelphi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/python/adelphi/bin/test-adelphi b/python/adelphi/bin/test-adelphi index 558ece0..10b74de 100644 --- a/python/adelphi/bin/test-adelphi +++ b/python/adelphi/bin/test-adelphi @@ -11,6 +11,7 @@ import configparser import os import re +import sys from adelphi.store import with_local_cluster @@ -85,6 +86,7 @@ def runtests(cassandra, python, pytest): cassandra_versions = resolveCassandraVersions(cassandra) print("Cassandra versions to test: {}".format(','.join(cassandra_versions))) + exitCodes = [] for version in resolveCassandraVersions(cassandra_versions): print("Running test suite for Cassandra version {}".format(version)) @@ -108,13 +110,13 @@ def runtests(cassandra, python, pytest): try: status = tox.cmdline(tox_args) print("tox status: {}".format(status)) - except SystemExit: - pass + except SystemExit as exc: + exitCodes.append(exc.code) except Exception as exc: print("Exception running tests for Cassandra version {}".format(version), exc) finally: container.stop() - + sys.exit(sum(1 for x in exitCodes if x != 0)) if __name__ == '__main__': runtests(obj={}) From f49c1c6c8b420706e249b728aa95015aafd8312d Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Wed, 16 Jun 2021 16:54:18 -0500 Subject: [PATCH 12/15] Revert "Breaking 2.1 CQL integration tests to confirm that GH actions tests correctly report failure" This reverts commit 5221b7450c7bafdc8b5c584598d4c0fb93de1abd. --- .../adelphi/tests/integration/resources/cql-schemas/2.1.22.cql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/adelphi/tests/integration/resources/cql-schemas/2.1.22.cql b/python/adelphi/tests/integration/resources/cql-schemas/2.1.22.cql index f253d2b..26d7af8 100644 --- a/python/adelphi/tests/integration/resources/cql-schemas/2.1.22.cql +++ b/python/adelphi/tests/integration/resources/cql-schemas/2.1.22.cql @@ -2,7 +2,7 @@ CREATE KEYSPACE IF NOT EXISTS ks_0 WITH replication = {'class': 'SimpleStrategy' CREATE TYPE IF NOT EXISTS ks_0.udt_0 ( fld_0 text, - fld_2 int + fld_1 int ); CREATE TYPE IF NOT EXISTS ks_0.udt_1 ( From c362efb891b2ecc8c039525c661c33a63376bfa0 Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Wed, 16 Jun 2021 17:09:01 -0500 Subject: [PATCH 13/15] Removing original (and incorrect) code to get tox exit codes --- python/adelphi/bin/test-adelphi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/adelphi/bin/test-adelphi b/python/adelphi/bin/test-adelphi index 10b74de..82d02e3 100644 --- a/python/adelphi/bin/test-adelphi +++ b/python/adelphi/bin/test-adelphi @@ -108,8 +108,7 @@ def runtests(cassandra, python, pytest): # cmdline() will raise SystemExit when it's done so trap that here to avoid # exiting all the things try: - status = tox.cmdline(tox_args) - print("tox status: {}".format(status)) + tox.cmdline(tox_args) except SystemExit as exc: exitCodes.append(exc.code) except Exception as exc: From b5bda4010b229b40cb4ed4f56b22d18cc7be8b71 Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Mon, 21 Jun 2021 16:16:30 -0500 Subject: [PATCH 14/15] Trying to key automatic builds off of master --- .github/workflows/adelphi-python.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/adelphi-python.yaml b/.github/workflows/adelphi-python.yaml index 5e11473..4ea7762 100644 --- a/.github/workflows/adelphi-python.yaml +++ b/.github/workflows/adelphi-python.yaml @@ -2,9 +2,9 @@ name: adelphi Python on: push: - branches: [ 115-breadth-first-testing ] + branches: [ $default-branch ] pull_request: - branches: [ 115-breadth-first-testing ] + branches: [ $default-branch ] jobs: build: From 1241c38106a7d645ebbc52ae63e2981ad6089d9c Mon Sep 17 00:00:00 2001 From: Bret McGuire Date: Mon, 21 Jun 2021 16:18:26 -0500 Subject: [PATCH 15/15] Trying (more explicity) to make builds automatically kick off for PRs off of master --- .github/workflows/adelphi-python.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/adelphi-python.yaml b/.github/workflows/adelphi-python.yaml index 4ea7762..b62c4f2 100644 --- a/.github/workflows/adelphi-python.yaml +++ b/.github/workflows/adelphi-python.yaml @@ -2,9 +2,9 @@ name: adelphi Python on: push: - branches: [ $default-branch ] + branches: [ master ] pull_request: - branches: [ $default-branch ] + branches: [ master ] jobs: build: