SAP / cloud-mta-build-tool

Multi-Target Application (MTA) build tool for Cloud Applications https://sap.github.io/cloud-mta-build-tool
Apache License 2.0
139 stars 61 forks source link

Error could not remove the Makefile_20240125133534.mta #1109

Open Markus-Schroeder-de opened 8 months ago

Markus-Schroeder-de commented 8 months ago

Since the November update we have had problems in the CI pipeline because the build process itself is successful, but ends with an error exit because the temporary file "Makefile_TIMESTAMP.mta" cannot be deleted. Here it would be helpful to check whether the file exists before trying to delete it. Something may have changed when the archive was created, so that the Makefile is already deleted when "INFO cleaning temporary files..." (after-all) occurs.

[2024-01-25 13:35:51]  INFO running the "after-all" build...
[2024-01-25 13:35:51]  INFO generating the metadata...
[2024-01-25 13:35:51]  INFO generating the "/workspaces/example-app/dist/.example-app_mta_build_tmp/META-INF/mtad.yaml" file...
[2024-01-25 13:35:51]  INFO generating the MTA archive...
[2024-01-25 13:35:54]  INFO the MTA archive generated at: dist/example.app_0.0.1.mtar
[2024-01-25 13:35:54]  INFO cleaning temporary files...
[2024-01-25 13:35:54] ERROR could not remove the "Makefile_20240125133534.mta" file: remove Makefile_20240125133534.mta: no such file or directory
Error: could not remove the "Makefile_20240125133534.mta" file: remove Makefile_20240125133534.mta: no such file or directory

Please provide the following info:

Steps to Reproduce:

  1. mbt build --mode verbose --extensions ./resources/dev/dev.mtaext --target ./dist
yutaoj commented 7 months ago

I can't reproduce this issue in my test case. could you share the simple reproduced case ?