fix-1909: handle default_pool updates with slots/include_deferred mask by bmanan7 · Pull Request #1940 · astronomer/astro-cli

Description

  • Update Airflow client to respect default_pool PATCH rules: send only slots and include_deferred with an update_mask.
  • Added a regression test so future changes keep the special-case behavior intact.

🎟 Issue(s)

Related #1909

🧪 Functional Testing

Tried copying pool with different slot values and number of pools and each request was successful. Attached screenshots from UI.

./astro deployment pool copy --source-id cme0XXXXXX --target-id cme0XXXXXX

Using an Astro API Token
Copying Pool default_pool
Copying Pool test-pool
Copying Pool second_pool
==============
./astro deployment pool copy --source-id cme0XXXXXX --target-id cme0XXXXXX

Using an Astro API Token
Copying Pool default_pool
Copying Pool test-pool
Copying Pool second_pool
Copying Pool Fourth-pool

go test -count=1 ./airflow-client
ok  	github.com/astronomer/astro-cli/airflow-client	0.667s

📸 Screenshots

Confirmed from UI that the default pool slot value is being updated and reflected without any errors.
image

image

📋 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] (https://github.com/astronomer/astronomer/) (if necessary). - NA
  • Communicated to/tagged owners of respective clients potentially impacted by these changes.
  • Updated any related documentation - NA