From 30a63792c8ef06559a9f32cfc9fc4319d8476447 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Thu, 2 Mar 2023 13:16:05 +0000 Subject: [PATCH 1/2] Hack to rebuild the complement editable image --- scripts-dev/complement.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts-dev/complement.sh b/scripts-dev/complement.sh index 66aaa3d8480d..1b1761202fdd 100755 --- a/scripts-dev/complement.sh +++ b/scripts-dev/complement.sh @@ -59,6 +59,11 @@ Run the complement test suite on Synapse. is important. Not suitable for use in CI in case the editable environment is impure. + --rebuild-editable + Force a rebuild of the editable build of Synapse. + This is occasionally useful if the built-in rebuild detection with + --editable fails, e.g. when changing configure_workers_and_start.py. + For help on arguments to 'go test', run 'go help testflag'. EOF } @@ -82,6 +87,9 @@ while [ $# -ge 1 ]; do "-e"|"--editable") use_editable_synapse=1 ;; + "--rebuild-editable") + rebuild_editable_synapse=1 + ;; *) # unknown arg: presumably an argument to gotest. break the loop. break @@ -116,7 +124,9 @@ if [ -n "$use_editable_synapse" ]; then fi editable_mount="$(realpath .):/editable-src:z" - if docker inspect complement-synapse-editable &>/dev/null; then + if [ -n "$rebuild_editable_synapse" ]; then + unset skip_docker_build + elif docker inspect complement-synapse-editable &>/dev/null; then # complement-synapse-editable already exists: see if we can still use it: # - The Rust module must still be importable; it will fail to import if the Rust source has changed. # - The Poetry lock file must be the same (otherwise we assume dependencies have changed) From 3cc90b4b100a12f5fcf4d637d8e03d585191ac4a Mon Sep 17 00:00:00 2001 From: David Robertson Date: Thu, 2 Mar 2023 13:28:54 +0000 Subject: [PATCH 2/2] Changelog --- changelog.d/15184.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/15184.misc diff --git a/changelog.d/15184.misc b/changelog.d/15184.misc new file mode 100644 index 000000000000..53dba1b6bacd --- /dev/null +++ b/changelog.d/15184.misc @@ -0,0 +1 @@ +Add an option to force a rebuild of the "editable" complement image.