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

Include active hibernation override info in deployment metadata #1597

Merged

Conversation

feluelle
Copy link
Member

@feluelle feluelle commented Mar 12, 2024

Description

Describe the purpose of this pull request.

🎟 Issue(s)

closes: #1575

🧪 Functional Testing

List the functional testing steps to confirm this feature or fix.

📸 Screenshots

Add screenshots to illustrate the validity of these changes.

For a deployment with override defined:

❯ ./astro deployment inspect cltwui4j6009401nwoqev94g7
deployment:
    configuration:
        name: create hosted dedicated
        description: desc
        runtime_version: 10.5.0
        dag_deploy_enabled: true
        ci_cd_enforcement: false
        scheduler_size: SMALL
        is_high_availability: false
        is_development_mode: true
        executor: CELERY
        scheduler_count: 1
        cluster_name: Sample AWS Cluster
        workspace_name: Sample Workspace 1
        deployment_type: DEDICATED
        cloud_provider: AWS
        region: ap-northeast-1
        default_task_pod_cpu: "0.25"
        default_task_pod_memory: 0.5Gi
        resource_quota_cpu: "2"
        resource_quota_memory: 4Gi
        workload_identity: ""
    worker_queues:
        - name: default
          max_worker_count: 4
          min_worker_count: 0
          worker_concurrency: 6
          worker_type: A10
    metadata:
        deployment_id: cltwui4j6009401nwoqev94g7
        workspace_id: cltwu72pz0198f7hgnnal41us
        cluster_id: cltwu71tx0004eehg6gnt39pc
        release_name: N/A
        airflow_version: 2.8.3
        current_tag: 10.5.0
        status: CREATING
        created_at: 2024-03-18T11:11:25.634Z
        updated_at: 2024-03-18T11:12:48.325Z
        deployment_url: cloud.astronomer-dev.io/cltwu72pz0198f7hgnnal41us/deployments/cltwui4j6009401nwoqev94g7/overview
        webserver_url: sampleorgpr19854-pr19854.astronomer-dev.run/dqev94g7?orgId=org_LL0XyTELYJS9ZOE0
        hibernation_override:
            is_hibernating: true
            override_until: 2100-01-01T00:00:00Z

For a deployment without override defined:

❯ ./astro deployment inspect cltwui4j6009401nwoqev94g7
deployment:
    configuration:
        name: create hosted dedicated
        description: desc
        runtime_version: 10.5.0
        dag_deploy_enabled: true
        ci_cd_enforcement: false
        scheduler_size: SMALL
        is_high_availability: false
        is_development_mode: true
        executor: CELERY
        scheduler_count: 1
        cluster_name: Sample AWS Cluster
        workspace_name: Sample Workspace 1
        deployment_type: DEDICATED
        cloud_provider: AWS
        region: ap-northeast-1
        default_task_pod_cpu: "0.25"
        default_task_pod_memory: 0.5Gi
        resource_quota_cpu: "2"
        resource_quota_memory: 4Gi
        workload_identity: ""
    worker_queues:
        - name: default
          max_worker_count: 4
          min_worker_count: 0
          worker_concurrency: 6
          worker_type: A10
    metadata:
        deployment_id: cltwui4j6009401nwoqev94g7
        workspace_id: cltwu72pz0198f7hgnnal41us
        cluster_id: cltwu71tx0004eehg6gnt39pc
        release_name: N/A
        airflow_version: 2.8.3
        current_tag: 10.5.0
        status: CREATING
        created_at: 2024-03-18T11:11:25.634Z
        updated_at: 2024-03-18T11:28:25.717Z
        deployment_url: cloud.astronomer-dev.io/cltwu72pz0198f7hgnnal41us/deployments/cltwui4j6009401nwoqev94g7/overview
        webserver_url: sampleorgpr19854-pr19854.astronomer-dev.run/dqev94g7?orgId=org_LL0XyTELYJS9ZOE0

📋 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

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.55%. Comparing base (847b57d) to head (ba98af8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1597   +/-   ##
=======================================
  Coverage   86.55%   86.55%           
=======================================
  Files         114      114           
  Lines       15935    15940    +5     
=======================================
+ Hits        13792    13797    +5     
  Misses       1288     1288           
  Partials      855      855           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@neel-astro neel-astro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link
Contributor

@kushalmalani kushalmalani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kushalmalani
Copy link
Contributor

@feluelle Is this good to merge?

@feluelle
Copy link
Member Author

I will manually test this to be sure.

@feluelle
Copy link
Member Author

I have found an issue on the core platform API side which holds me back from e2e testing it. The isHibernating field is missing from deployment response hibernation override field in platform API for some reason. I will look into that on Monday.

@feluelle
Copy link
Member Author

Works as expected. I have added the tests to the PR description. @kushalmalani feel free to merge.

@kushalmalani kushalmalani merged commit 2326208 into main Mar 18, 2024
4 of 5 checks passed
@kushalmalani kushalmalani deleted the feature/deployment-metadata-active-hibernation-override branch March 18, 2024 15:35
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.

Show hibernation override info on deployment inspect
4 participants