Skip to content

Commit 824b1fc

Browse files
authored
Merge branch 'main' into auto/issue-1957
2 parents 1350d8b + 927b474 commit 824b1fc

547 files changed

Lines changed: 34230 additions & 11735 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ updates:
1111
# (major go-github API changes), update them manually instead
1212
- dependency-name: "github.com/google/go-github/*"
1313
- dependency-name: "github.com/bradleyfalzon/ghinstallation/v2"
14+
# otel is pinned to v1.44.0 until knative.dev/pkg supports semconv >= 1.43
15+
# (its observability/semconv is hardcoded to 1.41.0; otel SDK >= 1.45
16+
# defaults to 1.43.0 and resource.Merge panics at startup)
17+
- dependency-name: "go.opentelemetry.io/otel*"
1418
groups:
1519
go-dependencies:
1620
patterns:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../.tekton/ai/REVIEW.md

.tekton/doc.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ metadata:
77
pipelinesascode.tekton.dev/max-keep-runs: "2"
88
pipelinesascode.tekton.dev/cancel-in-progress: "true"
99
pipelinesascode.tekton.dev/on-cel-expression: |
10-
event == "push" && (
11-
(target_branch == "main" && "docs/***".pathChanged()) ||
12-
target_branch.startsWith("refs/tags/")
13-
) ||
10+
(event == "push" && ((target_branch == "main" && "docs/***".pathChanged()) || target_branch.startsWith("refs/tags/")))
11+
||
1412
(event == "pull_request" && "docs/***".pathChanged())
1513
spec:
1614
params:

config/302-pac-configmap.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,27 @@ data:
160160
# Default: false
161161
require-ok-to-test-sha: "false"
162162

163+
# Enable retrying Git provider API requests when hitting rate limits (429,
164+
# or 403 with rate limit headers on GitHub) or transient server errors.
165+
# Retries use exponential backoff with jitter and honor the Retry-After and
166+
# X-RateLimit-Reset headers, giving up when the reset is further away than
167+
# api-retry-max-wait-seconds.
168+
# When false, the GitLab client keeps the retry behaviour of the upstream
169+
# GitLab Go client and the GitHub client does not retry.
170+
# Default: false
171+
enable-api-retry: "false"
172+
173+
# Maximum number of attempts (initial request included) when enable-api-retry
174+
# is true. Values lower than 1 fall back to the default.
175+
# Default: 4
176+
api-retry-max-attempts: "4"
177+
178+
# Maximum time in seconds to wait between retries when enable-api-retry is
179+
# true. If the provider rate limit reset is further away than this, the
180+
# request fails instead of blocking.
181+
# Default: 120
182+
api-retry-max-wait-seconds: "120"
183+
163184
# When enabled, this option prevents duplicate pipeline runs when a commit appears in
164185
# both a push event and a pull request. If a push event comes from a commit that is
165186
# part of an open pull request, the push event will be skipped as it would create

docs/content/docs/api/configmap.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,72 @@ skip-push-event-for-pr-commits: "true"
339339

340340
{{< /param >}}
341341

342+
### API Retry
343+
344+
{{< tech_preview "Provider API Retry for GitHub and GitLab" >}}
345+
346+
{{< param name="enable-api-retry" type="boolean" default="false" id="param-enable-api-retry" >}}
347+
Enables retrying GitHub and GitLab API requests when Pipelines-as-Code
348+
encounters a temporary provider failure. This includes rate limits, temporary
349+
server errors, and selected network failures.
350+
351+
Retries use backoff with jitter so multiple requests do not all retry at the
352+
same time. When the provider supplies a retry or reset time, Pipelines-as-Code
353+
uses that information as long as it does not exceed
354+
`api-retry-max-wait-seconds`.
355+
356+
The setting is disabled by default. Enabling it affects API operations made
357+
while processing an event, including temporary clients and GitHub App setup.
358+
359+
When disabled, the GitLab client keeps the retry behaviour built into the
360+
upstream GitLab Go client, and the GitHub client performs no retries.
361+
362+
Pipelines-as-Code only repeats an operation when it can do so safely. It does
363+
not repeat provider changes after an uncertain network or server failure when
364+
doing so could create duplicate comments, statuses, or other mutations.
365+
366+
```yaml
367+
enable-api-retry: "false"
368+
```
369+
370+
{{< /param >}}
371+
372+
{{< param name="api-retry-max-attempts" type="integer" default="4" id="param-api-retry-max-attempts" >}}
373+
Sets the maximum number of attempts when `enable-api-retry` is `true`. The
374+
initial request counts as the first attempt. For example, a value of `4`
375+
allows the initial request followed by up to three retries.
376+
377+
```yaml
378+
api-retry-max-attempts: "4"
379+
```
380+
381+
{{< /param >}}
382+
383+
{{< param name="api-retry-max-wait-seconds" type="integer" default="120" id="param-api-retry-max-wait-seconds" >}}
384+
Sets the maximum time in seconds that Pipelines-as-Code waits between
385+
attempts. If a provider asks the client to wait longer than this value,
386+
Pipelines-as-Code stops retrying rather than holding the event for a long
387+
cooling period.
388+
389+
```yaml
390+
api-retry-max-wait-seconds: "120"
391+
```
392+
393+
{{< /param >}}
394+
395+
#### Failure reporting and limitations
396+
397+
If all attempts fail, Pipelines-as-Code reports the original provider error
398+
through its normal logs, events, and provider status handling. Reporting a
399+
failure status to GitHub or GitLab is best effort because a fully exhausted or
400+
unavailable provider API might also reject the status update.
401+
402+
These settings are intended for short, temporary provider failures. They do
403+
not provide persistent queueing for long rate-limit windows and do not control
404+
how quickly a large backlog of PipelineRuns is admitted to the cluster.
405+
Long-duration queueing and workload admission should be handled separately at
406+
the pipeline or platform level.
407+
342408
## Complete Example
343409

