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

Improve async event retrieval workflow #647

Merged
merged 28 commits into from Apr 23, 2024

Conversation

cortadocodes
Copy link
Member

@cortadocodes cortadocodes commented Apr 15, 2024

Contents (#647)

IMPORTANT: There are 2 breaking changes.

Enhancements

  • 💥 BREAKING CHANGE: Return question UUID from Child.ask
  • Deserialise manifests from events in get_event
  • Raise error if no events found when calling get_events

Fixes

  • Use correct base image for python3.11 dockerfile
  • Return schema-compliant events and attributes from get_events

Operations

  • Import missing APIs into terraform config
  • Deploy version 0.5.0 of event handler cloud function and update event store schema
  • Update actions/setup-python to version 5

Dependencies

  • 💥 BREAKING CHANGE: Make db-dtypes and google-cloud-bigquery optional
  • Upgrade gunicorn to avoid vulnerability
  • Loosen numpy dependency

Testing

  • Test retrieving results from real asynchronous question
  • Run tests with python3.10 (python3.9 isn't available on macos-latest for arm64)

Other

  • Add DOI badge to readme

Upgrade instructions

💥 Return question UUID from `Child.ask`

Instead of writing answer = Child.ask(...), write answer, question_uuid = Child.ask(...) (and the same for ChildEmulator)

💥 Make `db-dtypes` and `google-cloud-bigquery` optional

To keep using the get_events function, add the bigquery optional extra to your installation command e.g. poetry install -E bigquery.

BREAKING CHANGE: Instead of writing `answer = Child.ask(...)`, write `answer, question_uuid = Child.ask(...)` (and the same for `ChildEmulator`)
@codecov-commenter
Copy link

codecov-commenter commented Apr 17, 2024

Codecov Report

Attention: Patch coverage is 75.75758% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 94.62%. Comparing base (8eb0379) to head (330ea82).
Report is 1 commits behind head on main.

Files Patch % Lines
octue/cloud/pub_sub/bigquery.py 70.83% 7 Missing ⚠️
octue/resources/child.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #647      +/-   ##
==========================================
- Coverage   94.79%   94.62%   -0.18%     
==========================================
  Files          82       82              
  Lines        3535     3552      +17     
==========================================
+ Hits         3351     3361      +10     
- Misses        184      191       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

BREAKING CHANGE: To keep using the `get_events` function, add the `bigquery` optional extra to your installation command e.g. `poetry install -E bigquery`.
@cortadocodes cortadocodes linked an issue Apr 23, 2024 that may be closed by this pull request
@cortadocodes cortadocodes force-pushed the improve-async-retrieved-events branch from 28df049 to 6d04c97 Compare April 23, 2024 10:11
@cortadocodes cortadocodes force-pushed the improve-async-retrieved-events branch from 69bc7a3 to b259028 Compare April 23, 2024 10:36
@cortadocodes cortadocodes merged commit 146d5ba into main Apr 23, 2024
5 checks passed
@cortadocodes cortadocodes deleted the improve-async-retrieved-events branch April 23, 2024 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants