RFR: 2400: Avoid overwriting mbox archive

Zhao Song zsong at openjdk.org
Mon Nov 18 22:02:57 UTC 2024


Sometimes, the ArchiveWorkItem fails to retrieve the current contents of an mbox file while processing a PR. When this happens, it will resend all emails. Erik pointed out that in GitLab, creating a new file uses a POST request, while updating an existing file uses PUT. Similarly, GitHub requires the current "SHA" to update a file.

The ArchiveWorkItem can determine whether it found existing content in the mbox archive and choose the right method accordingly. If it incorrectly fails to retrieve the existing content from GitLab or GitHub, it will attempt to create a new file. This attempt should fail, triggering a retry of the WorkItem, which would ideally succeed in retrieving the existing content.

-------------

Commit messages:
 - update
 - fix typo
 - 2400

Changes: https://git.openjdk.org/skara/pull/1696/files
  Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1696&range=00
  Issue: https://bugs.openjdk.org/browse/SKARA-2400
  Stats: 34 lines in 9 files changed: 2 ins; 1 del; 31 mod
  Patch: https://git.openjdk.org/skara/pull/1696.diff
  Fetch: git fetch https://git.openjdk.org/skara.git pull/1696/head:pull/1696

PR: https://git.openjdk.org/skara/pull/1696


More information about the skara-dev mailing list