trufnetwork / trufnetwork/adapters
Bug: Argentina preprocess doesn´t skip based on variable
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 3
- Avg merge
- 2h 9m
- Merged PRs (30d)
- 1
Description
Problem
preprocess_flow.py processes ALL available dates instead of respecting LAST_PREPROCESS_SUCCESS_DATE like other Argentina flows do.
Current behavior (line 188-194):
for date in self.raw_provider.list_available_keys():
if self.processed_provider.exists(date):
continue
await self.process_date(date)
Expected behavior: Filter dates by LAST_PREPROCESS_SUCCESS_DATE first, then check if already processed.
Solution
Add date filtering before the loop:
last_preprocess_date = await variables.Variable.aget(
ArgentinaFlowVariableNames.LAST_PREPROCESS_SUCCESS_DATE,
default=ArgentinaFlowVariableNames.DEFAULT_DATE
)
dates_to_process = [d for d in self.raw_provider.list_available_keys() if d > last_preprocess_date]
This matches the pattern already used in aggregate_products_flow.py and insert_products_flow.py.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open preprocess_flow.py and inspect the loop around lines 188-194. Compare the date-selection pattern in aggregate_products_flow.py and insert_products_flow.py, then verify that dates after LAST_PREPROCESS_SUCCESS_DATE are considered while already processed dates remain skipped.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-engineering
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100