Yassen717 opened a new pull request, #74934:
URL: https://github.com/apache/airflow/pull/74934

   ## What
   
   The `scheduler` section of the Helm chart only permits the probe timing 
parameters and a `command` override for `livenessProbe`/`startupProbe`, and has 
no `readinessProbe` at all. Attempting to set a `readinessProbe`, or a non-exec 
handler such as `tcpSocket`/`httpGet`, fails schema validation:
   
   ```
   - scheduler: Additional property readinessProbe is not allowed
   - scheduler.livenessProbe: Additional property tcpSocket is not allowed
   ```
   
   This change gives the scheduler probes the full Kubernetes probe 
configuration surface, matching what is already possible for other components.
   
   closes: #60134
   
   ## Changes
   
   - `scheduler.livenessProbe` and `scheduler.startupProbe` gained an `enabled` 
flag (default `true`; rendered output is unchanged)
   - New `scheduler.readinessProbe` section, disabled by default since the 
scheduler does not serve traffic
   - All three probes now accept `httpGet`, `tcpSocket` and `grpc` handlers 
(validated against the embedded Kubernetes API types) which replace the default 
`exec` handler when set
   - `successThreshold` and `terminationGracePeriodSeconds` can now be 
configured
   - `command` continues to work as the shorthand for the exec handler, falling 
back to the built-in `airflow jobs check` command
   
   ## Why
   
   In security-restricted clusters `exec` probes are discouraged or not 
permitted, so HTTP/TCP probes can be the only viable health-check mechanism. 
Non-exec probes also avoid spawning a new `airflow` process on every probe run, 
which causes memory spikes (as noted in the discussion on #60321).
   
   ## Testing
   
   Added unit tests in `chart/tests/helm_tests/airflow_core/test_scheduler.py` 
covering:
   
   - `readinessProbe` absent by default, rendered when enabled
   - all three probes can be disabled via `enabled: false`
   - `httpGet`/`tcpSocket`/`grpc` handlers render instead of `exec`
   - timing and threshold fields pass through
   
   Verified locally: `helm template` renders and passes schema validation, and 
the rendered scheduler deployment is identical to `main` under default values 
(apart from the randomly generated `jwt-secret` checksum). All 178 scheduler 
helm tests pass.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Devin following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   ---
   
   * Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)**
 for more information. Note: commit author/co-author name and email in commits 
become permanently public when merged.
   * For fundamental code changes, an Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals))
 is needed.
   * When adding dependency, check compliance with the [ASF 3rd Party License 
Policy](https://www.apache.org/legal/resolved.html#category-x).
   * For significant user-facing changes create newsfragment: 
`{pr_number}.significant.rst`, in 
[airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
 You can add this file in a follow-up commit after the PR is created so you 
know the PR number.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to