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

minor changes to astro deployment inspect #884

Merged
merged 3 commits into from
Nov 18, 2022

Conversation

jemishp
Copy link
Contributor

@jemishp jemishp commented Nov 18, 2022

Description

This pr adds ordered output when printing deployments. Also renamed a few keys based on user feedback.

🎟 Issue(s)

Related #876

🧪 Functional Testing

yaml output

$ astro deployment inspect claaesqk6329512z1h8f62bn12
deployment:
    environment_variables:
        - is_secret: true
          key: FOO
          updated_at: "2022-11-10T01:48:09.961Z"
          value: ""
    configuration:
        name: andytest
        description: ""
        runtime_version: 6.0.3
        scheduler_au: 5
        scheduler_count: 1
        cluster_id: cl6zcnlc600ht0vuibivf53jh
    worker_queues:
        - name: default
          id: claaesqk7329542z1h9u8isby3
          is_default: true
          max_worker_count: 10
          min_worker_count: 0
          worker_concurrency: 16
          node_pool_id: cl6zcnlc8395442eui99mvlqhv
    metadata:
        deployment_id: claaesqk6329512z1h8f62bn12
        workspace_id: cl6wg2zra144002dyw8px6t6ip
        cluster_id: cl6zcnlc600ht0vuibivf53jh
        release_name: combusting-velocity-9074
        airflow_version: 2.4.2
        dag_deploy_enabled: false
        status: HEALTHY
        created_at: 2022-11-10T01:46:26.55Z
        updated_at: 2022-11-11T18:05:22.567Z
        deployment_url: cloud.astronomer-dev.io/cl6wg2zra144002dyw8px6t6ip/deployments/claaesqk6329512z1h8f62bn12/analytics
        webserver_url: astronomer.astronomer-dev.run/df62bn12?orgId=org_dlgevirUCwI9vX10
    alert_emails: []

json output

$ astro deployment inspect claaesqk6329512z1h8f62bn12 -o json

{
    "deployment": {
        "environment_variables": [
            {
                "is_secret": true,
                "key": "FOO",
                "updated_at": "2022-11-10T01:48:09.961Z",
                "value": ""
            }
        ],
        "configuration": {
            "name": "andytest",
            "description": "",
            "runtime_version": "6.0.3",
            "scheduler_au": 5,
            "scheduler_count": 1,
            "cluster_id": "cl6zcnlc600ht0vuibivf53jh"
        },
        "worker_queues": [
            {
                "name": "default",
                "id": "claaesqk7329542z1h9u8isby3",
                "is_default": true,
                "max_worker_count": 10,
                "min_worker_count": 0,
                "worker_concurrency": 16,
                "node_pool_id": "cl6zcnlc8395442eui99mvlqhv"
            }
        ],
        "metadata": {
            "deployment_id": "claaesqk6329512z1h8f62bn12",
            "workspace_id": "cl6wg2zra144002dyw8px6t6ip",
            "cluster_id": "cl6zcnlc600ht0vuibivf53jh",
            "release_name": "combusting-velocity-9074",
            "airflow_version": "2.4.2",
            "dag_deploy_enabled": false,
            "status": "HEALTHY",
            "created_at": "2022-11-10T01:46:26.55Z",
            "updated_at": "2022-11-11T18:05:22.567Z",
            "deployment_url": "cloud.astronomer-dev.io/cl6wg2zra144002dyw8px6t6ip/deployments/claaesqk6329512z1h8f62bn12/analytics",
            "webserver_url": "astronomer.astronomer-dev.run/df62bn12?orgId=org_dlgevirUCwI9vX10"
        },
        "alert_emails": []
    }
}

📸 Screenshots

Add screenshots to illustrate the validity of these changes.

📋 Checklist

  • Rebased from the main (or release if patching) branch (before testing)
  • Ran make test before taking out of draft
  • Ran make lint before taking out of draft
  • Added/updated applicable tests
  • Tested against Astro-API (if necessary).
  • Tested against Houston-API and Astronomer (if necessary).
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation

- `information` is now `metadata`
- `scheduler_replicas` is now `scheduler_count`
- `astronomer_variables` is now `environment_variables`
- re-order fields in the `deploymentMetadata` and `deploymentConfiguration` structs
- use `mapstructre.Decode()` to convert to struct once to get ordered output
- rename `getDeploymentInspectInfo()` o `getDeploymentInfo()`
@codecov
Copy link

codecov bot commented Nov 18, 2022

Codecov Report

Base: 87.19% // Head: 87.20% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (80f917e) compared to base (04bacf0).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #884   +/-   ##
=======================================
  Coverage   87.19%   87.20%           
=======================================
  Files         107      107           
  Lines        9107     9112    +5     
=======================================
+ Hits         7941     7946    +5     
  Misses        688      688           
  Partials      478      478           
Impacted Files Coverage Δ
cloud/deployment/inspect/inspect.go 98.36% <100.00%> (+0.07%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jemishp jemishp merged commit cbc88e4 into main Nov 18, 2022
@jemishp jemishp deleted the 876-changes-toastro-deployment-inspect branch November 18, 2022 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changes toastro deployment inspect
5 participants