o-nikolas commented on code in PR #73561:
URL: https://github.com/apache/airflow/pull/73561#discussion_r4086371173
##########
airflow-core/src/airflow/api/common/airflow_health.py:
##########
@@ -168,7 +168,12 @@ def _triggerer_detailed_status(jobs: list[Job]) ->
DetailedHealthStatus:
if not expected:
return _liveness_status(jobs)
- return _coverage_status(expected, {job.team_name for job in jobs if
job.is_alive()})
+ covered: set[str | None] = set()
+ for job in jobs:
+ if job.is_alive():
+ # An unscoped triggerer serves exactly the team-less scope, which
``expected`` spells ``None``.
Review Comment:
I don't understand this comment, specifically this part:
> which ``expected`` spells ``None``.
##########
airflow-core/src/airflow/jobs/triggerer_job_runner.py:
##########
@@ -273,7 +273,9 @@ def _execute(self) -> int | None:
capacity=self.capacity,
logger=log,
queues=self.queues,
- team_name=self.job.team_name,
+ # A triggerer is started with at most one ``--team-name``, so
while a Job can serve
+ # several teams this one never does, and the runner stays
scoped to a single team.
+ team_name=next(iter(self.job.team_names), None),
Review Comment:
Might be worth just adding "for now" in there somewhere? There is nothing
stopping us from allowing multiple `--team-name` or for that option to take
multiple values. I could see users pushing for this so that they don't have to
run so many triggerers if they don't care if they execute in the same space
(just like we allow teams to share executors if they wish to).
--
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]