Commit Graph
1452 Commits
Author SHA1 Message Date
Myers Carpenter 53d01657c6 Fix OAuth token refresh race condition with singleflight (#6153) 2026-02-24 16:45:50 +01:00
qwerty287 e2d6c712ba Fully merge statuses (#6119) 2026-02-22 11:17:41 +00:00
qwerty287 891d5731d8 Replace old font dependency (#6146) 2026-02-21 14:19:14 +01:00
2012d292be chore(deps): update golangci/golangci-lint docker tag to v2.10.1 (#6138)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2026-02-21 10:42:37 +01:00
renovate[bot]andlnx01 e7a7b1dbdd fix(deps): update module github.com/google/go-github/v82 to v83 (#6140)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-02-21 09:20:41 +01:00
qwerty287 b7c942984a Use tabs for indentation in embedded JSON (#6103) 2026-02-18 13:20:34 +01:00
6543 a63b93f5ee Refactor pipeline engine (#6073)
restructure pipeline/*.go to use submodules

<!-- https://claude.ai/chat/1b8965d7-5bca-42c7-86b4-48c2d645c362 -->

- pipeline/error.go -> pipeline/errors/...
- pipeline/pipeline.go#Runtime -> pipeline/runtime/runtime.go
- pipeline/pipeline.go#execAll -> pipeline/runtime/executor.go
- pipeline/shutdown.go -> pipeline/runtime/shutdown.go
- pipeline/logger.go ->pipeline/logging
- pipeline/tracer.go -> pipeline/tracing
- pipeline/pipeline.go#State -> state/state.go
2026-02-13 11:56:43 +01:00
qwerty287 bb4146da2a Fix BB email (#6102) 2026-02-11 07:42:31 +01:00
6543 7c6d879cc2 server.store: rename GetPipelineLast to GetPipelineLastByBranch (#6071) 2026-02-07 08:58:36 +01:00
5034dd2aba Added cancel info so one can see why it was cancelled (#6072)
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
2026-02-06 17:11:02 +01:00
qwerty287 92a489f538 Refresh token before use for all forges (#6062) 2026-02-06 13:35:38 +01:00
6543 06818ee6ad Don't propagate workflow error from agent back to agent (#6056) 2026-02-06 12:22:32 +01:00
8a8f9ad3aa Fix pipeline cancellation status handling and step state synchronization (#6011)
Co-authored-by: pnkcaht <samzoovsk19@gmail.com>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: Lauris B <lauris@nix.lv>
2026-02-05 21:41:05 +01:00
ArtEngr 1af1ef562c Add retry logic for CreatePipeline with backoff (#6067) 2026-02-05 15:29:52 +01:00
6543 52cb9f6c21 Document required forge methods (#6049) 2026-02-03 17:04:24 +01:00
Kevin Web 894ba77d94 Fix OAuth token refresh in webhook handling for Bitbucket and GitHub (#6059)
## Summary

Fixes #5590
Fixes #5713

This PR fixes an issue where webhook handling fails with "failure to parse hook" error when the user's OAuth access token has expired. The root cause is that the Bitbucket and GitHub forge implementations make API calls during webhook processing without first refreshing the OAuth token.

## Problem

When a webhook arrives from Bitbucket or GitHub, the `Hook()` function (and its helper functions) make API calls to fetch additional data (changed files, repo info, etc.). These API calls use the stored OAuth access token, which may have expired.

**Before this fix:**
1. Webhook arrives
2. `Hook()` makes API calls with potentially expired token
3. API call fails with "OAuth2 access token expired"
4. Error bubbles up as HTTP 400 "failure to parse hook"
5. `forge.Refresh()` is called later in `PostHook()` - but it's too late

**Example error from logs:**

`failure to parse hook error="OAuth2 access token expired. Use your refresh token to obtain a new access token."`


## Solution

Add `forge.Refresh()` calls before making API calls in the webhook handling code paths. This follows the same pattern already used by:
- Bitbucket Data Center forge (`server/forge/bitbucketdatacenter/bitbucketdatacenter.go`)
- Other code paths like `pipeline.Create()`, `cron.go`, etc.

### Changes

**Bitbucket** (`server/forge/bitbucket/bitbucket.go`):
- Added `forge.Refresh()` in `Hook()` before API calls

**GitHub** (`server/forge/github/github.go`):
- Added `forge.Refresh()` in `loadChangedFilesFromPullRequest()`
- Added `forge.Refresh()` in `getTagCommitSHA()`
- Added `forge.Refresh()` in `loadChangedFilesFromCommits()`

## Testing

- All existing Bitbucket and GitHub forge tests pass
- Tested in production environment with Bitbucket (waited for token expiry, webhook succeeded after fix)
2026-02-03 13:34:01 +01:00
57b2449bb1 fix(deps): update golang-packages (#6058)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
2026-02-03 08:26:49 +01:00
e2270ae95c Per-Workflow and Per-Workflow-Step badge generation (#5977)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
2026-02-01 16:44:09 +01:00
6a33483647 fix(deps): update module github.com/google/go-github/v81 to v82 (#6047)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
2026-01-31 08:52:23 +01:00
qwerty287 b52291ef46 Refresh token before forge calls (#6035) 2026-01-31 08:27:27 +01:00
6543 6a76851884 fifo test cleanup changed value (#6031) 2026-01-28 06:46:58 +01:00
6543 4edfefe5d6 Simplify and Fix server task queue (#6017) 2026-01-27 15:27:03 +02:00
6543 3786077c07 Update Architecture: move pipeline/rpc => rpc & server/{grpc => rpc} (#6012) 2026-01-26 21:25:38 +01:00
qwerty287and6543 ff6895308a Support exclusive extensions (#5978)
Co-authored-by: 6543 <6543@obermui.de>
2026-01-26 16:13:00 +01:00
qwerty287 bd8e2f350e Use require to exit tests (#5998) 2026-01-22 09:41:20 +01:00
650833ecb6 Implement retry logic in HTTP Send method (#5857)
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
2026-01-21 18:47:55 +01:00
Anbraten 1d9c8f00bd Use repo-user for api call of cron (#5967) 2026-01-14 11:49:29 +01:00
Anbratenand6543 ecb96f3bc2 Revert "Send configuration as part of the request for external configuration" (#5835)
Co-authored-by: 6543 <6543@obermui.de>
2026-01-14 11:36:44 +01:00
6543 2d92c16f85 Close opened file on LogFind (#5961) 2026-01-12 09:49:51 +02:00
6543 c3d1849673 Delete/Deactivate repo ignores missing repo at forge (#5953) 2026-01-11 13:00:27 +02:00
renovate[bot]andlnx01 8810f9722c fix(deps): update module github.com/google/go-github/v80 to v81 (#5946)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-01-10 14:22:28 +01:00
qwerty287and6543 8db8f49d16 Allow to add a note to secrets (#5898)
Co-authored-by: 6543 <6543@obermui.de>
2026-01-10 13:06:27 +01:00
Anbraten 152b4760dc Correctly update repo permissions (#5928) 2026-01-09 14:53:14 +01:00
qwerty287 2f0684f502 Revert repos pagination for GH and BB (#5924) 2026-01-08 12:32:32 +01:00
qwerty287 2c82972f33 Log addon errors (#5923) 2026-01-08 11:28:58 +02:00
John Olheiser e23829397c fix: send correct argument to rpc call for name/url (#5922)
Signed-off-by: jolheiser <git@jolheiser.com>
2026-01-08 08:00:52 +01:00
qwerty287 00790bfa67 Custom vars for crons (#5897) 2025-12-28 22:15:29 +02:00
qwerty287and6543 8c231aa99d Allow to disable a cron (#5896)
Co-authored-by: 6543 <6543@obermui.de>
2025-12-24 09:02:03 +00:00
qwerty287 87b73060f3 Do not run crons for disabled repos (#5884) 2025-12-20 11:45:30 +01:00
Anbraten cdefb2842c Migrate to maintained tink-go (#5886) 2025-12-20 09:23:09 +01:00
Henrik Huitti 52abd1a3d7 fix(datastore): fix pagination bug in workflowsDelete skipping records (#5881) 2025-12-19 12:21:03 +01:00
qwerty287 80260abdc5 Public key endpoint (#5860) 2025-12-13 10:51:42 +01:00
renovate[bot]andlnx01 9cb353e103 fix(deps): update module github.com/google/go-github/v79 to v80 (#5838)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-06 20:46:28 +01:00
Simon Lipp 9294492977 Send configuration as part of the request for external configuration (#5831) 2025-12-06 09:34:29 +01:00
Henrik Huitti b8efdfafa4 fix(queue): force agent cancellation on lease expiration (#5823) 2025-12-06 09:18:58 +01:00
6543 761cc67f11 server/forge: rename var to be more descriptive and test value (#5806) 2025-12-02 13:40:08 +01:00
Henrik Huitti 87ec6ceccb fix: updateRepoPermissions to cleanup old permissions (#5790) 2025-11-29 17:19:55 +01:00
18ff3b7597 fix(deps): update module gitlab.com/gitlab-org/api/client-go to v1 (#5794)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: qwerty287 <qwerty287@posteo.de>
Co-authored-by: qwerty287 <80460567+qwerty287@users.noreply.github.com>
2025-11-29 09:54:07 +01:00
tuxmainyanddamage 5a93de88dd add events query parameter to badge url (#5728)
Co-authored-by: damage <damage@devloop.de>
2025-11-27 12:35:29 +02:00
Erik Mogensen 88020fe1ca fix(bitbucketdatacenter): fix CI_COMMIT_PULL_REQUEST (#5769) 2025-11-27 09:49:11 +01:00