Skip to content

revert: Mockserver readiness probe#1012

Merged
azgabur merged 1 commit into
Kuadrant:mainfrom
azgabur:mockserver-ready-fix
Jul 8, 2026
Merged

revert: Mockserver readiness probe#1012
azgabur merged 1 commit into
Kuadrant:mainfrom
azgabur:mockserver-ready-fix

Conversation

@azgabur

@azgabur azgabur commented Jul 3, 2026

Copy link
Copy Markdown
Member

Description

Previous PR #1010 added readiness probe for MockserverBackend but did not set configuration option for enabling it. /mockserver/ready endpoint is only valid in newer versions of mockserver, but we are using older version without this endpoint. This went unnoticed due to test expectation which made every endpoint valid, even /mockserver prefixed ones. Test testsuite/tests/singlecluster/gateway/dnspolicy/health_check/test_additional_headers.py does not use this test expectation so the readiness check never finished.

After careful consideration and checking possibility of using newer Mockserver version 7.4.0 with the endpoint /mockserver/ready the job of readiness check is done by init-mockserver script https://github.com/3scale-qe/mockserver-container/blob/main/init-mockserver . The script wont finish until new expectations are confirmed to be set by API.

The Container's status is not set to RUNNING until the postStart handler completes.
https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/#discussion

Only time the Mockserver behaves strangely with 503 responses is when CPU throttled. PR #1006 fixed that.

Changes

Reverted #1010

Verification

make smoke
make testsuite/tests/singlecluster/gateway/dnspolicy/health_check/test_additional_headers.py

Summary by CodeRabbit

  • Bug Fixes

    • Improved container environment handling so existing settings are preserved and applied together.
    • Simplified service startup checks, avoiding redundant readiness handling during deployment.
  • Chores

    • Updated timeout settings used by the test suite for DNS propagation and readiness-related waits.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a1f6ca3e-9580-4da6-9d00-6a47300f18f2

📥 Commits

Reviewing files that changed from the base of the PR and between b247b08 and d6c3905.

📒 Files selected for processing (2)
  • testsuite/backend/mockserver.py
  • testsuite/utils/constants.py

📝 Walkthrough

Walkthrough

The Mockserver backend now merges its base environment with config.env, no longer sets an inline readiness probe or immediate ready wait in commit, and the shared constants module adds DNS_PROPAGATION_WAIT while removing the Mockserver readiness timing constants.

Changes

Mockserver readiness configuration

Layer / File(s) Summary
Update constants and deployment env
testsuite/utils/constants.py, testsuite/backend/mockserver.py
DNS_PROPAGATION_WAIT is added, the Mockserver readiness timing constants are removed, and MockserverBackend.commit imports the remaining constants while merging env_limit with self.config.env when present.
Remove inline readiness handling
testsuite/backend/mockserver.py
The Deployment creation call no longer includes the readiness probe configuration, and commit no longer waits for readiness immediately after creating the Deployment.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • Kuadrant/testsuite#987: Adds DNS_PROPAGATION_WAIT in the same constants module and uses it in follow-up test timing changes.
  • Kuadrant/testsuite#990: Touches the same Mockserver container environment construction in MockserverBackend.commit().
  • Kuadrant/testsuite#1010: Introduces the Mockserver readiness probe and timing constants that this change removes.

Suggested reviewers: silvi-t

Poem

A bunny hopped through config space,
Merged envs with a tidy grace.
No readiness probe to see,
Just constants set quite happily,
And Mockserver sat in calmer place.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title uses the required conventional commit format and accurately summarises the revert.
Description check ✅ Passed The description includes Description, Changes, and Verification sections and clearly explains the revert and test coverage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@azgabur azgabur force-pushed the mockserver-ready-fix branch from b247b08 to 989d00c Compare July 3, 2026 10:29

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@testsuite/backend/mockserver.py`:
- Line 79: The MockServer readiness probe is using the liveness path, which can
report ready before initialization data is loaded. Update the readiness setup in
mockserver.py so the probe waits on init completion when
MOCKSERVER_INITIALIZATION_JSON_PATH is configured, using /mockserver/ready (or
an equivalent init-aware readiness gate) in the Mockserver fixture/environment
handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d91a0d93-40f5-472c-9ef0-0e3d3d544b28

📥 Commits

Reviewing files that changed from the base of the PR and between 1185d1a and b247b08.

📒 Files selected for processing (1)
  • testsuite/backend/mockserver.py

Comment thread testsuite/backend/mockserver.py Outdated
@azgabur azgabur marked this pull request as draft July 3, 2026 11:36
@azgabur azgabur force-pushed the mockserver-ready-fix branch from 989d00c to 911da5d Compare July 7, 2026 23:16
@azgabur azgabur changed the title fix: Mockserver ready configuration Revert Mockserver readiness probe Jul 7, 2026
…)"

This reverts commit 1185d1a.

Signed-off-by: Alex Zgabur <azgabur@redhat.com>
@azgabur azgabur force-pushed the mockserver-ready-fix branch from 911da5d to d6c3905 Compare July 7, 2026 23:19
@azgabur azgabur changed the title Revert Mockserver readiness probe revert: Mockserver readiness probe Jul 7, 2026
@azgabur azgabur marked this pull request as ready for review July 7, 2026 23:28

@silvi-t silvi-t left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@azgabur azgabur merged commit af96a7a into Kuadrant:main Jul 8, 2026
7 of 8 checks passed
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.

2 participants