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

feat(apf): add offset to consumer config to modify starting or ending timestamps #291

Merged
merged 7 commits into from
Nov 21, 2023

Conversation

dirodriguezm
Copy link
Contributor

@dirodriguezm dirodriguezm commented Nov 21, 2023


Summary of the changes

Closes #290

Observations

Read #290

Components that need updates and steps to follow

To use this in a step, add the offsets["start"] and optionally offsets["end"] to the consumer config

CONSUMER_CONFIG = {
    "PARAMS": {...},
    "offsets": {
        "start": 10,
        "end": 20
    }
}

The timestamps have to be in milliseconds. So datetime.timestamp() objects have to be multiplied by 1000.

About this PR:

  • You added the necessary documentation for the team to understand your work.
  • You linked this PR to the corresponding issue or user story.
  • Your changes fulfill the Definition of Done of the issue or user story.
  • Your changes were tested with manual testing before being submitted.
  • Your changes were tested with automatic unit tests.
  • Your changes were tested with automatic integration tests.

Screensshots

<-- Add some screenshots if necessary !-->

Copy link

codecov bot commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (83396af) 74.72% compared to head (2dcb6ac) 76.62%.
Report is 29 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #291      +/-   ##
==========================================
+ Coverage   74.72%   76.62%   +1.89%     
==========================================
  Files          20       12       -8     
  Lines         724      308     -416     
==========================================
- Hits          541      236     -305     
+ Misses        183       72     -111     
Flag Coverage Δ
unittest 76.62% <ø> (+1.89%) ⬆️

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.

@dirodriguezm dirodriguezm merged commit 0139ab6 into main Nov 21, 2023
39 of 42 checks passed
@dirodriguezm dirodriguezm deleted the feat/consume-timestamp branch November 21, 2023 20:34
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.

[APF] Add starting and ending timestamps to kafka consumer
3 participants