From dd62d63717ec982804e20dcd9791e75b839445b0 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Mon, 23 Dec 2024 12:34:37 +0100 Subject: [PATCH 1/3] Do not run protoc tasks in parallel Otherwise if the format task changes the underlying files, it will make fail the other tasks. task: [protoc:breaking-change-detection] buf breaking --against '.git#branch=origin/master,subdir=rpc' task: [protoc:format] buf format --write --exit-code task: [protoc:check] buf lint task: [protoc:compile] buf dep update Failure: context canceled Failure: context canceled Failure: context canceled exit status 100 --- Taskfile.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 82d7999da35..3e4a0871a16 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -228,11 +228,11 @@ tasks: protoc: desc: Lint, format and compile protobuf definitions - deps: - - protoc:check - - protoc:format - - protoc:compile - - protoc:breaking-change-detection + cmds: + - task: protoc:format + - task: protoc:check + - task: protoc:compile + - task: protoc:breaking-change-detection protoc:compile: desc: Compile protobuf definitions From 8cd67b4584454a05e2ee619ce9fcc52fe511124e Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Mon, 23 Dec 2024 12:35:46 +0100 Subject: [PATCH 2/3] Simplified taskfile --- Taskfile.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index 3e4a0871a16..dac827c033b 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -243,8 +243,7 @@ tasks: protoc:docs: desc: Generate docs for protobuf definitions cmds: - - | - buf generate --template buf.doc.gen.yaml + - buf generate --template buf.doc.gen.yaml docs:include-configuration-json-schema: desc: Copy configuration JSON schema to make it available in documentation From f0c02d66f663c284816b52315a2929225314fed8 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Mon, 23 Dec 2024 12:35:55 +0100 Subject: [PATCH 3/3] Do not exit with error if `buf format` formats a file This is the intended behaviour. --- Taskfile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Taskfile.yml b/Taskfile.yml index dac827c033b..08cd153a3be 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -265,7 +265,7 @@ tasks: protoc:format: desc: Perform formatting of the protobuf definitions cmds: - - buf format --write --exit-code + - buf format --write protoc:breaking-change-detection: desc: Detect protobuf breaking changes