From cdb2f553ea052da07421b91be029d720b33d28eb Mon Sep 17 00:00:00 2001 From: Andrew Scribner Date: Tue, 1 Aug 2023 13:31:37 -0400 Subject: [PATCH 1/4] update tox.ini's update-requirements Updates tox.ini's `update-requirements` as described in https://github.com/canonical/argo-operators/pull/100 --- tox.ini | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index 9ee7c185..1e5c07bb 100644 --- a/tox.ini +++ b/tox.ini @@ -30,10 +30,11 @@ allowlist_externals = find pip-compile xargs -commands = -; uses 'bash -c' because piping didn't work in regular tox commands - pip-compile requirements-fmt.in - bash -c 'find . -type f -name "requirements*.in" | xargs --replace=\{\} pip-compile --resolver=legacy \{\}' +commands = + ; we must preserve the order of compilation, since each *.in file depends on some *.txt file. + ; For example, requirements-unit.in depends on requirements.txt and we must compile first + ; requirements.txt to ensure that requirements-unit.txt get the same dependency as the requirements.txt + bash -c 'for pattern in "requirements.in" "requirements-fmt.in" "requirements*.in"; do find . -type f -name "$pattern" -exec bash -c "cd \$(dirname "{}") && pip-compile --resolver=backtracking \$(basename "{}")" \;; done' deps = pip-tools description = Update requirements files by executing pip-compile on all requirements*.in files, including those in subdirs. From 1d6a9d851957a115d09d9f7e15f045687a3572b1 Mon Sep 17 00:00:00 2001 From: Andrew Scribner Date: Tue, 1 Aug 2023 13:32:51 -0400 Subject: [PATCH 2/4] Update tox.ini --- charms/knative-eventing/tox.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/charms/knative-eventing/tox.ini b/charms/knative-eventing/tox.ini index abdf75b9..bc882ce9 100644 --- a/charms/knative-eventing/tox.ini +++ b/charms/knative-eventing/tox.ini @@ -31,11 +31,11 @@ allowlist_externals = find pip-compile xargs -commands = -; uses 'bash -c' because piping didn't work in regular tox commands - pip-compile requirements.in - pip-compile requirements-fmt.in - bash -c 'find . -type f -name "requirements*.in" | xargs --replace=\{\} pip-compile --resolver=legacy \{\}' +commands = + ; we must preserve the order of compilation, since each *.in file depends on some *.txt file. + ; For example, requirements-unit.in depends on requirements.txt and we must compile first + ; requirements.txt to ensure that requirements-unit.txt get the same dependency as the requirements.txt + bash -c 'for pattern in "requirements.in" "requirements-fmt.in" "requirements*.in"; do find . -type f -name "$pattern" -exec bash -c "cd \$(dirname "{}") && pip-compile --resolver=backtracking \$(basename "{}")" \;; done' deps = pip-tools description = Update requirements files by executing pip-compile on all requirements*.in files, including those in subdirs. From 7a0427a9ecfcad09a59bc0cabba6db24d38f119c Mon Sep 17 00:00:00 2001 From: Andrew Scribner Date: Tue, 1 Aug 2023 13:32:59 -0400 Subject: [PATCH 3/4] Update tox.ini --- charms/knative-operator/tox.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/charms/knative-operator/tox.ini b/charms/knative-operator/tox.ini index abdf75b9..bc882ce9 100644 --- a/charms/knative-operator/tox.ini +++ b/charms/knative-operator/tox.ini @@ -31,11 +31,11 @@ allowlist_externals = find pip-compile xargs -commands = -; uses 'bash -c' because piping didn't work in regular tox commands - pip-compile requirements.in - pip-compile requirements-fmt.in - bash -c 'find . -type f -name "requirements*.in" | xargs --replace=\{\} pip-compile --resolver=legacy \{\}' +commands = + ; we must preserve the order of compilation, since each *.in file depends on some *.txt file. + ; For example, requirements-unit.in depends on requirements.txt and we must compile first + ; requirements.txt to ensure that requirements-unit.txt get the same dependency as the requirements.txt + bash -c 'for pattern in "requirements.in" "requirements-fmt.in" "requirements*.in"; do find . -type f -name "$pattern" -exec bash -c "cd \$(dirname "{}") && pip-compile --resolver=backtracking \$(basename "{}")" \;; done' deps = pip-tools description = Update requirements files by executing pip-compile on all requirements*.in files, including those in subdirs. From 550b2de7cc02a6b8c6dbd95446cd329effe3b2ef Mon Sep 17 00:00:00 2001 From: Andrew Scribner Date: Tue, 1 Aug 2023 13:33:07 -0400 Subject: [PATCH 4/4] Update tox.ini --- charms/knative-serving/tox.ini | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/charms/knative-serving/tox.ini b/charms/knative-serving/tox.ini index abdf75b9..bc882ce9 100644 --- a/charms/knative-serving/tox.ini +++ b/charms/knative-serving/tox.ini @@ -31,11 +31,11 @@ allowlist_externals = find pip-compile xargs -commands = -; uses 'bash -c' because piping didn't work in regular tox commands - pip-compile requirements.in - pip-compile requirements-fmt.in - bash -c 'find . -type f -name "requirements*.in" | xargs --replace=\{\} pip-compile --resolver=legacy \{\}' +commands = + ; we must preserve the order of compilation, since each *.in file depends on some *.txt file. + ; For example, requirements-unit.in depends on requirements.txt and we must compile first + ; requirements.txt to ensure that requirements-unit.txt get the same dependency as the requirements.txt + bash -c 'for pattern in "requirements.in" "requirements-fmt.in" "requirements*.in"; do find . -type f -name "$pattern" -exec bash -c "cd \$(dirname "{}") && pip-compile --resolver=backtracking \$(basename "{}")" \;; done' deps = pip-tools description = Update requirements files by executing pip-compile on all requirements*.in files, including those in subdirs.