Skip to main content
This lesson explains why the AnalysisRun succeeded even though earlier sessions showed a different health payload. The key point: the AnalysisTemplate evaluates a JSON field inside the health endpoint response (result.code), not the HTTP status code. The AnalysisRun invoked the health check three times and evaluated the success condition against the JSON payload returned by the service. The metric reads show three values (one per probe):
Because the AnalysisTemplate inspects result.code, the content of the JSON body matters. Below are two versions of the health response and the relevant AnalysisTemplate snippet. Frame the successful (green) version JSON — it includes a numeric code field:
Note: The AnalysisTemplate’s success condition checks the JSON payload (for example, result.code). It does not evaluate the HTTP response code returned by the server.
Here is the AnalysisTemplate as shown by kubectl (trimmed to the relevant fields). Notice the web provider URL and the same success condition:
Contrast that with the older (blue) version of the application whose health endpoint returned a simpler payload without a code field:
If the AnalysisRun queries a response that lacks result.code, the metric extraction for result.code will fail and the success condition cannot be satisfied — even if the HTTP status is 200. Ensure the JSON payload contains the field referenced by your success condition.
Summary — why the AnalysisRun passed
  • The AnalysisTemplate success condition is evaluated against the JSON payload returned by the health endpoint (e.g., result.code).
  • The green version includes the code field with a value in the 200–299 range, satisfying the condition.
  • The blue version lacks the code field, so the same AnalysisTemplate would fail when run against it.
Comparison table Links and references

Watch Video