Skip to content

Feature/add etag validation#63

Merged
dhee-tree merged 3 commits intomainfrom
feature/add-etag-validation
Feb 12, 2026
Merged

Feature/add etag validation#63
dhee-tree merged 3 commits intomainfrom
feature/add-etag-validation

Conversation

@dhee-tree
Copy link
Contributor

@dhee-tree dhee-tree commented Feb 12, 2026

What

Add etag validation to version updates in download tasks

How to review

  • Run branch with migration stack
  • use Zebedee branch in the PR
  • Start a migration job
  • Monitor the docker logs
  • To trigger a conflict
    • Add this delay in L#203 (gives you some time to change the version - fastest fingers first)
      log.Info(ctx, "Edit this dataset version to trigger ETag conflict", log.Data{
      	"task_id":       task.ID,
      	"dataset_id":    task.Target.DatasetID,
      	"edition_id":    task.Target.EditionID,
      	"version_id":    task.Target.VersionID,
      	"fetched_e_tag": respHeaders.ETag,
      	"delay":         "30s",
      })
      time.Sleep(30 * time.Second)
    • Change the version before job does PutVersion. Best way is to send a PUT req to the dataset API to update the version i.e. update version 1
    • PUT req to
     http://localhost:22000/datasets/new-dataset/editions/latestversion/versions/1
    • body
    {
     "edition_title": "Updated Latest version",
     "version": 1,
     "type": "static"
    }
    • Inspect logs for conflict and attempt to resolve
      • If you missed it reset the database with the very handy make reset, start a job and send the PUT again
    • You should get similar log
     {
    "created_at": "2026-02-12T13:49:37.714566931Z",
    "data": {
      "attempt": 1,
      "delay": "92.14648ms",
      "task_id": "3a0841ef-5fd8-4dfa-97e4-c311ff801eff"
    },
    "event": "ETag conflict, retrying after delay",
    "namespace": "dis-migration-service",
    "severity": 3
     }
  • Job state should be in_review

Who can review

!Me

@dhee-tree dhee-tree requested a review from a team as a code owner February 12, 2026 09:22
@dhee-tree dhee-tree force-pushed the feature/add-etag-validation branch from aa75bb0 to f751b93 Compare February 12, 2026 11:27
@dhee-tree dhee-tree merged commit f68f20a into main Feb 12, 2026
17 of 18 checks passed
@dhee-tree dhee-tree deleted the feature/add-etag-validation branch February 12, 2026 15:51
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.

2 participants