SAP-samples / s4hana-microsoft-team-app-integration

Learn how to build a Microsoft Teams extension app and approve SAP S/4HANA purchase order in Microsoft Teams App
Apache License 2.0
9 stars 2 forks source link

Client CLI Version 2.24.0 outdated #8

Open SchillerFlorian opened 3 months ago

SchillerFlorian commented 3 months ago

When i execute command "./btpsa" in the Step 4 "Trigger the Automation Tool Docker Container" i get an error message, that the client CLI Version (2.24.0) is outdated. Can I fix this myself or do I need a new Docker image in this case?

Error Message: Your client (2.24.0) is outdated and can no longer be used With the configured server (2.69.0).

AFK-Python commented 3 months ago

Hi @SchillerFlorian,

You are more than welcome to fix this yourself. It looks like you would have to upgrade the BTP client to version 2.69.x, the information for which should be here.

Note that Bridge is no longer supported by our team, and it is likely that more of the clients used by the automation pipeline are out of date. It's also possible that changes to the scripts behind the pipeline might need updating, depending on whether or not BTP/CF/Azure APIs have changed (although I suspect this to be on the more unlikely side). All updates should be possible within the Docker container.

So, while you can update whatever is needed, we will not be offering full support for the foreseeable future.

Best, Alex

SchillerFlorian commented 3 months ago

Hi @AFK-Python , thank you for the quick reply. Does SAP then offer a new simpler solution where SAP approvals can be integrated into MS Teams? The advantage of the Bridge Framework was the semi automatic implementation, which is really helpful to reduce the manual effort and the possible errors.

BR Florian

viancu commented 3 months ago

Hi Florian,

There are several MS Teams integrations offered by the line of business applications themselves, such as this one for SAP S/4HANA Cloud and this one for SAP SuccessFactors. The integration features may not apply to an approval scenario, but it is still worth checking if any of the direct integrations serve your purpose.

For functionality focused around approval scenarios there is SAP Task Center, although this is not specific to MS Teams it would fit a similar purpose in streamlining access to approvals.

Other than what I've mentioned above, I don't believe there is an out-of-the-box solution that offers approval scenario integrations for MS Teams with SAP. Potentially a custom solution similar in architecture to Bridge Framework could work here.

Best, Victor

SchillerFlorian commented 2 months ago

Hi,

i tried to update the BTP Client in the docker container, but i was unfortunately not able to extract the tar.gz archive with tar -vxzf . I get always the message "tar: invalid magic, tar: short read". I also tryed to copy the extracted file from the host to the docker container. But when i execute the btp file i get the message "/bin/ash: btp: not found". Any tips how can i solve this? I'm not a real linux and docker expert. I would really like to try out the bridge framework, because it best suits our requirements.

SAP is still offering this Implementation as Mission (https://discovery-center.cloud.sap/protected/index.html#/missiondetail/4164/4408/?tab=overview). I suspect that other users encounter the same problem with the outdated CLI version as i did.

BR Florian

AFK-Python commented 2 months ago

Hi @SchillerFlorian,

Did this fail for both flavors of the linux client available? I'm pretty sure only the x64 flavor would work for that container as it was built using the intel chip mac. You may also need to remove the existing installation before trying to install the new package. Lastly, you may need to add the installation path of the client to your command path, as defaults might be different within the Docker container, especially after an uninstall of the old client.

As for the mission, apologies for the mixed messaging there. I'm not sure if the mission will be taken down, but I can confirm that our team is not actively working on this project. Development may be resumed at some point in the future; however, I see this as unlikely, as the project is, unfortunately, no longer in line with SAP's targets.

Best, Alex

SchillerFlorian commented 2 months ago

Hi @AFK-Python ,

i used the package btp-cli-linux-amd64-2.64.0.tar.gz for Linux (x64). My laptop runs on windows 10.

These are the steps i have taken:

  1. Start Docker Desktop
  2. Load docker image "docker load -i ./bridge-automation-pipeline.tar.gz"
  3. Run docker imgage as Container "docker container run -e BTPSA_VERSION_GIT="$(git describe --long --tags --always)" --rm -it -d --name bridge-automation-pipeline bridge-automation-pipeline"
  4. Start terminal session
  5. Download Package "wget https://tools.hana.ondemand.com/additional/btp-cli-linux-amd64-2.64.0.tar.gz"
  6. Unpack Package "tar -vxzf btp-cli-linux-amd64-2.64.0.tar.gz" Result: tar: invalid magic tar: short read

I also testet this with root authorization with the same result. The main problem at the moment is unpackung the file directly in the container self. Another test was to unpack the package on my windows laptop and transfer the file to the container. But i could not start/execute the btp file in the container.

BR Florian

AFK-Python commented 2 months ago

Hi @SchillerFlorian,

I tested your method and there seems to be something wrong with the wget link.

I instead downloaded from the x64 link and dragged it into the docker container. I then ran the tar command from above, and it appears to successfully unpackage via the tar command. However, it seems that the new version requires some extra libraries within alpine.

So from the tar command to getting the version from the CLI, here is what I did:

# unpackage the file (-v is optional, just is the verbose flag, you might want to use it to confirm all is working)
tar -xzf btp-cli-linux-amd64-2.64.0.tar.gz

# moving it to path and creating an executable
sudo mv linux-amd64/btp /usr/local/bin/btp
sudo chmod u+x /usr/local/bin/btp

# adding libs that new CLI needs
sudo wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.33-r0/glibc-2.33-r0.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.33-r0/glibc-bin-2.33-r0.apk
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.33-r0/glibc-i18n-2.33-r0.apk

# using the libs from the wget commands to install the missing library
sudo apk add --no-cache glibc-2.33-r0.apk glibc-bin-2.33-r0.apk glibc-i18n-2.33-r0.apk

# confirming the update - you should see this as output: "SAP BTP command line interface (client v2.64.0)"
btp --version

Not sure what's going wrong with the wget, maybe it is a docker issue? I didn't look into it very throughly since dragging and dropping the x64 (or amd64 version as it's noted in the tar) version into the running container worked for me. So, this should resolve your "/bin/ash: btp: not found" error.

Please confirm if this works for you!

Best, Alex

P.S For future reference, I discovered the need for the extra libraries by calling which btp, which the terminal recognized. At that point, it seemed likely that there were missing libraries since the executable was recognized, but couldn't run, so I ran a check on what library dependencies were missing via the following command: ldd /usr/local/bin/btp.

This resulted in the following output:

        /lib64/ld-linux-x86-64.so.2 (0x7f494ea07000)
        libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f494ea07000)
        libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f494ea07000)
Error loading shared library libresolv.so.2: No such file or directory (needed by /usr/local/bin/btp)

That library is part of glibc.

That's how I came to this solution, and I'm sharing the process, as it might be of use if future packages cause similar problems. Additionally, I would strongly recommend the use of LLMs here - GPT helped me greatly in speeding up the debug process, but I know that Claude is also really helpful in these cases too (beats having to dig across forums for finding all of these details).

SchillerFlorian commented 2 months ago

Hi @AFK-Python

many thanks for the quick and detailed description.

I was actually able to update the BTP client version to 2.64.0. That helps me a lot.
The deployment can only be tested in two weeks because I'm on vacation next week.

And many thanks also for the tip on how to check dependent libraries . This could also be very useful in the future ;)

BR Florian