Partial deployment (-m) does not update MTA version metadata and leaves stale build records causing 500 errors

オープン
#1,943 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java
領域
backend, devops

調査の方向性

The issue identifies getBuildsForApplication as a likely source of stale build records, but does not name its file or a test. Start by locating that method and tracing partial deployment cleanup and MTA version metadata updates; the payload provides no test command. Done means partial deploys report the deployed module version and subsequent full or partial deploys avoid the reported 500 error.

索引モデルが issue の本文から書いたものです。

説明

When using cf deploy -m -r for partial deployment, two problems occur:

A. MTA version not updated after partial deploy

After deploying a single module via -m, running cf mta does not correctly reflect the version of the partially deployed module. The MTA metadata appears unchanged, making it impossible to determine which version of a given module is actually running in the space.

Expected behavior: cf mta should update the MTA version on partial deploy, or expose per-module version information so operators can audit the deployed state.
Actual behavior: MTA version metadata remains as it was after the last full deploy, regardless of subsequent partial deploys.
Related: SAP-samples/cf-mta-examples#84 — open since Jan 2024.

B. Stale build records cause 500 on subsequent deploys

After a partial deployment, subsequent cf deploy operations (both full and partial) can fail with:

500 Internal Server Error: UnknownError(10001)

The root cause appears to be getBuildsForApplication finding lingering build records from the prior partial deploy that were not cleaned up.

Expected behavior: The controller should clean up or gracefully handle stale build records from prior partial deployments.
Actual behavior: Deployment fails with 500 until stale records are manually resolved.
Documented in: sap-tutorials/tutorials-ims – MTA deployment troubleshooting

Your environment
MultiApps Controller version — SAP BTP managed (latest)
MultiApps CF CLI Plugin version — latest
which CF vendor is used — SAP BTP Cloud Foundry
which backing services are used — hana / hdi-shared (HDI container)
Steps to reproduce

1. Initial full deploy (succeeds)

mbt build
cf deploy myapp.mtar -f

2. Partial deploy of db module only (succeeds)

cf deploy myapp.mtar -m db-deployer -r hdi-container

3. Check MTA version — still shows version from step 1

cf mta myapp

4. Attempt another full deploy — may fail with 500 due to stale build state

cf deploy myapp.mtar -f

Error: 500 Internal Server Error: UnknownError(10001)

MTA descriptor: standard CAP/HANA Cloud project with hdb module type and com.sap.xs.hdi-container resource.

Additional information
CLI plugin CHANGELOG references prior selective deploy fixes: "Fix selective deployment on Windows", "Fix selective deployment with modules sharing the same binary" — CHANGELOG.md. This suggests selective deployment has been a known problem area.
Using SAP BTP managed controller, so no access to controller application logs. Operation logs via cf dmol available on request if maintainers need them for a specific reproduction.

主要言語
Java
スター
65
フォーク
41
平均マージ
1日 12分
マージ済み PR(30日)
7

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cloudfoundry/multiapps-controller のほかの issue

cloudfoundry/multiapps-controller の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。