Skip to content

Creating VM instance with labels fails #314

@ronikarapplitools

Description

@ronikarapplitools

When I try to create a VM with labels, the package converts the keys from kabab-case to camelCase, and I get an error:

Invalid value for field 'resource.labels': ''. Label key 'iAmVm' violates format constraints. The key must start with a lowercase character, can only contain lowercase letters, numeric characters, underscores and dashes. The key can be at most 63 characters long. International characters are allowed.

The labels I try to add:

labels: {
        'i-am-vm': 'true',
      }

The bug occurs only in version 3.1.3. When I downgrade the version of the package to 3.1.2, It works

  1. Is this a client library issue or a product issue? Library issue
  2. Did someone already solve this? No

Environment details

  • OS: Mac
  • Node.js version: 16.13.0
  • npm version: 8.1.0
  • google-gax version: 3.13

Steps to reproduce

  1. npm install @google-cloud/compute
  2. Creating a VM with labels by using @google-cloud/compute package

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions