Repository navigation
[release-6.7] feat(test): deploy loki operator once per lokistack e2e suite - #3559
Conversation
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>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
/label tide/merge-method-squash |
|
/approve |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@openshift-cherrypick-robot: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
5231950
into
openshift:release-6.7
This is an automated cherry-pick of #3543
/assign jcantrill