Skip to content

fix: add debug print for secret_data in GoogleCloudConnector #138

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

Merged
merged 2 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/spaceone/inventory/libs/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(self, *args, **kwargs):

super().__init__(*args, **kwargs)
secret_data = kwargs.get("secret_data")
print(f'####: {secret_data}')
self.project_id = secret_data.get("project_id")
self.credentials = (
google.oauth2.service_account.Credentials.from_service_account_info(
Expand Down
2 changes: 1 addition & 1 deletion src/spaceone/inventory/service/collector_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ def collect(self, params):

project_conn = self.locator.get_connector(ProjectConnector, **params)
try:
# _LOGGER.debug(f"[collect] project => {project_id} / {project_state}")
project_info = project_conn.get_project_info()
project_id = project_info["projectId"]
project_state = project_info["state"]
_LOGGER.debug(f"[collect] project => {project_id} / {project_state}")
except Exception as e:
_LOGGER.debug(f"[collect] failed to get project_info => {e}")
return CloudServiceResponse().to_primitive()
Expand Down
Loading