Feat: add jobset_healthiness_validation DAG - #256
Conversation
| jobset_start_time: XComArg | ||
|
|
||
|
|
||
| class ReplicatedJobStatus(enum.Enum): |
There was a problem hiding this comment.
can we define it as jobset healthiness, and its value can be the metric name directly
explain "healthiness" detail (by "replica" metrics) only in the doc string
| This DAG automates the process of creating node-pools, ensuring the | ||
| correct number of "Suspended" replicas appear, then launching a jobset on | ||
| multiple replicas to ensure the correct number begin running. |
There was a problem hiding this comment.
please name the metics to be examined here in this section
| First a node-pool is created. The validation test is then run to | ||
| check if the number of "Suspended" replicas is 0. Once the jobset is | ||
| running the jobs should quickly enter the "Ready" state. Then using | ||
| command to suspend entire jobset. The number of found replicas is | ||
| tested against the number of replicas which should be "Suspended". | ||
| If they match the DAG is a success. |
There was a problem hiding this comment.
and please document "how to go through those metrics" here
(not steps, only the concept)
badfd13 to
721afcd
Compare
8eb5556 to
acf36a1
Compare
|
let's resolve conflict |
916a162 to
1692422
Compare
| final_expected = jobset_config.replicas | ||
|
|
||
| metric_mapping = { | ||
| "ready": "prometheus.googleapis.com/kube_jobset_ready_replicas/gauge", |
There was a problem hiding this comment.
define the enum READY = "prometheus.googleapis.com/kube_jobset_ready_replicas/gauge", or have a method under JobSetHealthiness to return the metric name
| @task.sensor(poke_interval=60, timeout=3600, mode="poke") | ||
| def wait_for_jobset_metrics( | ||
| metric_name: JobSetHealthiness, | ||
| expected_value: any, |
There was a problem hiding this comment.
few things related to this one
expected_value: int(for float)- take a look at fix: Separate config construction from Airflow task execution #259, basically the jobset config can be settled in parsing phase and we can do something like this
jobset_config = jobset.build_jobset_from_gcs_yaml(...) wait_for_jobset_metrics(..., expected_value=jobset_config.replicas, ...) - this repo (our fork) has the "GCS_SECRET" set, all you need to do is rebase onto Kim's PR/branch to make it work
There was a problem hiding this comment.
that part has merged and dev has been updated, so you can simply rebase FYI
There was a problem hiding this comment.
Fixed. Thanks for reminding.
6feaf0b to
5072531
Compare
5072531 to
2ff5a17
Compare
f996781 to
d3601a9
Compare
af68025 to
3bd44a5
Compare
870840a to
9846760
Compare
5d07788 to
fd20cf7
Compare
During GitHub Actions (CI) pipeline execution, native Airflow methods and cloud-dependent functions cause blocking errors due to the lack of an active database connection or cloud permissions.
fd20cf7 to
c5f8abf
Compare
d242c8d to
f76e189
Compare
a577785 to
71b8d8a
Compare
b588728 to
0e938b1
Compare
54f9a78 to
8e4ea82
Compare
Description
The primary goal of this PR is to implement the
jobset_healthiness_validationDAG. This test provides end-to-end validation of the JobSet operator's monitoring metrics, ensuring that Ready, Active, Suspended, Succeeded, Specified, and Failed statuses are correctly reported in Cloud Monitoring.Technical Implementation
Lifecycle State Machine Validation:
Startup: Validates
Ready,Active, andSpecifiedcounts match the initial configuration.Maintenance: Uses
kubectl patchto suspend and resume the JobSet, validating theSuspendedmetric.Fault Injection: Injects a failure using a Python script with
sys.exit(1)to validate theFailedmetric.Success Validation: Deploys a successful workload to validate the
Succeededmetric.Immutability Handling: Addresses Kubernetes JobSet immutability by implementing a "Delete-and-Recreate" pattern within the
failure_testandsuccess_testTaskGroups to allow specification updatesAirflow/Composer
Required Variables
Cluster Information (This DAG requires an existing cluster)
Node Pool Configurations
Before submitting this PR, please make sure (put X in square brackets):