Skip to content

Add Kueue workload events#24311

Merged
gjulianm merged 16 commits into
masterfrom
guillermo.julian/workload-events
Jul 7, 2026
Merged

Add Kueue workload events#24311
gjulianm merged 16 commits into
masterfrom
guillermo.julian/workload-events

Conversation

@gjulianm

@gjulianm gjulianm commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds optional Kueue Workload lifecycle event collection for created, quota reserved, admitted, running, evicted, and finished transitions.

Motivation

Surface workload scheduling and eviction changes in Datadog events for operators monitoring Kueue queues.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add qa/required if this PR needs QA validation, or qa/skip-qa if it does not. Exactly one of the two is required.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

@datadog-official

datadog-official Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Tests  Code Coverage

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 80.84%
Overall Coverage: 81.32% (-6.73%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 7768aaf | Docs | Datadog PR Page | Give us feedback!

@gjulianm gjulianm removed the qa/required QA is required for this PR and will generate a QA card label Jul 3, 2026
@gjulianm gjulianm added the qa/skip-qa Automatically skip this PR for the next QA label Jul 3, 2026 — with Graphite App
@gjulianm gjulianm marked this pull request as ready for review July 3, 2026 10:52
@gjulianm gjulianm requested review from a team as code owners July 3, 2026 10:52

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cafad0b4aa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread kueue/datadog_checks/kueue/check.py Outdated
Comment thread kueue/datadog_checks/kueue/check.py Outdated
mbertrone
mbertrone previously approved these changes Jul 3, 2026

@mbertrone mbertrone 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. A few notes inline; the only one worth fixing before merge is the two suppression tests, which currently can't fail.

Comment thread kueue/tests/test_unit.py Outdated
Comment thread kueue/datadog_checks/kueue/check.py Outdated
Comment thread kueue/datadog_checks/kueue/check.py Outdated
Comment thread kueue/datadog_checks/kueue/check.py
@temporal-github-worker-1 temporal-github-worker-1 Bot dismissed mbertrone’s stale review July 3, 2026 12:43

Review from mbertrone is dismissed. Related teams and files:

  • gpu-monitoring-agent
    • kueue/datadog_checks/kueue/check.py
    • kueue/datadog_checks/kueue/kube_client.py
    • kueue/tests/test_unit.py
Comment thread kueue/tests/test_e2e.py

run_command(['kubectl', 'delete', 'job/event-workload', '-n', 'default', '--ignore-not-found'], env=kubectl_env)
check = KueueCheck('kueue', {}, [load_check_instance(kubeconfig_dict)])
check._parse_workload_events_config()

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.

issue (blocking): this call blows up with 'NoneType' object has no attribute 'collect_workload_events' (the failure CI is already reporting for test_e2e_workload_events). The config-model fix from this review round changed _parse_workload_events_config to read self.config.collect_workload_events (check.py:148), but self.config returns self._config_model_instance, which AgentCheck.__init__ initializes to None and only load_configuration_models populates. That initializer is registered in check_initializations and runs inside run(), so on the normal path it fires before _parse_workload_events_config. Here you call _parse_workload_events_config() by hand right after construction, before any initialization has run, so self.config is still None. Production is unaffected; only this manual invocation trips it.

Load the model first:

check = KueueCheck('kueue', {}, [load_check_instance(kubeconfig_dict)])
check.load_configuration_models()
check._parse_workload_events_config()
check.check(check.instance)

@gjulianm gjulianm changed the title Add Kueue workload events Add Kueue workload events and topology metrics Jul 6, 2026
@gjulianm gjulianm removed the qa/skip-qa Automatically skip this PR for the next QA label Jul 6, 2026
@gjulianm gjulianm added the qa/required QA is required for this PR and will generate a QA card label Jul 6, 2026 — with ddtool CLI
@gjulianm gjulianm changed the title Add Kueue workload events and topology metrics Add Kueue workload events Jul 6, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Validation Report

All 21 validations passed.

Show details
Validation Description Status
agent-reqs Verify check versions match the Agent requirements file
ci Validate CI configuration and code coverage settings
codeowners Validate every integration has a CODEOWNERS entry
config Validate default configuration files against spec.yaml
dep Verify dependency pins are consistent and Agent-compatible
http Validate integrations use the HTTP wrapper correctly
imports Validate check imports do not use deprecated modules
integration-style Validate check code style conventions
jmx-metrics Validate JMX metrics definition files and config
labeler Validate PR labeler config matches integration directories
legacy-signature Validate no integration uses the legacy Agent check signature
license-headers Validate Python files have proper license headers
licenses Validate third-party license attribution list
metadata Validate metadata.csv metric definitions
models Validate configuration data models match spec.yaml
openmetrics Validate OpenMetrics integrations disable the metric limit
package Validate Python package metadata and naming
qa-label Validate the pull request declares whether it needs QA for the next Agent release
readmes Validate README files have required sections
saved-views Validate saved view JSON file structure and fields
version Validate version consistency between package and changelog

View full run

@gjulianm gjulianm added this pull request to the merge queue Jul 7, 2026
Merged via the queue into master with commit 9274b10 Jul 7, 2026
65 of 68 checks passed
@gjulianm gjulianm deleted the guillermo.julian/workload-events branch July 7, 2026 15:01
@dd-octo-sts dd-octo-sts Bot added this to the 7.82.0 milestone Jul 7, 2026
github-actions Bot pushed a commit that referenced this pull request Jul 7, 2026
* Add workload events

* Enable Kueue workload events by default

* List Kueue workloads by namespace

* Harden Kueue workload event E2E tests

* Synchronize Kueue config models

* Add Kueue workload events changelog

* Fix instace

* Address Kueue workload event review feedback.

* Fix Kueue workload event config parsing.

* Fix Kueue workload event kubeconfig handling.

* Add Kueue topology domain metrics.

* Update Kueue changelog entry.

* Fix Kueue topology validation warning.

* Revert "Fix Kueue topology validation warning."

This reverts commit db191bd.

* Revert "Update Kueue changelog entry."

This reverts commit af1715c.

* Revert "Add Kueue topology domain metrics."

This reverts commit 449e60a. 9274b10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants