diff options
| author | zousar <[email protected]> | 2025-08-14 16:48:36 -0600 |
|---|---|---|
| committer | zousar <[email protected]> | 2025-08-14 16:48:36 -0600 |
| commit | 9aeaee2aa3a351e4be85f9c6cfa08cde66283897 (patch) | |
| tree | 9b90809b31ccbbca9d64f0786e7e9268a478beb6 | |
| parent | Merge pull request #467 from ue-foundation/fd-show-all-oplog (diff) | |
| download | zen-9aeaee2aa3a351e4be85f9c6cfa08cde66283897.tar.xz zen-9aeaee2aa3a351e4be85f9c6cfa08cde66283897.zip | |
Ensure that FinalizeContainer finalizes both part and build
| -rw-r--r-- | src/zenserver/projectstore/buildsremoteprojectstore.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/zenserver/projectstore/buildsremoteprojectstore.cpp b/src/zenserver/projectstore/buildsremoteprojectstore.cpp index c9a01e56a..52cdc5983 100644 --- a/src/zenserver/projectstore/buildsremoteprojectstore.cpp +++ b/src/zenserver/projectstore/buildsremoteprojectstore.cpp @@ -270,6 +270,37 @@ public: m_OplogBuildPartId, Ex.what()); } + + if (!Result.ErrorCode && Result.Needs.empty()) + { + try + { + m_BuildStorage->FinalizeBuild(m_BuildId); + } + catch (const HttpClientError& Ex) + { + Result.ErrorCode = Ex.m_Error != 0 ? Ex.m_Error + : Ex.m_ResponseCode != HttpResponseCode::ImATeapot ? (int)Ex.m_ResponseCode + : 0; + Result.Reason = fmt::format("Failed finalizing oplog container build to {}/{}/{}/{}. Reason: '{}'", + m_Url, + m_Namespace, + m_Bucket, + m_BuildId, + Ex.what()); + } + catch (const std::exception& Ex) + { + Result.ErrorCode = gsl::narrow<int32_t>(HttpResponseCode::InternalServerError); + Result.Reason = fmt::format("Failed finalizing oplog container build to {}/{}/{}/{}. Reason: '{}'", + m_Url, + m_Namespace, + m_Bucket, + m_BuildId, + Ex.what()); + } + } + return Result; } |