redhat-developer / app-services-cli

Command Line Interface for RHOAS
https://redhat-developer.github.io/app-services-website/
Apache License 2.0
42 stars 72 forks source link

fix(namespace): fix namespace name logging #1773

Closed avano closed 2 years ago

avano commented 2 years ago

Type of change

Fixes an issue with namespace create command:

Successfully created the "<no value>" namespace &{Name my-namespace}

Also fixes an issue where the name logged is always from the --name command option, not from the actual namespace created

jackdelahunt commented 2 years ago

Created a namespace with the pr and the issue with localizer is fixed but there is no name being displayed.

➜  app-services-cli git:(namespace-create-fix) ./rhoas connector namespace create
{
  "annotations": {
    "connector_mgmt.bf2.org/profile": "evaluation-profile"
  },
  "cluster_id": "c9nrsjtcqpu8pmmjl5vg",
  "created_at": "2022-10-27T11:09:40.274733Z",
  "expiration": "2022-10-29T11:09:40.27169Z",
  "href": "/api/connector_mgmt/v1/kafka_connector_namespaces/cdd6dt0oj57achspmeig",
  "id": "cdd6dt0oj57achspmeig",
  "kind": "ConnectorNamespace",
  "modified_at": "2022-10-27T11:09:40.274733Z",
  "name": "inspired-termite-namespace",
  "owner": "jackdelahunt",
  "quota": {
    "connectors": 4,
    "cpu_limits": "2",
    "cpu_requests": "1",
    "memory_limits": "2Gi",
    "memory_requests": "1Gi"
  },
  "resource_version": 863187,
  "status": {
    "connectors_deployed": 0,
    "state": "disconnected"
  },
  "tenant": {
    "id": "jackdelahunt",
    "kind": "user"
  }
}
Successfully created the "" namespace
avano commented 2 years ago

thanks Jack, that was a different issue - the logged name was always from the --name xyz command option, not from the actual namespace created. hopefully fixed now:

./rhoas connector namespace create
{
  "annotations": {
    "connector_mgmt.bf2.org/profile": "evaluation-profile"
  },
  "cluster_id": "c9nrsjtcqpu8pmmjl5vg",
  "created_at": "2022-10-27T12:07:35.414848Z",
  "expiration": "2022-10-29T12:07:35.412037Z",
  "href": "/api/connector_mgmt/v1/kafka_connector_namespaces/cdd791vb1fq06fd8eq1g",
  "id": "cdd791vb1fq06fd8eq1g",
  "kind": "ConnectorNamespace",
  "modified_at": "2022-10-27T12:07:35.414848Z",
  "name": "regular-boar-namespace",
  "owner": "avano@redhat.com",
  "quota": {
    "connectors": 4,
    "cpu_limits": "2",
    "cpu_requests": "1",
    "memory_limits": "2Gi",
    "memory_requests": "1Gi"
  },
  "resource_version": 863191,
  "status": {
    "connectors_deployed": 0,
    "state": "disconnected"
  },
  "tenant": {
    "id": "avano@redhat.com",
    "kind": "user"
  }
}
Successfully created the "regular-boar-namespace" namespace
jackdelahunt commented 2 years ago

LGTM 👍