SAP-samples / hana-developer-cli-tool-example

Learn how to build a developer-centric SAP HANA command line tool, particularly designed to be used when performing SAP HANA development in non-SAP tooling (for example from VS Code).
Apache License 2.0
90 stars 24 forks source link

hc command only work with installed btp cli? #105

Closed 6of5 closed 1 year ago

6of5 commented 1 year ago

Hi Tom,

the very useful commands hc and hcstart do not work for me as before (used version hana-cli@3.202303.2):

npx hana-cli hc
Checking at the BTP Level
Checking at the CF Level

before with (version hana-cli@3.202212.2)

npx hana-cli hc
Name: BLUE01
Create At: 2022-10-28T12:49:58Z
Status: Running
Last Operation: update succeeded @ 2023-03-15T05:36:43Z
SAP HANA Cockpit: https://hana-cockpit-001.cfapps.us10.hana.ondemand.com/.....
.......

Context: working in a devcontainer, node.js v16, logged in BTP Trial via cf7

Perhaps I missed to correct usage or changes of these commands. Is btp cli mandatory precondition so that these commands work? If yes, documentation should be updated accordingly.

p.s. hana-cli version info:

npx hana-cli version
hana-cli: 3.202302.3
@cap-js/graphql: 0.2.0
@sap/cds: 6.5.0
@sap/cds-compiler: 3.6.2
@sap/cds-foss: 4.0.0
@sap/cds-common-content: 1.0.1
@sap/textbundle: 4.1.0
@sap/xsenv: 3.4.0
hdb: 0.19.5
sap-hdb-promisfied: 2.202301.1
@sap/cds-dk: 6.5.2
@sap/cds-mtxs: 1.5.1
@sap/eslint-plugin-cds: 2.6.1
cf-cli: cf version 7.5.0+0ad1d63.2022-06-04
btp-cli: btp CLI not installed
hana-cli home: /workspaces/odatav4-fe/node_modules/hana-cli/bin/
Node.js: v16.18.0
Change Log: https://github.com/SAP-samples/hana-developer-cli-tool-example/blob/main/CHANGELOG.md
Latest hana-cli version available on npmjs.com: 3.202303.2
Local version of hana-cli is out of date. Consider upgrading with "npm upgrade -g hana-cli"
jung-thomas commented 1 year ago

The BTP CLI is only needed if your HANA instance is created as multi-environment. The BTP CLI tool itself shouldn't be a technical requirement. If it isn't found, the hana-cli should just move on gracefully. Could you perhaps run the command again with "--debug true". That will give lots of debugging output. If you could share that log here (careful though some sensitive password info might be in that log - please remove or cover up that portion) that would be most helpful. I'm traveling today and in a CodeJam tomorrow but I'll definitely look into the issue on Friday.

jung-thomas commented 1 year ago

Thank you for the fixes. They have been pushed to npm as well with version 3.202303.3