You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Subham-KRLX (via GitHub)" <gi...@apache.org> on 2026/01/10 05:10:24 UTC

[PR] Add test for sensitive config masking in airflowctl [airflow]

Subham-KRLX opened a new pull request, #60361:
URL: https://github.com/apache/airflow/pull/60361

   ## Description
   Added test to verify sensitive config values are properly masked when using airflowctl.
   
   The Airflow API already masks sensitive values (like `fernet_key`, `sql_alchemy_conn`) when returning config data. This test confirms that airflowctl correctly receives and displays those masked values.
   
   ## Changes
   - Added [test_config_sensitive_masking.py](cci:7://file:///Users/subhamsangwan/airflow/airflow-ctl/tests/airflow_ctl/api/test_config_sensitive_masking.py:0:0-0:0) 
   - Test mocks API response with masked sensitive values
   - Verifies `ConfigOperations.list()` handles masked data correctly
   
   ## Related Issue
   Closes #59843
   
   ## Testing
   ```bash
   pytest tests/airflow_ctl/api/test_config_sensitive_masking.py -v


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add test for sensitive config masking in airflowctl [airflow]

Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #60361:
URL: https://github.com/apache/airflow/pull/60361#issuecomment-3802113777

   In integration tests, we should consider creating different test cases (different file, we can still use debug mode as initiation) then usual happy path. Splitting the integration test over the test scenario paths could be easier to manage for integration tests.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add test for sensitive config masking in airflowctl [airflow]

Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #60361:
URL: https://github.com/apache/airflow/pull/60361#issuecomment-3819897585

   Could you please also update the description about AI usage? We have added a template that explains the AI usage on the solution
   
   ```
   Was generative AI tooling used to co-author this PR?
   Yes, explain which one or No
   ```


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add test for sensitive config masking in airflowctl [airflow]

Posted by "Subham-KRLX (via GitHub)" <gi...@apache.org>.
Subham-KRLX commented on PR #60361:
URL: https://github.com/apache/airflow/pull/60361#issuecomment-3797861578

   @bugraoz93 @potiuk I have reorganized the tests per your suggestions:
   
   Moved [test_config_list_masking_preservation()](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) to [test_config_command.py](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) (for CLI list command)
    Moved [test_get_masked_value()](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) to [test_operations.py](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) (for API get operation)
    Removed the standalone test file
   Fixed all static checks with prek
   The PR now follows the "one test per Python file" convention.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add test for sensitive config masking in airflowctl [airflow]

Posted by "Subham-KRLX (via GitHub)" <gi...@apache.org>.
Subham-KRLX commented on PR #60361:
URL: https://github.com/apache/airflow/pull/60361#issuecomment-3828860392

   @bugraoz93 All necessary changes have been made including the updated AI usage section in the description as requested.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add test for sensitive config masking in airflowctl [airflow]

Posted by "Subham-KRLX (via GitHub)" <gi...@apache.org>.
Subham-KRLX commented on PR #60361:
URL: https://github.com/apache/airflow/pull/60361#issuecomment-3802673948

   @bugraoz93 Thanks for the approval I will create a separate PR for the integration tests in airflow-ctl-tests. Will update this to `Relates #59843` and the new PR will `Closes #59843`.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add test for sensitive config masking in airflowctl [airflow]

Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 merged PR #60361:
URL: https://github.com/apache/airflow/pull/60361


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add test for sensitive config masking in airflowctl [airflow]

Posted by "Subham-KRLX (via GitHub)" <gi...@apache.org>.
Subham-KRLX commented on PR #60361:
URL: https://github.com/apache/airflow/pull/60361#issuecomment-3765143168

   @potiuk @bugraoz93 thanks for the review setup.
   This PR adds a focused test for airflowctl preserving API-masked sensitive configs (e.g. fernet_key, sql_alchemy_conn).
   One static check is failing (likely a minor lint/formatting issue post-force-push). Could you advise what to fix/add? Happy to iterate quickly to get it green.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add test for sensitive config masking in airflowctl [airflow]

Posted by "Subham-KRLX (via GitHub)" <gi...@apache.org>.
Subham-KRLX commented on PR #60361:
URL: https://github.com/apache/airflow/pull/60361#issuecomment-3828858639

   @bugraoz93 All necessary changes have been made including the updated AI usage section in the description as requested.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add test for sensitive config masking in airflowctl [airflow]

Posted by "bugraoz93 (via GitHub)" <gi...@apache.org>.
bugraoz93 commented on PR #60361:
URL: https://github.com/apache/airflow/pull/60361#issuecomment-3797258152

   We also have some under here for auto generated ones `tests/.../api/test_operations.py`. I think we should add test for get and export.
   
   Export will be on specific file in above message `test_config_command.py` and for get it should be in `test_operations.py`


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Add test for sensitive config masking in airflowctl [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on PR #60361:
URL: https://github.com/apache/airflow/pull/60361#issuecomment-3775574643

   You can use `prek` to fix it - just follow basic configuration of development environment / contributing docs to set it up and help you to fix the issues.
   
   It's actually even written in the error message - no need to post questions and wait for someone- better to read what error message says and apply the remediation it suggests.
   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org