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

Use single topic per workspace #639

Conversation

cortadocodes
Copy link
Member

@cortadocodes cortadocodes commented Mar 22, 2024

Contents (#639)

IMPORTANT: There are 4 breaking changes.

New features

  • 💥 BREAKING CHANGE: Publish events and subscribe to them with a single octue.services topic per workspace

Enhancements

  • 💥 BREAKING CHANGE: Add mandatory originator, sender, recipient, and UUID event attributes
  • Make Topic's representation consistent with Subscription's
  • Add string representation to MockMessageWrapper

Fixes

  • Only update earliest waiting event number in event handler if there are waiting messages
  • Fix race condition in event emission order by factoring order out of Topic and into new EventCounter class
  • Avoid silently failing if question_uuid attribute missing

Operations

  • Add octue.services topic to terraform config
  • Update bigquery table and event handler cloud function

Refactoring

  • 💥 BREAKING CHANGE: Rename message_number to order
  • 💥 BREAKING CHANGE: Rename version attribute to sender_sdk_version
  • Rename receiving_service to recipient
  • Rename Service._send_message to Service._emit_event

Testing

  • Test get_sruid_from_pub_sub_resource_name
  • Simplify GoogleCloudPubSubHandler tests
  • Simplify pub/sub event handler tests
  • Factor out service patching to start of test classes

Upgrade instructions

Update all services in your services network to use this version of octue or later (0.53.0+).

@cortadocodes cortadocodes linked an issue Mar 27, 2024 that may be closed by this pull request
11 tasks
@cortadocodes cortadocodes self-assigned this Apr 8, 2024
octue/__init__.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

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

Project coverage is 94.61%. Comparing base (811cc94) to head (426e765).

Files Patch % Lines
octue/cloud/emulators/_pub_sub.py 84.61% 2 Missing ⚠️
octue/cloud/events/counter.py 83.33% 2 Missing ⚠️
octue/cloud/pub_sub/service.py 93.33% 2 Missing ⚠️
...cloud/deployment/google/answer_pub_sub_question.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@                            Coverage Diff                            @@
##           better-support-asynchronous-questions     #639      +/-   ##
=========================================================================
- Coverage                                  94.76%   94.61%   -0.15%     
=========================================================================
  Files                                         80       81       +1     
  Lines                                       3514     3530      +16     
=========================================================================
+ Hits                                        3330     3340      +10     
- Misses                                       184      190       +6     

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

@cortadocodes cortadocodes merged commit bc4224c into better-support-asynchronous-questions Apr 9, 2024
5 checks passed
@cortadocodes cortadocodes deleted the use-single-topic-per-workspace branch April 9, 2024 16:05
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.

Switch to single-topic-per-workspace services
3 participants