thoth-station / document-sync-job

Sync Thoth documents to an S3 API compatible remote
GNU General Public License v3.0
0 stars 5 forks source link

Sync does not respect days in solver results #20

Closed fridex closed 2 years ago

fridex commented 2 years ago

Bug description

When the job is requested to sync only X old days documents, solver documents are not synced. The problem is in the document listing method:

https://github.com/thoth-station/storages/blob/2d47f7ca37912716939459798c1355ed145e55a9/thoth/storages/result_base.py#L124

The issue here is that solver documents (unlike other documents) encode solver type in the name which is not supplied to the document listing. This leads to requesting documents prefixed with solver-<date> (instead of solver-ubi-8-py38-<date>-). This way, the query never returns any solver documents.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Configure the job to query only documents that are 100 days old
  2. See no solver documents are returned

Expected behavior

The document-sync-job should sync configured solvers (based on solvers configmap), respecting start_date supplied.