Skip to content

[release-6.7] feat(test): deploy loki operator once per lokistack e2e suite - #3559

Merged
openshift-merge-bot[bot] merged 5 commits into
openshift:release-6.7from
openshift-cherrypick-robot:cherry-pick-3543-to-release-6.7
Oct 28, 2026
Merged

openshift-merge-bot[bot] merged 5 commits into
openshift:release-6.7from
openshift-cherrypick-robot:cherry-pick-3543-to-release-6.7

Conversation

@openshift-cherrypick-robot

Copy link
Copy Markdown

This is an automated cherry-pick of #3543

/assign jcantrill

jcantrill and others added 5 commits October 28, 2026 13:52
The loki operator is a cluster singleton, but the lokistack e2e specs
redeployed it in BeforeEach, once per spec. Deploy it a single time in
BeforeSuite and tear it down in AfterSuite via a suite-scoped framework,
so the operator install/uninstall no longer repeats for every spec.

Also skip the install when the operator deployment is already available
(pre-installed or left over from a prior run); returning early avoids
registering a cleanup that would delete an operator we did not create.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
DeployLokiOperator previously fell through to the install path whenever
the operator deployment existed but was not yet available, or when the
Get returned any error. That re-posted the OperatorGroup/Subscription and
registered cleanups that would delete an operator this run did not create.

Gate the install on the deployment being confirmed absent (NotFound):
- available -> skip (unchanged)
- exists but not yet available -> wait for availability
- non-NotFound Get error -> return the error

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The first lokistack spec (OTLP, dataModel == Otel) was failing pervasively:
the log generator's application logs were never ingested within the query
timeout while the lokistack gateway's own application logs were, so the
generic application-log readiness check passed on collateral logs and the
container-scoped assertion then timed out.

- Generate at a low, steady rate (add a delay) so a single stream does not
  overrun the lokistack per-stream ingestion rate limit, which is more
  easily tripped by the label-heavy Otel data model.
- Raise the test lokistack global ingestion limits (10 -> 50).
- Add optional label matchers to HasApplicationLogs so callers can scope the
  readiness check to the container under test instead of matching any
  application log (e.g. the lokistack gateway's own logs).
- Gate WaitForLokistackReady on the LokiStack CR Ready condition so it
  returns only once all components (including the ingesters) can ingest.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
waitForLokistackReadyCondition discarded every GET error and polled until
the timeout, so an error like Forbidden only surfaced as a generic wait
timeout. Retry solely on NotFound, which is expected while the LokiStack
is being created, and return any other error immediately.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from jcantrill and vparfonov October 28, 2026 13:54
@jcantrill

Copy link
Copy Markdown
Contributor

/label tide/merge-method-squash

@jcantrill

Copy link
Copy Markdown
Contributor

/approve
/lgtm
/label verified

@openshift-ci openshift-ci Bot added tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. verified Signifies that the PR passed pre-merge verification criteria lgtm Indicates that a PR is ready to be merged. labels Oct 28, 2026
@openshift-ci

openshift-ci Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jcantrill, openshift-cherrypick-robot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 28, 2026
@openshift-ci

openshift-ci Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

@openshift-cherrypick-robot: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 5231950 into openshift:release-6.7 Oct 28, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release/6.7 tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants