pfefferf / ui5-nwabap-deployer

UI5 Deployer for SAP NetWeaver ABAP
Apache License 2.0
55 stars 18 forks source link

Added the option to use TestMode for /UI5/ABAP_REPOSITORY_SRV #51

Closed Fjaoos closed 3 years ago

Fjaoos commented 3 years ago

Hi,

I wanted to be able to use the TestMode of the OData Service /UI5/ABAP_REPOSITORY_SRV , which is used since version 2 of this project.

You can set the environment variable UI5_TASK_NWABAP_DEPLOYER__TESTMODE to true if you want to use the TestMode.

I added this functionality to test the yaml config against the real system before I try to deploy the code

pfefferf commented 3 years ago

Thx for the contribution; I will integrate it probably next weekend (incl. enhancement of cli + grunt tooling with the same option)

Fjaoos commented 3 years ago

Hi, you are welcome. I am waiting for this function to be used by our Jenkins server so I would appreciate it very much if you could integrate this now and maybe add the grunt/cli tooling later on? I would have done it myself but I do not have the necessary testing configurations.

pfefferf commented 3 years ago

I don't have access to my test environment too until end of the wekk. So I cannot do it now. Sorry.

pfefferf commented 3 years ago

Found some time (and a another test environment) to enhance the coding: Test Mode is available for the grunt, ui5 task, cli tooling. Added some additional logic to avoid transport creation in case of a test deployment to avoid the situation that unused transports will be created each time a test deployment is done.

Checked if test mode is supported for undeployment too ... but unfortunately not.

Fjaoos commented 3 years ago

That is interesting and I did not check for created transports. In my opinion the service should not create a transport in testMode. I will test that and might open an incident at SAP because this seems wrong for me.

pfefferf commented 3 years ago

This is only related to the "transport handling" stuff within that package (not an issue of the service).

Fjaoos commented 3 years ago

I tested the testMode a little bit more and found a problem with the error handling. A successfull test respods with status 403 and message class /UI5/UI5_REP_LOAD/004 which indicates no found error. image I will investigate and provice a PR with a fix

pfefferf commented 3 years ago

And what is the issue in the deployer? It does not react on 403.

Fjaoos commented 3 years ago

The deployer does throw an error if the status code is 403. Since this is the wanted by the Service image I think it would be better to check the response body for /UI5/UI5_REP_LOAD/004 if the testMode is used. I am currently working on that