Skip to content

Smart Sensors - Inconsistent Logging #14859

@anthonyp97

Description

@anthonyp97

Apache Airflow version: 2.0.1

Kubernetes version (if you are using kubernetes) (use kubectl version): N/A

Environment:

  • Cloud provider or hardware configuration: AWS
  • OS (e.g. from /etc/os-release): Ubuntu 18.04.2 LTS
  • Kernel (e.g. uname -a): GNU/Linux 4.15.0-1043-aws x86_64
  • Others: LocalExecutor with a PARALLELISM of 32, smart sensors enabled using 2 shards.

What happened:

The logs for the 2 smart sensor tasks that we run always show: [2021-03-16 21:07:45,415] {smart_sensor.py:373} INFO - Loaded 0 sensor_works. However, I can confirm that our FTP sensors are getting registered properly in the smart sensors in the FTP sensor logs. Strangely, the logs for a certain FTP sensor will occasionally show {smart_sensor.py:373} INFO - 4 tasks detected. and then the poke information for these 4 sensors appear in this FTP sensor's log, so it looks like the logs are going to the wrong location.

What you expected to happen:

The logs in the smart sensor tasks themselves should show the number of sensor_works loaded in each smart sensor shard (it should not always be 0), and this information should not be in a random FTP sensor's logs. Also the logs for a specific FTP sensor should not include logs from different sensors.

How to reproduce it:

Run a LocalExecutor with several sensors running in parallel, and 2+ shards enabled for the smart sensors. The logs in smart_sensor_group_shard_0, smart_sensor_group_shard_1 etc. should always show Loaded 0 sensor_works when that is not what is expected. You may be able to find the sensor_works loaded information in the logs of one of the sensors in your DAG.

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected_version:2.0Issues Reported for 2.0area:corearea:loggingkind:bugThis is a clearly a bugpending-responsepriority:mediumBug that should be fixed before next release but would not block a releasestaleStale PRs per the .github/workflows/stale.yml policy file

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions