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

feat: Implement configurable minimum number of readers for popular tables #146

Merged
merged 8 commits into from
Jul 9, 2020

Conversation

jacobhjkim
Copy link
Contributor

@jacobhjkim jacobhjkim commented Jul 5, 2020

Summary of Changes

Related issue: #534

This PR adds POPULAR_TABLE_MINIMUM_READER_COUNT to the config file and num_readers variable for the neo4j popular table query. This allows the minimum number of readers for popular tables to be configurable.

Tests

N/A

Documentation

No documentation changes at this time

CheckList

Make sure you have checked all steps below to ensure a timely review.

  • PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"
  • PR includes a summary of changes.
  • PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
  • PR passes make test

@jacobhjkim jacobhjkim changed the title Implement configurable minimum number of readers for popular tables feat: Implement configurable minimum number of readers for popular tables Jul 5, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jul 5, 2020

Codecov Report

Merging #146 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #146      +/-   ##
==========================================
+ Coverage   72.01%   72.06%   +0.04%     
==========================================
  Files          26       26              
  Lines        1197     1199       +2     
  Branches      121      121              
==========================================
+ Hits          862      864       +2     
  Misses        308      308              
  Partials       27       27              
Impacted Files Coverage Δ
metadata_service/config.py 100.00% <100.00%> (ø)
metadata_service/proxy/neo4j_proxy.py 75.00% <100.00%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f4cb7c...20c52b8. Read the comment docs.

@jornh
Copy link
Contributor

jornh commented Jul 8, 2020

Thanks for picking it up @jacobhjkim LGTM 👍

Need Tao or someone else from Lyft to merge it.

@mgorsk1
Copy link
Contributor

mgorsk1 commented Jul 8, 2020

I am adding FrequentUsers functionality for AtlasProxy (PR 147) now and was thinking on something similar, will wait with my merge until this one is in 🤞

@feng-tao
Copy link
Member

feng-tao commented Jul 9, 2020

sorry for the delay in review, will take a look!

feng-tao
feng-tao previously approved these changes Jul 9, 2020
Copy link
Member

@feng-tao feng-tao left a comment

Choose a reason for hiding this comment

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

lgtm except one 1 nit

metadata_service/config.py Outdated Show resolved Hide resolved
Copy link
Member

@feng-tao feng-tao left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @jacobhjkim !

@feng-tao feng-tao merged commit 19b5c7b into amundsen-io:master Jul 9, 2020
@jacobhjkim jacobhjkim deleted the flexible-popular-tables branch July 9, 2020 04:22
@@ -64,6 +64,9 @@ class Config:
# On User detail method, these keys will be added into amundsen_common.models.user.User.other_key_values
USER_OTHER_KEYS = {'mode_user_id'} # type: Set[str]

# Number of minimum reader count to qualify for popular table
POPULAR_TABLE_MINIMUM_READER_COUNT = 10 # type: int
Copy link
Contributor Author

Choose a reason for hiding this comment

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

POPULAR_TABLE_MINIMUM_READER_COUNT = os.environ.get('POPULAR_TABLE_MINIMUM_READER_COUNT', 10)  # type: int

It should have been this. 🙃

Copy link
Member

@feng-tao feng-tao Jul 9, 2020

Choose a reason for hiding this comment

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

not sure, but we could override it through different config right during the actual deployment? For example, at Lyft we override the config with production configuration with our internal deployment code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, production deployment should have some other config class. False alarm

jerryzhu2007 pushed a commit to kylg/amundsenmetadatalibrary that referenced this pull request Aug 20, 2020
* commit '369685cc715e95af82dfa4dc14d0c58af8bb1ac9':
  chore: replace references to Lyft -> Amundsen (amundsen-io#174)
  feat: Data Owner Implementation of Atlas Proxy (amundsen-io#156)
  chore: fix docker push action (amundsen-io#172)
  chore: add docker publish action and remove travis (amundsen-io#171)
  chore: add pypi publish action (amundsen-io#170)
  fix: removing OidcConfig file and making statsd configurable through envrionment variable (amundsen-io#157)
  ci: add dependabot config (amundsen-io#169)
  Update repo name in travis file (amundsen-io#163)
  feat: Populate is_view property in AtlasProxy (amundsen-io#155)
  fix: Overlapping table name issue in Readers [AtlasProxy]
  feat: Add resource_reports field in Table API ( Atlas proxy) (amundsen-io#149)
  chore: apply license headers to all the source files (amundsen-io#153)
  feat: Add programmatic descriptions parser for [AtlasProxy] (amundsen-io#152)
  feat: Add Frequent Users feature in [AtlasProxy] (amundsen-io#147)
  feat: Implement configurable minimum number of readers for popular tables (amundsen-io#146)
  chore: update the email for the project (amundsen-io#148)

# Conflicts:
#	README.md
#	docs/configurations.md
#	docs/structure.md
#	metadata_service/config.py
#	metadata_service/oidc_config.py
#	metadata_service/proxy/neo4j_proxy.py
#	requirements.txt
#	setup.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants