Skip to content

fix helm scheduler deployment / scheduler logs#11685

Merged
potiuk merged 1 commit intoapache:masterfrom
MeilleursAgents:fix-helm-scheduler-logs
Oct 31, 2020
Merged

fix helm scheduler deployment / scheduler logs#11685
potiuk merged 1 commit intoapache:masterfrom
MeilleursAgents:fix-helm-scheduler-logs

Conversation

@FloChehab
Copy link
Copy Markdown
Contributor

Hello again,
Another very small fix to make the latest chart work.

Based on the airflow image entrypoint, we should use airflow commands directly (just like for everywhere else in the current chart).
The container exists otherwise.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@boring-cyborg boring-cyborg bot added the area:helm-chart Airflow Helm Chart label Oct 20, 2020
@potiuk
Copy link
Copy Markdown
Member

potiuk commented Oct 26, 2020

Ah I only now got to it - would you mind rebasiing please @FloChehab ?

@FloChehab
Copy link
Copy Markdown
Contributor Author

Ah I only now got to it - would you mind rebasiing please @FloChehab ?

Sure.

@FloChehab FloChehab force-pushed the fix-helm-scheduler-logs branch from 43d7bae to 3f85d52 Compare October 26, 2020 14:26
@FloChehab
Copy link
Copy Markdown
Contributor Author

It's rebased.

@mik-laj
Copy link
Copy Markdown
Member

mik-laj commented Oct 30, 2020

Hello.

We have a new test framework for Helm Chart. Can you add unit tests?

Best regards,
Kamil Breguła

Based on the airflow image entrypoint, we should use airflow commands directly.
The container exits otherwise.
@FloChehab FloChehab force-pushed the fix-helm-scheduler-logs branch from 3f85d52 to 459564c Compare October 30, 2020 20:03
@FloChehab
Copy link
Copy Markdown
Contributor Author

FloChehab commented Oct 30, 2020

Hi there,

I've added a test (and rebased) to make sure this doesn't ever happen again ; hope it doesn't feel too much overkill haha.

PS: I just had issues with pylint thinking I was doing something illegal, but I don't think so.

Anyway, the new testing framework is pretty nice !

@mik-laj
Copy link
Copy Markdown
Member

mik-laj commented Oct 31, 2020

It seems to me that this sidecar is not needed at all. The serve_logs command is only used by Celery Workers and was deleted in Airflow 2.0. Now, we always serve logs when worker is started.

@potiuk
Copy link
Copy Markdown
Member

potiuk commented Oct 31, 2020

The Helm Chart is supposed to also work for 1.10, so I think it is still needed.

@potiuk potiuk merged commit 069b1f7 into apache:master Oct 31, 2020
@potiuk
Copy link
Copy Markdown
Member

potiuk commented Oct 31, 2020

BTW. @mik-laj -> we cannot forget that even after 2.0 is released we have at least 6 months of supporting the 1.10 users. Let's not forget about this.

@mik-laj
Copy link
Copy Markdown
Member

mik-laj commented Oct 31, 2020

This command is not used to provide logs from the scheduler - only for task instance logs i.e. worker logs. This PR is not correct because we shouldn't run this process in scheduler at all.

@potiuk
Copy link
Copy Markdown
Member

potiuk commented Oct 31, 2020

This command is not used to provide logs from the scheduler - only for task instance logs i.e. worker logs. This PR is not correct because we shouldn't run this process in scheduler at all.

That's entirely different problem, not related to the 2.0 removal of the "serve_logs" command then.
@FloChehab - would you like to fix it please ?

@mik-laj
Copy link
Copy Markdown
Member

mik-laj commented Oct 31, 2020

I agree and I'm talking about it. In Airflow 2.0, this command does not exist. In Airflow 1.10 and Airflow 2.0 it is not needed at all, because we run these commands automatically.

See:
https://github.com/apache/airflow/blob/1.10.12/airflow/bin/cli.py#L1318

@FloChehab FloChehab deleted the fix-helm-scheduler-logs branch October 31, 2020 20:36
@mik-laj
Copy link
Copy Markdown
Member

mik-laj commented Oct 31, 2020

I took a closer look at it and this change actually makes sense. This sidecar is only run when Sequence or LocalExecutor is used. Then the scheduler is also a worker, so running the serve_logs command allows us to access the logs from scheduler.

szn pushed a commit to szn/airflow that referenced this pull request Nov 1, 2020
Based on the airflow image entrypoint, we should use airflow commands directly.
The container exits otherwise.
potiuk pushed a commit that referenced this pull request Nov 15, 2020
Based on the airflow image entrypoint, we should use airflow commands directly.
The container exits otherwise.

(cherry picked from commit 069b1f7)
@potiuk potiuk added the type:bug-fix Changelog: Bug Fixes label Nov 15, 2020
@potiuk potiuk added this to the Airflow 1.10.13 milestone Nov 15, 2020
potiuk pushed a commit that referenced this pull request Nov 16, 2020
Based on the airflow image entrypoint, we should use airflow commands directly.
The container exits otherwise.

(cherry picked from commit 069b1f7)
potiuk pushed a commit that referenced this pull request Nov 16, 2020
Based on the airflow image entrypoint, we should use airflow commands directly.
The container exits otherwise.

(cherry picked from commit 069b1f7)
kaxil pushed a commit that referenced this pull request Nov 18, 2020
Based on the airflow image entrypoint, we should use airflow commands directly.
The container exits otherwise.

(cherry picked from commit 069b1f7)
cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Mar 5, 2021
Based on the airflow image entrypoint, we should use airflow commands directly.
The container exits otherwise.

(cherry picked from commit 069b1f7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:helm-chart Airflow Helm Chart type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants