Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

ValueError: Protocol message AutoprovisioningNodePoolDefaults has no "management" field. #118

Description

@raffOps

I have this code running inside google cloud composer:

from google.cloud.container_v1.types import (
     AutoprovisioningNodePoolDefaults,
     NodeManagement
)

management = NodeManagement(auto_repair=False)
     node_pool_nap = AutoprovisioningNodePoolDefaults(oauth_scopes=["https://www.googleapis.com/auth/cloud-platform"],
                                                      management=management)

Composer is returning the error message:

node_pool_nap = AutoprovisioningNodePoolDefaults(oauth_scopes=["https://www.googleapis.com/auth/cloud-platform"],
ValueError: Protocol message AutoprovisioningNodePoolDefaults has no "management" field.

In documentation and here in repo shows that this field exists

Environment details

composer-1.17.0-preview.2-airflow-2.0.1

google-cloud-container==1.0.1

Steps to reproduce

  1. Load the code below in the bucket of gcp composer version composer-1.17.0-preview.2-airflow-2.0.1

Code example

from airflow import DAG
from airflow.operators.dummy import DummyOperator
from airflow.utils.dates import days_ago
from google.cloud.container_v1.types import (
     AutoprovisioningNodePoolDefaults,
     NodeManagement
)

management = NodeManagement(auto_repair=False)
node_pool_nap = AutoprovisioningNodePoolDefaults(oauth_scopes=["https://www.googleapis.com/auth/cloud-platform"],
                                                      management=management)
args = {
    'owner': 'airflow',
}

dag = DAG(dag_id="test", default_args=args, start_date=days_ago(2))
DummyOperator(task_id="dummy", dag=dag)

  

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: containerIssues related to the googleapis/python-container API.priority: p2Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions