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 typed Pydantic classes instead of CloudEvents for messages between ert components #8423

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

JHolba
Copy link
Contributor

@JHolba JHolba commented Aug 8, 2024

Issue
Resolves #8386

Approach
Replace cloudevents with json

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure tests pass locally (after every commit!)

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@JHolba JHolba self-assigned this Aug 8, 2024
@JHolba JHolba force-pushed the remove-cloud-events branch 6 times, most recently from 7afd26e to 8f47cbd Compare August 12, 2024 08:38
@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2024

Codecov Report

Attention: Patch coverage is 92.72727% with 12 lines in your changes missing coverage. Please review.

Project coverage is 90.81%. Comparing base (c158c6a) to head (593b9c1).

Files with missing lines Patch % Lines
src/ert/ensemble_evaluator/evaluator.py 91.48% 4 Missing ⚠️
src/ert/ensemble_evaluator/snapshot.py 94.73% 2 Missing ⚠️
src/ert/gui/model/snapshot.py 88.88% 2 Missing ⚠️
src/ert/run_models/base_run_model.py 85.71% 2 Missing ⚠️
src/ert/scheduler/job.py 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8423      +/-   ##
==========================================
+ Coverage   90.79%   90.81%   +0.02%     
==========================================
  Files         342      339       -3     
  Lines       20945    20844     -101     
==========================================
- Hits        19016    18930      -86     
+ Misses       1929     1914      -15     
Flag Coverage Δ
gui-tests 75.71% <85.45%> (-0.08%) ⬇️
integration-tests 53.79% <81.21%> (-0.20%) ⬇️
unit-tests 68.71% <90.90%> (-0.08%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@JHolba JHolba force-pushed the remove-cloud-events branch 7 times, most recently from 080d7d4 to ce961d7 Compare August 20, 2024 12:17
@JHolba JHolba added the release-notes:improvement Automatically categorise as improvement in release notes label Aug 20, 2024
@JHolba JHolba changed the title Remove cloud events Replace CloudEvents with Pydantic Aug 20, 2024
@JHolba JHolba force-pushed the remove-cloud-events branch 9 times, most recently from 1a67cc0 to 5654bd0 Compare August 22, 2024 07:18
@JHolba JHolba marked this pull request as ready for review August 22, 2024 07:26
@JHolba JHolba force-pushed the remove-cloud-events branch 2 times, most recently from cc46c22 to 1222fbc Compare August 23, 2024 07:40
@JHolba JHolba force-pushed the remove-cloud-events branch 3 times, most recently from e034eae to 442eaf0 Compare August 23, 2024 10:10
src/_ert/events.py Outdated Show resolved Hide resolved
src/_ert/events.py Outdated Show resolved Hide resolved
Copy link
Contributor

@jonathan-eq jonathan-eq left a comment

Choose a reason for hiding this comment

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

Very good improvement!

src/_ert/events.py Outdated Show resolved Hide resolved
src/_ert/events.py Outdated Show resolved Hide resolved
src/_ert/events.py Show resolved Hide resolved
src/_ert/events.py Show resolved Hide resolved
src/_ert/events.py Show resolved Hide resolved
src/ert/ensemble_evaluator/_ensemble.py Outdated Show resolved Hide resolved
src/_ert/events.py Show resolved Hide resolved
@JHolba JHolba changed the title Replace CloudEvents with Pydantic Use typed Pydantic classes instead of CloudEvents for messages between ert components Aug 30, 2024
This replaces the cloudevents library we used before.
This was done both because cloudevents does not give any benefit to us
and because the python cloudevents library is quite slow.
Copy link
Contributor

@xjules xjules left a comment

Choose a reason for hiding this comment

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

Amazing job @JHolba ! 🥇 🚀

@JHolba JHolba dismissed jonathan-eq’s stale review August 30, 2024 13:56

Resolved all comments from the review

@JHolba JHolba merged commit 26b93a2 into equinor:main Aug 30, 2024
35 checks passed
@JHolba JHolba deleted the remove-cloud-events branch August 30, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:improvement Automatically categorise as improvement in release notes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Replace cloudevents with pydantic
5 participants