redhat-best-practices-for-k8s / certsuite

https://redhat-best-practices-for-k8s.github.io/certsuite/
Apache License 2.0
15 stars 31 forks source link

Add Setter and Getter functions to results spreadsheet google creds #2443

Closed shirmoran closed 1 month ago

shirmoran commented 1 month ago

This PR adds credentials as an argument of CreateSheetsAndDriveServices func in order to allow the use of it independently from using upload results-spreadsheet sub-command. In current state, the credentials are sent using a flag to the mentioned sub command, which limits functions using this variable to run using the sub-command only. In the operator-results-spreadsheet repo, we would like to allow the use of CreateSheetsAndDriveServices func (which uses the credentials variable) in order to add more columns to an existing sheet, and for that we need the credentials to be set manually.

dcibot commented 1 month ago

from change https://github.com/redhat-best-practices-for-k8s/certsuite/pull/2443:

shirmoran commented 1 month ago

This is a way to solve it, but it doesn't look like a good approach to me, as the setters/getters use an internal global/package var. I would probably change the CreateSheetsAndDriveServices to add an extra string argument for that credentails path.

I agree - That's a better idea. I'll do the change, thanks!

dcibot commented 1 month ago

from change https://github.com/redhat-best-practices-for-k8s/certsuite/pull/2443:

dcibot commented 1 month ago

from change https://github.com/redhat-best-practices-for-k8s/certsuite/pull/2443: