**Context**
The goal of these updates are:
- to work with the map of partition://list of excluded offset// and the map of partition://high offset// that `pre-export` determined.
- not to call the export endpoint if pre-export determined the number the unique articles for the project-namespace is 0
- (optionally) fail the DAG if export output (`error`) for any project-namespace is not 0
Read the RfC `RfC Snapshot improvements and validations` and [[ https://phabricator.wikimedia.org/T396586 | this ]] ticket.
**To do**
[] Update export proto request to add 2 arguments (map of partition://list of excluded offset// and map of partition://high offset// )
[] Update dags: add `pre-export` call for each project-namespace before `export` call
[] Update dags : call export with these 2 extra arguments
[] Update dags : avoid calling `export` for project-namespace with 0 unique articles. Instead remove tar.gz and .json from s3 for this project-namespace.
[] Update dags : fail DAG if error is not 0 for export call
[] Update export handler: iff map of partition://high offset// is passed to export, stop reading at those high offsets.
[] Update export handler: iff map of partition://list of excluded offset// is passed to export, do not add these events in tar.gz
[] Test export locally with new arguments
[] Deploy dags and snpashot service to dev. Try running for various project-namespace, including the ones with 0 articles. **Note**: `dags` repo does not have a dev branch. You will have to provide your feature branch to the dev scheduler instance in service config. Avoid merging feature -> main for dags until the prod deployment ticket for snapshots service down in this epic.
**Acceptance criteria**
[] Local testing: export should honour the two new arguments if passed. It should not fail if those are not passed. Verify that there are no duplicates, deleted articles in snapshot.
[] In dev: export should honour the two new arguments if passed. It should not fail if those are not passed. Verify that there are no duplicates, deleted articles in snapshot.
[] In dev: there are no snapshots in s3 with 0 articles (Check RfC for example)
[] In dev: main API should return Not Found when calling /v2/snapshots/<snapshot with 0 article>