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 CI/CD for StreamingDataFrames #189

Merged
merged 10 commits into from
Oct 5, 2023
Merged

Add CI/CD for StreamingDataFrames #189

merged 10 commits into from
Oct 5, 2023

Conversation

daniil-quix
Copy link
Collaborator

@daniil-quix daniil-quix commented Sep 21, 2023

Main changes

  • Add pre-commit hooks to run black before commit
  • Reformat code with black
  • Add CI pipeline that lints and tests code

Notes

The Runner and Consumer tests needed to be updated.
They were getting stuck in the CI pipeline because Consumer sometimes couldn't close itself, even though it works fine locally.
Apparently, confluent_kafka.Consumer doesn't like being passed around between threads, and we use threads in tests.
When you open Consumer in one thread, do poll() in another thread, and then close it in the first thread, it might get stuck indefinitely.

The fix is to always keep the work with the Consumer instance in the same thread where it's created.

@daniil-quix daniil-quix changed the base branch from main to feature/sdf September 21, 2023 21:48
- Re-write Consumer tests without threading
- In Runner tests, execute Runner code in the same thread
- Add debug logs to tests
Relax the "requests" version
- Keep pytest and black settings in pyproject.toml
- Use pre-commit to run black before committing
Specify "packages" option
Run linters and tests on each commit if there're any
changes to "src/StreamingDataFrames/**"
@tim-quix
Copy link
Contributor

Additions and changes make sense 👍

@daniil-quix daniil-quix merged commit 22523ae into feature/sdf Oct 5, 2023
2 checks passed
@daniil-quix daniil-quix deleted the chore/sdf-ci-cd branch October 5, 2023 12:00
daniil-quix added a commit that referenced this pull request Nov 7, 2023
* Update .gitignore
* Add debug logs to Consumer and Producer
* Add "Runner.stop" to break the internal polling loop
* Update tests to run on Github Runners
* Update requirements
* Add "black" formatter, pyproject.toml and pre-commit
* Update setup.cfg
* Add CI/CD workflow for Streaming Dataframes
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.

None yet

2 participants