Extractor timing fixes#180
Open
jaimeib wants to merge 4 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #180 +/- ##
=========================================
Coverage ? 58.55%
=========================================
Files ? 25
Lines ? 1402
Branches ? 136
=========================================
Hits ? 821
Misses ? 559
Partials ? 22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
alvarolopez
requested changes
Mar 23, 2026
|
|
||
| from keystoneauth1.exceptions.catalog import EmptyCatalog | ||
| from keystoneauth1.exceptions.http import Forbidden | ||
| from caso import keystone_client, loading |
|
|
||
| def write_lastrun(self, project): | ||
| def write_lastrun(self, project, extract_to): | ||
| """Write a lastrun file for a given project.""" |
Member
There was a problem hiding this comment.
I would document the new behaviour here.
Updated docstring for write_lastrun method to clarify the purpose of the extract_to parameter and its role in the ingestion process.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This pull request updates how the lastrun file is written in the
caso.extract.managermodule, ensuring that the timestamp reflects the end of the extraction window rather than the current time. It also updates related tests.Changes to lastrun file logic:
write_lastrunmethod now takes an additionalextract_toargument and writesextract_to + 1 secondas the lastrun timestamp, instead of the current time, ensuring more accurate tracking of extraction windows.get_recordsmethod is updated to pass theextract_tovalue towrite_lastrun, aligning the lastrun file with the extraction period.Test updates:
test_write_lastrun_dry_runtest is updated to check thatwrite_lastrunis called with both the project and the extraction end time, reflecting the new method signature.