Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pagination to the hdi and ups commands for environments with hundreds of service instances 😮 #40

Closed
jung-thomas opened this issue May 12, 2021 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@jung-thomas
Copy link
Contributor

No description provided.

@jung-thomas jung-thomas added the enhancement New feature or request label May 12, 2021
@jung-thomas jung-thomas self-assigned this May 12, 2021
@jung-thomas
Copy link
Contributor Author

@draschke - tagged as requestor. But please note it might be a few days before I have the bandwidth to look into this item

@jung-thomas
Copy link
Contributor Author

I've upped the call page size to 5000 on the hdi and ups command. Should work for you now, although I don't have any environment that has that many services instances to test in. Fix will be in version 2.202105.5

@draschke
Copy link

draschke commented May 20, 2021

Would check for it as soon npm for hana-cli is updated. hana-cli hdi

@jung-thomas
Copy link
Contributor Author

New version is available in npm now
https://www.npmjs.com/package/hana-cli/v/2.202105.5

@draschke
Copy link

hana-cli status & hana-cli status -a are working. any idea?

Connection Problems: Error: Connection Problems: {}


PS C:\git\t3e\db> hana-cli hdi --cf false --debug
  hana-cli Yargs values: +0ms
  hana-cli {
  hana-cli   _: [ 'hdi' ],
  hana-cli   cf: false,
  hana-cli   c: false,
  hana-cli   cmd: false,
  hana-cli   debug: true,
  hana-cli   Debug: true,
  hana-cli   disableVerbose: false,
  hana-cli   quiet: false,
  hana-cli   'disable-verbose': false,
  hana-cli   '$0': 'hana-cli'
  hana-cli } +2ms
  hana-cli Prompt values: +4ms
  hana-cli { cf: false, disableVerbose: false, debug: true } +0ms
Connection Problems:  Error: Connection Problems:  {}
hana-cli: 2.202105.5
@sap/audit-logging: 5.0.0
@sap/cds: 5.1.4
@sap/cds-compiler: 2.2.8
@sap/cds-foss: 2.3.1
@sap/cds-runtime: 3.1.1
@sap/cds-dk: 4.1.4
@sap/cds-sidecar-client: 1.1.16
@sap/edm-converters: 1.0.41
@sap/eslint-plugin-cds: 1.1.3
@sap/hana-client: 2.8.20
@sap/hdbext: 7.2.0
@sap/e2e-trace: 3.0.0
@sap/textbundle: 4.0.0
@sap/xsenv: 3.1.0
@sap/xssec: 3.2.0
sap-hdbext-promisfied: 2.202105.1

@jung-thomas
Copy link
Contributor Author

Are you logged in with the xs command from the command line? That's the only way I can reproduce that message is if I don't login first with the xs.

@draschke
Copy link

no, I don't.

maybe I'm to tired for now. but it looks like a misspelling...cf = require("../utils/xs")

image

@jung-thomas
Copy link
Contributor Author

jung-thomas commented May 20, 2021

no, I don't.

What do you mean by that? No you aren't logged in via xs login?

but it looks like a misspelling...cf = require("../utils/xs")

No that's intentional. I created both the cf and xs utility libraries with the same interface. That way I can have one check and load the specific implementation but keep all the other code working with the libraries the same.

@draschke
Copy link

I'm not logged in via xs login.

@draschke
Copy link

draschke commented May 21, 2021

Thank you! It works if I'm logged in via xs. (Works only via xs/cf because Its an xs/cf application construct.)

If I create a hdi-container via HANA-Cli there wont be a hdi-service instance created. Right?

@jung-thomas
Copy link
Contributor Author

In this instance I'm just reusing the underlying xs/cf client. I didn't want to duplicate the login/credentials handling/storing that xs/cf client is already doing. Therefore I'm just using a child process to launch xs/cf and using the curl command to make requests to the xs/cf API.
https://cli.cloudfoundry.org/en-US/v6/curl.html

So this does mean I'm basically just scripting calls through the xs/cf client and that you must already be logged in via the client before this command will work. However I wasn't happy with the error message in this situation. The true error details were getting lost in the call stack. I've made an improvement to make sure those details will now surface up to the user:
image

@jung-thomas
Copy link
Contributor Author

If I create a hdi-container via HANA-Cli there wont be a hdi-service instance created. Right?

No they won't be there in the hana-cli hdi command. Because this command calls to the xs/cf APIs and only sees the service instances known there.

Only the hana-cli containers command would show you the HDI containers created directly via SQL APIs as well.

@draschke
Copy link

However I wasn't happy with the error message in this situation. The true error details were getting lost in the call stack. I've made an improvement to make sure those details will now surface up to the user:

Funny, when I was debugging it in the morning and saw this error msg, I thought the same. 😁 Thanks! Makes it much more easier!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants