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

Update package build (and other minor bugs) #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kayelow
Copy link

@kayelow kayelow commented Jul 22, 2020

Description of change

Fixes #4 -- updating the package build to include the metadata files.

I included a few small fixes for bugs I ran into trying to get the PyPI package to run so it should run with normal use, including fixing runs using the catalog generated by discovery mode. It looks like the metadata naming convention was changed previously, so to get it working without these changes I had to manually update the metadata references in the generated catalog to use currency instead of tap-criteo.currency. The catalog itself also wasn't referenced correctly when it was provided as an argument, and it was saving the bookmark in state.json with an incorrect format that made subsequent runs after the first fail.

Manual QA steps

  • Run python3 setup.py sdist bdist_wheel and ensure build/lib/tap_criteo/metadata exists.
  • Run discovery python3 -m tap_criteo.__init__ -c ../criteo_config.json --discover > catalog.json
  • Run python3 -m tap_criteo.__init__ -c ../criteo_config.json --catalog ../catalog.json --state ../state.json | ../virtualenv/target-csv/bin/target-csv and ensure output contains fields as expected.

Risks

  • Can't fully test the built distribution

Rollback steps

  • Revert this branch

Code path for when an argument for the  catalog is provided doesn't reference the provided catalog. Fixes -- `UnboundLocalError: local variable 'catalog' referenced before assignment`
Issue singer-io#4 - Crash in discovery mode occurs because the PyPi package doesn't contain the metadata path.
Singer utils provide a string from time function that uses DATETIME_FMT_SAFE to prevent 4Y being passed back as the year.
When the catalog is generated in discovery mode, the metadata field that is produced is `tap-criteo.currency`, but when retrieving the metadata, it is looking for `currency`.
@cmerrick
Copy link
Contributor

Hi @kayelow, thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes.

@cmerrick
Copy link
Contributor

You did it @kayelow!

Thank you for signing the Singer Contribution License Agreement.

@kayelow kayelow changed the title Update build and other bugs Update package build (and other minor bugs) Jul 22, 2020
@kayelow
Copy link
Author

kayelow commented Jul 22, 2020

@cmerrick Hi! I signed the CLA, and it looks like it was received, but let me know if there's anything else you need from me or any feedback you have.

@indyMccarthy
Copy link

Hello all !
Is there any reason that this PR is still pending ? More globally, the question arises for the entire repository's maintenance (not used, workaround, known OS alternatives ?)
Thanks 🙏

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.

Crash in discovery mode
4 participants