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

Add Google leveldb hook (#13109) #14105

Merged
merged 15 commits into from
Mar 1, 2021

Conversation

radim94
Copy link
Contributor

@radim94 radim94 commented Feb 5, 2021

Add LevelDB hook and operator

closes: #13109


^ 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 provider:google Google (including GCP) related issues label Feb 5, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Feb 5, 2021

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, pylint and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@github-actions
Copy link

github-actions bot commented Feb 5, 2021

The Workflow run is cancelling this PR. Building images for the PR has failed. Follow the the workflow link to check the reason.

Copy link
Contributor

@ephraimbuddy ephraimbuddy left a comment

Choose a reason for hiding this comment

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

Can you also add Write Batches, and option to use custom comparator. Custom comparator is particularly important considering that leveldb stores all keys in sorted order

airflow/providers/google/leveldb/hooks/leveldb.py Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Feb 8, 2021

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.

@github-actions
Copy link

github-actions bot commented Feb 8, 2021

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.

INSTALL Outdated Show resolved Hide resolved
airflow/providers/google/leveldb/hooks/leveldb.py Outdated Show resolved Hide resolved
airflow/providers/google/leveldb/hooks/leveldb.py Outdated Show resolved Hide resolved
airflow/providers/google/leveldb/hooks/leveldb.py Outdated Show resolved Hide resolved
airflow/providers/google/leveldb/operators/leveldb.py Outdated Show resolved Hide resolved
airflow/providers/google/leveldb/operators/leveldb.py Outdated Show resolved Hide resolved
@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.

Copy link
Contributor

@RosterIn RosterIn left a comment

Choose a reason for hiding this comment

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

this should make the test green

tests/providers/google/leveldb/hooks/test_leveldb.py Outdated Show resolved Hide resolved
tests/providers/google/leveldb/hooks/test_leveldb.py Outdated Show resolved Hide resolved
@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.

@RosterIn
Copy link
Contributor

I don't really know what is the current problem. the error is:

reading sources... [ 65%] concepts
  Module "airflow.example_dags.example_subdag_operator" could not be loaded. Full source will not be available. "error importing 'airflow.example_dags.example_subdag_operator' (exception was: OperationalError('(sqlite3.OperationalError) no such table: slot_pool',))"
  reading sources... [ 65%] configurations-ref
  
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/sphinx/events.py", line 111, in emit
      results.append(listener.handler(self.app, *args))
    File "/usr/local/lib/python3.6/site-packages/sphinx/ext/viewcode.py", line 155, in env_purge_doc
      for modname, (code, tags, used, refname) in list(modules.items()):
  TypeError: 'bool' object is not iterable
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/sphinx/cmd/build.py", line 280, in build_main
      app.build(args.force_all, filenames)
    File "/usr/local/lib/python3.6/site-packages/sphinx/application.py", line 352, in build
      self.builder.build_update()
    File "/usr/local/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 298, in build_update
      len(to_build))
    File "/usr/local/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 310, in build
      updated_docnames = set(self.read())
    File "/usr/local/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 417, in read
      self._read_serial(docnames)
    File "/usr/local/lib/python3.6/site-packages/sphinx/builders/__init__.py", line 436, in _read_serial
      self.events.emit('env-purge-doc', self.env, docname)
    File "/usr/local/lib/python3.6/site-packages/sphinx/events.py", line 120, in emit
      (listener.handler, name), exc, modname=modname) from exc
  sphinx.errors.ExtensionError: Handler <function env_purge_doc at 0x7fe0ce08eae8> for event 'env-purge-doc' threw an exception (exception: 'bool' object is not iterable)
  
  Extension error (sphinx.ext.viewcode):
  Handler <function env_purge_doc at 0x7fe0ce08eae8> for event 'env-purge-doc' threw an exception (exception: 'bool' object is not iterable)

doesn't really look related to the changes in this PR.

@radim94
Copy link
Contributor Author

radim94 commented Feb 15, 2021

I see comments in slack in documentation channel and try to rebase on latest master

@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.

@radim94 radim94 force-pushed the feature/leveldb-hook branch 3 times, most recently from 013f69d to e787906 Compare February 16, 2021 10:31
@github-actions
Copy link

The Workflow run is cancelling this PR. Building images for the PR has failed. Follow the the workflow link to check the reason.

@radim94 radim94 force-pushed the feature/leveldb-hook branch 3 times, most recently from 5ce78cb to a5272c5 Compare February 21, 2021 09:06
@github-actions
Copy link

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.

@github-actions github-actions bot added the full tests needed We need to run full set of tests for this PR to merge label Feb 28, 2021
@github-actions
Copy link

The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest master at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.

@ephraimbuddy
Copy link
Contributor

Please rebase

@github-actions
Copy link

github-actions bot commented Mar 1, 2021

The Workflow run is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Backport packages$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.

@radim94
Copy link
Contributor Author

radim94 commented Mar 1, 2021

Rebased

@ephraimbuddy
Copy link
Contributor

Please you have a static check error. Notice that the word comparator is not placed correctly in alphabetical order in the spelling wordlist file

@radim94
Copy link
Contributor Author

radim94 commented Mar 1, 2021

fixed place of comparator in spelling wordlist

@ephraimbuddy ephraimbuddy merged commit 35c9a90 into apache:master Mar 1, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Mar 1, 2021

Awesome work, congrats on your first merged pull request!

@dstandish
Copy link
Contributor

dstandish commented May 10, 2021

with this change it seems leveldb is a required system dependency for the google provider.

it doesn't seem right to require users to install leveldb on their machines just to use GCP hooks. anyone have any thoughts on this?

i noticed cus i got a build error when trying to install this provider (in virtualenv on mac) , which installed pyvel which depends on leveldb headers

@mik-laj
Copy link
Member

mik-laj commented May 10, 2021

@dstandish can you create a issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full tests needed We need to run full set of tests for this PR to merge provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add Google leveldb hook
6 participants