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

Cli support display more meaningful fields #1582

Closed
shanewxy opened this issue Nov 24, 2023 · 4 comments
Closed

Cli support display more meaningful fields #1582

shanewxy opened this issue Nov 24, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@shanewxy
Copy link
Contributor

Is your enhancement related to a problem? Please describe.

Our cli command seems to support list only id, name, and createTime, but extension APIs like getVersions need more information like versions returned.

$ walrus template get-versions terraform-aws-customer-gateway
                 id                             name                    createTime
-------------------- -------------------------------- -----------------------------
 488228946027360846   terraform-aws-customer-gateway   2023-11-21T03:18:48.977076Z
 488228946027295310   terraform-aws-customer-gateway   2023-11-21T03:18:48.977076Z
 488228946027229774   terraform-aws-customer-gateway   2023-11-21T03:18:48.977076Z
 488228946027164238   terraform-aws-customer-gateway   2023-11-21T03:18:48.977076Z
 488228946027098702   terraform-aws-customer-gateway   2023-11-21T03:18:48.977076Z
 488228946027033166   terraform-aws-customer-gateway   2023-11-21T03:18:48.977076Z
 488228946026967630   terraform-aws-customer-gateway   2023-11-21T03:18:48.977075Z

Describe the solution you'd like

Support display meaningful fields for specific APIs.

Describe alternatives you've considered

Additional context

@shanewxy shanewxy added the enhancement New feature or request label Nov 24, 2023
@Finenyaco
Copy link

Environment

Project and environment information is not displayed when getting resources of resource definition.

 ~/ walrus resourcedefinition get-resources 490697291011777538
                 id         name                    createTime
-------------------- ------------ -----------------------------
 490728095540634626   test-ports    2023-12-08T09:05:38.16371Z
 490727888761447426   resource-2   2023-12-08T09:03:34.916244Z
 490727851818017794   resource-1   2023-12-08T09:03:12.892028Z

@gitlawr gitlawr added this to the v0.5.0 milestone Dec 15, 2023
@aiwantaozi aiwantaozi self-assigned this Dec 26, 2023
@thxCode
Copy link
Member

thxCode commented Jan 17, 2024

Can we also fix this #1607? or already fixed?

@Finenyaco
Copy link

Finenyaco commented Jan 23, 2024

Environment

  • Walrus version: main 3806cbe
  • UI version: v0.5.0-rc2

Test Result:

 ~/ w template get-versions 497362217688147202  --project ""
 ID                   NAME                                  VERSION   CREATED
-------------------- ------------------------------------- --------- -----------------------------
 497362217722356994   builtin/kubernetes-containerservice   v0.2.6    2024-01-23T03:29:43.125018Z
 497362217722291458   builtin/kubernetes-containerservice   v0.2.5    2024-01-23T03:29:43.125018Z
 497362217722225922   builtin/kubernetes-containerservice   v0.2.4    2024-01-23T03:29:43.125017Z
 497362217722160386   builtin/kubernetes-containerservice   v0.2.3    2024-01-23T03:29:43.125017Z
 497362217722094850   builtin/kubernetes-containerservice   v0.2.2    2024-01-23T03:29:43.125017Z
 497362217722029314   builtin/kubernetes-containerservice   v0.2.1    2024-01-23T03:29:43.125017Z
 497362217721963778   builtin/kubernetes-containerservice   v0.2.0    2024-01-23T03:29:43.125017Z
 497362217721898242   builtin/kubernetes-containerservice   v0.1.3    2024-01-23T03:29:43.125016Z
 497362217721832706   builtin/kubernetes-containerservice   v0.1.2    2024-01-23T03:29:43.125016Z
 497362217721767170   builtin/kubernetes-containerservice   v0.1.1    2024-01-23T03:29:43.125016Z
 497362217721701634   builtin/kubernetes-containerservice   v0.1.0    2024-01-23T03:29:43.125015Z
 ~/ w resourcedefinition get-resources builtin-containerservice
 ID                   NAME    PROJECT   ENVIRONMENT   ENDPOINTS                                                         STATUS   CREATED
-------------------- ------- --------- ------------- ----------------------------------------------------------------- -------- -----------------------------
 497363787330921730   gitea   default   local         [{"name":"3000:3000/http","url":"http://192.168.50.182:30059"}]   Ready    2024-01-23T03:45:18.680364Z
  • But some commands do not return values:
    -- walrus resource get-outputs
    -- walrus setting get
    -- walrus variable list
 ~/ w resource get-outputs nginx
 NAME         TYPE
------------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 address      string
 connection   string
 context      ["map",["map","string"]]
 endpoints    ["map","string"]
 ports        ["tuple",["number"]]
 refer        ["object",{"params":["object",{"endpoints":["list","string"],"hosts":["tuple",["string"]],"name":"string","namespace":"string","ports":["tuple",["number"]],"selector":["object",{"walrus.seal.io/catalog-name":"string","walrus.seal.io/environment-name":"string","walrus.seal.io/project-name":"string","walrus.seal.io/resource-name":"string"}]}],"schema":"string"}]
 ~/ w setting get ResourceRelationshipCheckCronExpr
 ID                   NAME                                CREATED
-------------------- ----------------------------------- -----------------------------
 497362200728282370   ResourceRelationshipCheckCronExpr   2024-01-23T03:29:32.990802Z
 ~/ w variable list
 ID                   NAME   CREATED
-------------------- ------ -----------------------------
 497367058602829058   test   2024-01-23T04:17:48.517189Z
 ~/ w variable -h
Usage:
  walrus variable [command]

Available Commands:
  create      Create a variable.
  delete      Delete a variable.
  list        Get variables.
  update      Update a variable.

Global Flags:
  -d, --debug   Enable debug log
  -h, --help    Help for this command

Use "walrus variable [command] --help" for more information about a command.

@Finenyaco
Copy link

Environment

  • Walrus version: main 4eef11d
  • UI version: dev-94aee09

Test Result: pass

  • walrus resource get-outputs: pass
 ~/seal/ w resource get-outputs 497540922569956098
 NAME         VALUE                                         TYPE
------------ --------------------------------------------- --------
 address      test-222.default-local.svc.cluster.local      string
 connection   test-222.default-local.svc.cluster.local:80   string
 context      {                                             map
              "environment": {
              "id": "497517331371554050",
              "name": "local",
              "namespace": "default-local"
              },
              "project": {
              "id": "497517331371554050",
              "name": "default"
              },
              "resource": {
              "id": "497540922569956098",
              "name": "test-222"
              }
              }
 endpoints    {                                             map
              "80:80/http": "http://192.168.155.2:30083"
              }
 ports        [                                             tuple
              80
              ]
 refer        <sensitive>                                   object
  • walrus setting list/get: pass
 ~/seal/ w setting get ResourceRelationshipCheckCronExpr
 ID                   NAME                                VALUE            CREATED
-------------------- ----------------------------------- ---------------- -----------------------------
 497517330819806466   ResourceRelationshipCheckCronExpr   */30 * * ? * *   2024-01-24T05:10:37.739629Z
  • walrus variable list: pass
 ~/seal/ w variable list
 ID                   NAME               VALUE          CREATED
-------------------- ------------------ -------------- -----------------------------
 497543890610461442   test               env-12345678   2024-01-24T09:34:28.609033Z
 497531122612204802   project-password   <sensitive>    2024-01-24T07:27:38.284776Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants