Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make OPENLINEAGE_DISABLED case insensitive #1705

Conversation

jedcunningham
Copy link
Contributor

Problem

It can be surprising that OPENLINEAGE_DISABLED is case sensitive.

Closes: #1704

Solution

In the python client and Airflow plugin, check OPENLINEAGE_DISABLED in a case insensitive way.

Checklist

  • You've signed-off your work
  • Your pull request title follows our guidelines
  • Your changes are accompanied by tests (if relevant)
  • Your change contains a small diff and is self-contained
  • You've updated any relevant documentation (if relevant)
  • Your comment includes a one-liner for the changelog about the specific purpose of the change (if necessary)
  • You've versioned the core OpenLineage model or facets according to SchemaVer (if relevant)
  • You've added a header to source files (if relevant)

SPDX-License-Identifier: Apache-2.0
Copyright 2018-2023 contributors to the OpenLineage project

In the python client and Airflow plugin, check OPENLINEAGE_DISABLED in a
case insensitive way.

Signed-off-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
Comment on lines +101 to +106
("true", True),
("True", True),
("TRUE", True),
("false", False),
("False", False),
("FALSE", False),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is going to come from an environment variable, does that imply it's always a string? Or can these vars also come in as a True or False boolean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, meant to comment on that. Yes, getenv always returns a string.

@codecov-commenter
Copy link

codecov-commenter commented Mar 8, 2023

Codecov Report

Merging #1705 (4bc478c) into main (8f38c4c) will increase coverage by 2.00%.
The diff coverage is 66.66%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main    #1705      +/-   ##
============================================
+ Coverage     83.34%   85.35%   +2.00%     
============================================
  Files            89       69      -20     
  Lines          4006     3668     -338     
  Branches         29        0      -29     
============================================
- Hits           3339     3131     -208     
+ Misses          635      537      -98     
+ Partials         32        0      -32     
Impacted Files Coverage Δ
...on/airflow/openlineage/lineage_backend/__init__.py 0.00% <0.00%> (ø)
...ent/python/openlineage/client/transport/factory.py 83.90% <100.00%> (+5.74%) ⬆️
integration/airflow/openlineage/airflow/plugin.py 100.00% <100.00%> (ø)
...a/src/main/java/io/openlineage/client/Clients.java
.../openlineage/client/transports/KafkaTransport.java
...o/openlineage/client/transports/ConsoleConfig.java
...c/main/java/io/openlineage/client/Environment.java
.../io/openlineage/client/OpenLineageClientUtils.java
.../io/openlineage/client/transports/KafkaConfig.java
...va/io/openlineage/client/transports/Transport.java
... and 15 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mobuchowski mobuchowski merged commit 4b27439 into OpenLineage:main Mar 8, 2023
2 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Mar 8, 2023

Great job! Congrats on your first merged pull request in OpenLineage!

@jedcunningham jedcunningham deleted the bug/case_insensitive_python_disable branch March 23, 2023 20:27
harels pushed a commit to harels/OpenLineage that referenced this pull request May 11, 2023
In the python client and Airflow plugin, check OPENLINEAGE_DISABLED in a
case insensitive way.

Signed-off-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
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.

Remove OPENLINEAGE_DISABLED case sensitivity
4 participants