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

Fix bug with GCP init due to inferred_project_id #306

Merged
merged 1 commit into from
Apr 27, 2022
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
3 changes: 1 addition & 2 deletions skylark/cli/cli_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,8 +431,7 @@ def load_gcp_config(config: SkylarkConfig, force_init: bool = False) -> SkylarkC
if force_init:
typer.secho(" GCP credentials will be re-initialized", fg="red")
config.gcp_project_id = None

if not Path(gcp_config_path).is_file():
elif not Path(gcp_config_path).is_file():
typer.secho(" GCP region config missing! GCP will be reconfigured.", fg="red")
config.gcp_project_id = None

Expand Down
2 changes: 1 addition & 1 deletion skylark/compute/gcp/gcp_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def save_region_config(self):
region_list = []
credentials = self.credentials
service = discovery.build("compute", "beta", credentials=credentials)
request = service.zones().list(project=self.inferred_project_id)
request = service.zones().list(project=self.project_id)
while request is not None:
response = request.execute()
# In reality, these are zones. However, we shall call them regions to be self-consistent.
Expand Down