344410
```yaml

docs/content/docs/guides/statuses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: PipelineRun status
33
weight: 7
44
---
55

6-
This page describes how Pipelines-as-Code reports PipelineRun status across different Git providers, including log snippets, error annotations, and notification options.
6+
This page describes how Pipelines-as-Code reports PipelineRun statuses across different Git providers, including log snippets, error annotations, and notification options.
77

88
## GitHub Apps
99

go.mod

Lines changed: 47 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,17 @@ go 1.26.5
55
require (
66
codeberg.org/mvdkleijn/forgejo-sdk/forgejo/v3 v3.0.0
77
github.com/AlecAivazis/survey/v2 v2.3.7
8-
github.com/bradleyfalzon/ghinstallation/v2 v2.18.0
8+
github.com/bradleyfalzon/ghinstallation/v2 v2.19.0
99
github.com/chzyer/readline v1.5.1
1010
github.com/cloudevents/sdk-go/v2 v2.16.2
1111
github.com/fvbommel/sortorder v1.1.0
1212
github.com/gobwas/glob v0.2.3
13-
github.com/google/cel-go v0.30.0
13+
github.com/google/cel-go v0.31.0
1414
github.com/google/go-cmp v0.7.0
15-
github.com/google/go-github/scrape v0.0.0-20260420200030-5f0d5d00f436
16-
github.com/google/go-github/v84 v84.0.0
17-
github.com/google/go-github/v85 v85.0.0
15+
github.com/google/go-github/scrape v0.0.0-20260808022349-848675fe0454
1816
github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b
19-
github.com/jenkins-x/go-scm v1.15.32
17+
github.com/hashicorp/go-retryablehttp v0.7.8
18+
github.com/jenkins-x/go-scm v1.15.36
2019
github.com/jonboulle/clockwork v0.5.0
2120
github.com/juju/ansiterm v1.0.0
2221
github.com/ktrysmt/go-bitbucket v0.10.0
@@ -28,18 +27,19 @@ require (
2827
github.com/spf13/cobra v1.10.2
2928
github.com/tektoncd/pipeline v1.15.0
3029
gitlab.com/gitlab-org/api/client-go v1.46.0
31-
go.opentelemetry.io/otel v1.44.0
30+
// otel is pinned via the replace block below, see the comment there.
31+
go.opentelemetry.io/otel v1.45.0
3232
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0
3333
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0
34-
go.opentelemetry.io/otel/metric v1.44.0
35-
go.opentelemetry.io/otel/sdk v1.44.0
34+
go.opentelemetry.io/otel/metric v1.45.0
35+
go.opentelemetry.io/otel/sdk v1.45.0
3636
go.opentelemetry.io/otel/sdk/metric v1.44.0
37-
go.opentelemetry.io/otel/trace v1.44.0
37+
go.opentelemetry.io/otel/trace v1.45.0
3838
go.uber.org/zap v1.28.0
39-
golang.org/x/exp v0.0.0-20260727155853-b88d891fe743
39+
golang.org/x/exp v0.0.0-20260811152304-ee035b5b010f
4040
golang.org/x/oauth2 v0.36.0
4141
golang.org/x/sync v0.22.0
42-
golang.org/x/text v0.40.0
42+
golang.org/x/text v0.41.0
4343
gopkg.in/yaml.v2 v2.4.0
4444
gotest.tools/v3 v3.5.2
4545
k8s.io/api v0.36.3
@@ -51,6 +51,11 @@ require (
5151
sigs.k8s.io/yaml v1.6.0
5252
)
5353

54+
require (
55+
github.com/google/go-github/v88 v88.0.0
56+
github.com/google/go-github/v90 v90.0.0
57+
)
58+
5459
require (
5560
cel.dev/expr v0.25.2 // indirect
5661
github.com/42wim/httpsig v1.2.4 // indirect
@@ -86,13 +91,13 @@ require (
8691
github.com/robfig/cron/v3 v3.0.1 // indirect
8792
github.com/x448/float16 v0.8.4 // indirect
8893
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
89-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0 // indirect
94+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.70.0 // indirect
9095
go.opentelemetry.io/contrib/instrumentation/runtime v0.69.0 // indirect
9196
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.44.0 // indirect
9297
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.44.0 // indirect
9398
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0 // indirect
9499
go.opentelemetry.io/otel/exporters/prometheus v0.66.0 // indirect
95-
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.44.0 // indirect
100+
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.45.0 // indirect
96101
go.opentelemetry.io/proto/otlp v1.11.0 // indirect
97102
go.uber.org/atomic v1.11.0 // indirect
98103
go.yaml.in/yaml/v2 v2.4.4 // indirect
@@ -125,9 +130,8 @@ require (
125130
github.com/google/gnostic-models v0.7.1 // indirect
126131
github.com/google/go-querystring v1.2.0 // indirect
127132
github.com/google/uuid v1.6.0 // indirect
128-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.29.0 // indirect
133+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect
129134
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
130-
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
131135
github.com/hashicorp/go-version v1.9.0 // indirect
132136
github.com/hashicorp/golang-lru v1.0.2 // indirect
133137
github.com/inconshreveable/mousetrap v1.1.0 // indirect
@@ -148,18 +152,41 @@ require (
148152
github.com/xlzd/gotp v0.1.0 // indirect
149153
go.uber.org/automaxprocs v1.6.0 // indirect
150154
go.uber.org/multierr v1.11.0 // indirect
151-
golang.org/x/crypto v0.54.0 // indirect
155+
golang.org/x/crypto v0.55.0 // indirect
152156
golang.org/x/net v0.57.0 // indirect
153157
golang.org/x/sys v0.47.0 // indirect
154158
golang.org/x/term v0.45.0
155159
golang.org/x/time v0.15.0 // indirect
156160
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
157-
google.golang.org/genproto/googleapis/api v0.0.0-20260729162451-8efbd57d26e0
158-
google.golang.org/genproto/googleapis/rpc v0.0.0-20260729162451-8efbd57d26e0 // indirect
161+
google.golang.org/genproto/googleapis/api v0.0.0-20260810153831-ec0a7760b754
162+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260810153831-ec0a7760b754 // indirect
159163
google.golang.org/grpc v1.83.0 // indirect
160-
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af
164+
google.golang.org/protobuf v1.36.12
161165
gopkg.in/inf.v0 v0.9.1 // indirect
162166
k8s.io/apiextensions-apiserver v0.36.3 // indirect
163167
k8s.io/klog/v2 v2.140.0
164168
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
165169
)
170+
171+
// otel modules are pinned to v1.44.0 (and contrib to v0.69.0, the prometheus
172+
// exporter to v0.66.0): knative.dev/pkg observability/semconv is hardcoded to
173+
// semconv 1.41.0 while otel SDK >= 1.45.0 defaults to 1.43.0, making
174+
// resource.Merge fail and knative panic at startup with "conflicting Schema
175+
// URL". Using replace (not just require) so a manual `go get -u` can't
176+
// silently re-bump these. Remove once knative.dev/pkg catches up.
177+
replace (
178+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp => go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.69.0
179+
go.opentelemetry.io/contrib/instrumentation/runtime => go.opentelemetry.io/contrib/instrumentation/runtime v0.69.0
180+
go.opentelemetry.io/otel => go.opentelemetry.io/otel v1.44.0
181+
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc => go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.44.0
182+
go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp => go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.44.0
183+
go.opentelemetry.io/otel/exporters/otlp/otlptrace => go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.44.0
184+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc => go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.44.0
185+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp => go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.44.0
186+
go.opentelemetry.io/otel/exporters/prometheus => go.opentelemetry.io/otel/exporters/prometheus v0.66.0
187+
go.opentelemetry.io/otel/exporters/stdout/stdouttrace => go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.44.0
188+
go.opentelemetry.io/otel/metric => go.opentelemetry.io/otel/metric v1.44.0
189+
go.opentelemetry.io/otel/sdk => go.opentelemetry.io/otel/sdk v1.44.0
190+
go.opentelemetry.io/otel/sdk/metric => go.opentelemetry.io/otel/sdk/metric v1.44.0
191+
go.opentelemetry.io/otel/trace => go.opentelemetry.io/otel/trace v1.44.0
192+
)

0 commit comments

Comments
 (0)