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 Setter and Getter functions to results spreadsheet google creds #2443

Conversation

shirmoran
Copy link
Contributor

@shirmoran shirmoran commented Sep 16, 2024

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
Copy link
Collaborator

dcibot commented Sep 16, 2024

Copy link
Contributor

@greyerof greyerof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@shirmoran
Copy link
Contributor Author

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!

@shirmoran shirmoran requested a review from greyerof September 16, 2024 14:19
@dcibot
Copy link
Collaborator

dcibot commented Sep 16, 2024

@shirmoran shirmoran merged commit e939106 into redhat-best-practices-for-k8s:main Sep 17, 2024
34 checks passed
@dcibot
Copy link
Collaborator

dcibot commented Sep 17, 2024

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

Successfully merging this pull request may close these issues.

4 participants