Skip to content

fix(ci): backport CI flakiness fixes to stable-8.0 - #13514

Merged
mmattel merged 15 commits into
stable-8.0from
backport/stable-8.0-ci-flakiness-fixes
Nov 18, 2026
Merged

mmattel merged 15 commits into
stable-8.0from
backport/stable-8.0-ci-flakiness-fixes

Conversation

@mmattel

@mmattel mmattel commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Consolidated backport of 9 CI flakiness fix PRs from master to stable-8.0.

Cherry-picked commits:

Conflict resolutions specific to stable-8.0

  • HttpRequestHelper.php: removed $retryOn5xxForK8s && guard (parameter doesn't exist in this branch)
  • SettingsHelper.php: used 3-argument getValuesList() call (no $headers param in this branch)
  • bun.lock: removed via git rm (file doesn't exist in stable branches)
  • compiler.go / compiler_test.go: took incoming dateTimeQuery() and numericQuery() additions
  • expected-failures-localAPI-on-OCIS-storage.md: removed entries fixed by bleve compiler fix; kept getUser.feature:700 (stable-8.0-specific)
  • run-e2e.py / run-github.py: took incoming vault storage, federation, collaboration, tika blocks

Test plan

  • CI passes on this branch against stable-8.0 test suite

🤖 Generated with Claude Code

@kw-security

kw-security commented Nov 18, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mmattel
mmattel enabled auto-merge (squash) November 18, 2026 09:27
deyankiteworks
deyankiteworks previously approved these changes Nov 18, 2026
@mmattel

mmattel commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Note: #13519 (fix(ci): disable async uploads in litmus runner to prevent 425 Too Early) should also be cherry-picked onto this branch once it merges on master. It was discovered via the litmus failure on the stable-9.0 backport (#13517) and affects all stable branches equally.

* fix(tests): retry activity listing step when response is empty

The When step that lists activities for a resource queried the Graph API
in a single shot. Activities are written asynchronously via NATS, so the
event had sometimes not been processed yet when the query arrived. This
caused a spurious minItems assertion failure in apiActivities scenarios.

The step now retries up to ten times with a 500 ms interval whenever the
API returns HTTP 200 with an empty value array, matching the existing
retry pattern used by the share-listing step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>

* fix(tests): avoid JsonException for non-200 responses in activity retry loop

The retry loop called getJsonDecodedResponseBodyContent() unconditionally
before checking the status code. When the activities API returns a non-200
response (e.g. 403 with a non-JSON body), the decode threw a JsonException
causing the When step to fail before the Then status-code assertion could run.

PHP's && short-circuits, so moving the decode into the right-hand side of
the isEmpty condition means it is only called when status is 200.

Fixes shareActivities.feature:1901 (sharee tries to check activities of a
shared folder using file-id).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>

* fix(tests): address review — add [INFO] prefix, remove changelog

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>

---------

Signed-off-by: Martin Mattel <github@diemattels.at>
…se (#13482)

Signed-off-by: Martin Mattel <github@diemattels.at>
…3483)

* fix(tests): retry 5xx responses in Given steps after oCIS restart

After a Background step reconfigures oCIS the server restarts. The
readiness probe passes before the storage layer is fully initialised,
so the first Given step request (e.g. MKCOL) may receive 502 Bad
Gateway and fail spuriously.

The existing 5xx retry in HttpRequestHelper::sendRequest was guarded
behind OcisConfigHelper::isK8s() and therefore did not apply in
Docker/ociswrapper CI environments. Extend it to cover any Given step
that receives a 5xx (except 507 Insufficient Storage) regardless of
deployment type.

Fixes the flaky apiAsyncUpload/delayPostprocessing.feature failure
observed in the natsJwt-events-stores-file suite.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>

* fix(tests): fix phpcs style in HttpRequestHelper multi-line if

The closing parenthesis of the multi-line if condition must be on its
own line per the project's phpcs ruleset.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>

* fix(tests): address review — scope retry, merge blocks, reset sendExceptionHappened

- Remove changelog: tests-only change does not need a release entry
- Merge the separate isGivenStep 5xx block into the existing retryOn5xxForK8s
  block by widening the condition to isK8s() || isGivenStep. This avoids
  double-retrying on K8s and respects the retryOn5xxForK8s opt-out used by
  callers with their own retry loops (e.g. searchWithRetry)
- Limit Given-step retry (non-K8s) to 502/503/504 only. Retrying all 5xx
  would mask real 500s and a POST/PUT that slipped through on 500 would
  produce a 409 on retry that is not retried, failing with the wrong error
- Reset $sendExceptionHappened = false when looping on 5xx so a subsequent
  409 (e.g. user-just-created race after a restart) can still be retried

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>

* fix(tests): split long lines to stay within 120-char limit

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>

---------

Signed-off-by: Martin Mattel <github@diemattels.at>
…omponent (#13486)

* fix(ci): ignore CVE-2026-118664 in Trivy scan (false positive)

decode-uri-component in vendor/github.com/libregraph/lico/identifier/bun.lock
is flagged as 0.5.0 (vulnerable), but that version comes from the bun.lock
"overrides" floor constraint, not the actual resolved package. The packages
section of the same lockfile resolves decode-uri-component to 0.5.1, which
is the fixed version. Trivy misreads the override requirement as the installed
version — this is a false positive.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>

* fix(ci): skip vendored bun.lock in Trivy scan for CVE-2026-118664

lico v0.69.0 vendors decode-uri-component@0.5.0 (CVE-2026-118664, HIGH) in
identifier/bun.lock. This lockfile is never installed or built by ocis — it
is only carried along with lico's Go package. Trivy correctly detects the
vulnerable version; the finding is accepted because the code is not reachable.

Scope the ignore to the file path in .trivy.yaml (vendor/**/bun.lock) rather
than a bare CVE ID in .trivyignore, which would also suppress the CVE if it
appeared in web/pnpm-lock.yaml.

Also reverts the hand-edit from #13380 that bumped decode-uri-component to
0.5.1 in vendor: go mod vendor reverts it to 0.5.0 anyway (as seen in #13479),
so the hand-edit was misleading. Proper fix is bumping the dep in lico upstream.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>

---------

Signed-off-by: Martin Mattel <github@diemattels.at>
…ic (#13493)

Signed-off-by: Martin Mattel <github@diemattels.at>
…r output (#13503)

Go's net/http server logs "TLS handshake error from <addr>: ..." to stderr
whenever a client connects to an HTTPS port but abandons the handshake before
it completes. In acceptance test runs this fires routinely (health-check
probes, Playwright browser init, curl readiness polls) and can produce
hundreds of harmless lines that push real errors far down the CI log.

Five Python test-runner scripts (run-github.py, run-litmus.py, run-cs3api.py,
run-wopi.py) now attach a daemon thread to each long-lived ocis/ociswrapper
subprocess that reads stderr line-by-line, drops any line containing
"TLS handshake error", and forwards everything else unchanged.

The two Bash scripts (ldap-smoke/run.sh, ldap-smoke-distributed/run.sh) use
a process substitution (2> >(grep -v "TLS handshake error" >&2)) for the
same effect without requiring a temporary log file.

The equivalent fix for run-e2e.py is tracked in PR #13498.

Signed-off-by: Martin Mattel <github@diemattels.at>
#13504)

Signed-off-by: Martin Mattel <github@diemattels.at>
…13509)

picomatch 4.0.5 / 4.0.7 land in web/pnpm-lock.yaml as transitive
build-time deps of vite (vite → tinyglobby → fdir → picomatch).
They are never compiled into or shipped with the browser bundle.

CVE-2026-112366 is a DoS triggered by crafted repeated extglob
patterns. Picomatch is only fed patterns from our own trusted vite
config, so the vulnerable code path is unreachable without a prior
full compromise of the repository. No fixed 4.x release exists yet.

Add to .trivyignore until upstream ships a patched version and the
vite dependency chain (fdir / tinyglobby) adopts it.

Signed-off-by: Martin Mattel <github@diemattels.at>
numericQuery() in the bleve compiler references ast.NumericNode which
was not yet present in this branch. Add the type (matching stable-8.1,
stable-8.2, and master) so the package compiles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>
The cherry-pick of #13498 added dateTimeQuery() and numericQuery() as
standalone helpers but left walk() with the old inline DateTimeNode
handling (which lacked = and : operator support) and no NumericNode
case. Update walk() to delegate to these helpers, matching master.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>
…le-8.0

Two issues from the cherry-pick of #13493:
1. waitServiceReady() was called but never defined in this branch
2. The coreServices list used compacted names ("storageusers", "storageshares")
   but stable-8.0's config.go uses hyphenated names ("storage-users",
   "storage-shares"), causing GetServiceDebugPort() to return 0 and
   every readyz poll to time out, breaking all acceptance test suites.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>
The cherry-pick of #13503 added cfg["vaultStorage"] usage but the
merged_config() function on stable-8.0 never defined that key, causing
a KeyError at runtime for every acceptance test suite.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>
@mmattel
mmattel force-pushed the backport/stable-8.0-ci-flakiness-fixes branch from cb12764 to c00469f Compare November 18, 2026 14:02
…bility

The 5xx-retry cherry-pick (#13483) calls OcisConfigHelper::isK8s() in
HttpRequestHelper.php, but stable-8.0 never received the K8s health-check
PR that introduced that method.  Without it every @AfterScenario hook that
references the helper throws a FatalThrowableError, skipping user cleanup
and poisoning the LDAP directory for the next scenario.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>
…ble-8.0

The cherry-picked e2e runner calls search_ready(), tika_warm(),
app_providers_ready() and references collaboration_needed, federated_needed,
mfa_needed, oidc_needed, oidc_iframe_needed, vault_storage_needed, tika_url,
and trusted_certs — none of which were defined in the stable-8.0 version of
the file.  Add all missing helper functions and variable initialisations so
the e2e runner starts without NameError.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Martin Mattel <github@diemattels.at>
@mzner
mzner self-requested a review November 18, 2026 15:41
@mmattel
mmattel merged commit f4d2e96 into stable-8.0 Nov 18, 2026
66 checks passed
@mmattel
mmattel deleted the backport/stable-8.0-ci-flakiness-fixes branch November 18, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants