Fury0508 commented on PR #60193:
URL: https://github.com/apache/airflow/pull/60193#issuecomment-3777974472

   @bugraoz93 I've pushed additional changes to fix the failing CI tests. 
Here's a summary:
   
   ## Why these changes were needed:
   
   ### 1. `test_cli_config.py` - Skip `dest` check for positional args
   
   **Problem:** The test was asserting `arg.kwargs["dest"]` for all arguments, 
but positional arguments don't have an explicit `dest` in their kwargs - 
argparse automatically infers the `dest` from the argument name for positional 
args.
   
   **Fix:** Only check `dest` for optional arguments (those with `--` prefix):
   ```python
   if arg.flags[0].startswith("--"):  # Only optional args have explicit dest
       assert arg.kwargs["dest"] == test_arg[1]["dest"]
   ```
   
   ### 2. `test_airflowctl_commands.py` - Update integration tests syntax
   
   **Problem:** The integration tests were using the old flag-based syntax 
(`--connection-id=test_con`), but after my changes, required parameters are now 
positional.
   
   **Fix:** Updated commands to use positional syntax:
   
   | Old syntax | New syntax |
   |------------|-----------|
   | `assets create-event --asset-id=1` | `assets create-event 1` |
   | `connections create --connection-id=test_con --conn-type=mysql ...` | 
`connections create test_con mysql ...` |
   | `connections update --connection-id=test_con --conn-type=postgres` | 
`connections update test_con postgres` |
   | `pools create --name=test_pool --slots=5` | `pools create test_pool 5` |
   | `variables create --key=test_key --value=test_value` | `variables create 
test_key test_value` |
   | `variables update --key=test_key --value=updated_value` | `variables 
update test_key updated_value` |
   
   
   Could you please approve the workflows so CI can run? Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to