From b643fa0ff2b522d39cabbe69a147ea56ca5e7944 Mon Sep 17 00:00:00 2001 From: Eliott Bouhana Date: Thu, 11 Jul 2024 15:55:43 +0200 Subject: [PATCH 1/6] ci: setup orchestrion integration tests Signed-off-by: Eliott Bouhana --- .github/workflows/orchestrion.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/orchestrion.yml diff --git a/.github/workflows/orchestrion.yml b/.github/workflows/orchestrion.yml new file mode 100644 index 0000000000..6b0287a5d9 --- /dev/null +++ b/.github/workflows/orchestrion.yml @@ -0,0 +1,21 @@ +name: Orchestrion +on: + workflow_dispatch: # manually + schedule: # nightly + - cron: "0 0 * * *" + pull_request: + merge_group: + push: + branches: + - release-v* + +concurrency: + # Automatically cancel previous runs if a new one is triggered to conserve resources. + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + +jobs: + test: + name: 'Run Tests' + uses: DataDog/orchestrion/.github/workflows/workflow_call.yml@eliott.bouhana/smoke-tests + with: + dd-trace-go-ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} From 78f8a6b1217b4ac24ebff697fa935217aa025ad7 Mon Sep 17 00:00:00 2001 From: Eliott Bouhana Date: Fri, 12 Jul 2024 11:49:42 +0200 Subject: [PATCH 2/6] oops I changed a public function that should make orchestrion CI fail Signed-off-by: Eliott Bouhana --- contrib/gin-gonic/gin/gintrace.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/gin-gonic/gin/gintrace.go b/contrib/gin-gonic/gin/gintrace.go index 1746c2689a..2738862c7d 100644 --- a/contrib/gin-gonic/gin/gintrace.go +++ b/contrib/gin-gonic/gin/gintrace.go @@ -30,7 +30,8 @@ func init() { // Middleware returns middleware that will trace incoming requests. If service is empty then the // default service name will be used. -func Middleware(service string, opts ...Option) gin.HandlerFunc { +func Middleware(opts ...Option) gin.HandlerFunc { + service := "" cfg := newConfig(service) for _, opt := range opts { opt(cfg) From 9e9b341c0c3f80e67560b9815aa7afdc8be41ac4 Mon Sep 17 00:00:00 2001 From: Eliott Bouhana Date: Mon, 5 Aug 2024 15:19:25 +0200 Subject: [PATCH 3/6] revert obvious testing error Signed-off-by: Eliott Bouhana --- contrib/gin-gonic/gin/gintrace.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/gin-gonic/gin/gintrace.go b/contrib/gin-gonic/gin/gintrace.go index 2738862c7d..1746c2689a 100644 --- a/contrib/gin-gonic/gin/gintrace.go +++ b/contrib/gin-gonic/gin/gintrace.go @@ -30,8 +30,7 @@ func init() { // Middleware returns middleware that will trace incoming requests. If service is empty then the // default service name will be used. -func Middleware(opts ...Option) gin.HandlerFunc { - service := "" +func Middleware(service string, opts ...Option) gin.HandlerFunc { cfg := newConfig(service) for _, opt := range opts { opt(cfg) From 5e9a4a279ade22f5e5eac3d64f1013586101f6bf Mon Sep 17 00:00:00 2001 From: Eliott Bouhana Date: Mon, 5 Aug 2024 15:29:31 +0200 Subject: [PATCH 4/6] switch to always use github.sha Signed-off-by: Eliott Bouhana --- .github/workflows/orchestrion.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/orchestrion.yml b/.github/workflows/orchestrion.yml index 6b0287a5d9..01d278d3d1 100644 --- a/.github/workflows/orchestrion.yml +++ b/.github/workflows/orchestrion.yml @@ -1,8 +1,6 @@ name: Orchestrion on: workflow_dispatch: # manually - schedule: # nightly - - cron: "0 0 * * *" pull_request: merge_group: push: @@ -18,4 +16,4 @@ jobs: name: 'Run Tests' uses: DataDog/orchestrion/.github/workflows/workflow_call.yml@eliott.bouhana/smoke-tests with: - dd-trace-go-ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} + dd-trace-go-ref: ${{ github.sha }} From cf584bff5060b488d66808e80bf534c5531030bd Mon Sep 17 00:00:00 2001 From: Eliott Bouhana Date: Mon, 5 Aug 2024 15:31:38 +0200 Subject: [PATCH 5/6] add permissions Signed-off-by: Eliott Bouhana --- .github/workflows/orchestrion.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/orchestrion.yml b/.github/workflows/orchestrion.yml index 01d278d3d1..1c8255f087 100644 --- a/.github/workflows/orchestrion.yml +++ b/.github/workflows/orchestrion.yml @@ -7,6 +7,8 @@ on: branches: - release-v* +permissions: read-all + concurrency: # Automatically cancel previous runs if a new one is triggered to conserve resources. group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} From 5cf8d736195f5d1b6a7864a8520e53e3c84822e7 Mon Sep 17 00:00:00 2001 From: Eliott Bouhana Date: Mon, 5 Aug 2024 15:32:44 +0200 Subject: [PATCH 6/6] cancel-in-progress Signed-off-by: Eliott Bouhana --- .github/workflows/orchestrion.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/orchestrion.yml b/.github/workflows/orchestrion.yml index 1c8255f087..e3a08c723b 100644 --- a/.github/workflows/orchestrion.yml +++ b/.github/workflows/orchestrion.yml @@ -12,6 +12,7 @@ permissions: read-all concurrency: # Automatically cancel previous runs if a new one is triggered to conserve resources. group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: true jobs: test: