Skip to content

Read private key from env#338

Open
fmterrorf wants to merge 7 commits intoSnowflake-Labs:masterfrom
calmwave-open-source:read_private_key_from_env
Open

Read private key from env#338
fmterrorf wants to merge 7 commits intoSnowflake-Labs:masterfrom
calmwave-open-source:read_private_key_from_env

Conversation

@fmterrorf
Copy link

Adds an ability to read private key from an environment variable SNOWFLAKE_PRIVATE_KEY

@sfc-gh-twhite
Copy link
Collaborator

Thanks for the PR @fmterrorf! Ideally, we would like to leverage the environment variables for these credentials if possible.

Does providing those with either SNOWFLAKE_PRIVATE_KEY_PATH or SNOWFLAKE_PRIVATE_KEY_RAW work for you? These credential environment variables are documented at https://docs.snowflake.com/en/developer-guide/snowflake-cli/connecting/configure-connections#use-environment-variables-for-snowflake-credentials.

@fmterrorf
Copy link
Author

fmterrorf commented Aug 8, 2025

@sfc-gh-twhite I've tried SNOWFLAKE_PRIVATE_KEY_RAW but it does not seem to work. I'm avoiding SNOWFLAKE_PRIVATE_KEY_PATH since I don't want to write the private key file. The CLI has this line of code https://github.com/snowflakedb/snowflake-cli/blob/e62ddfcdbccbaa7d1b7a39d700c8d2e6945b9a8a/src/snowflake/cli/_app/snow_connector.py#L228-L230 that reads SNOWFLAKE_PRIVATE_KEY_RAW from the env variable. Schemachange don't have that currently

@sfc-gh-twhite
Copy link
Collaborator

@sfc-gh-twhite I've tried SNOWFLAKE_PRIVATE_KEY_RAW but it does not seem to work. I'm avoiding SNOWFLAKE_PRIVATE_KEY_PATH since I don't want to write the private key file. The CLI has this line of code https://github.com/snowflakedb/snowflake-cli/blob/e62ddfcdbccbaa7d1b7a39d700c8d2e6945b9a8a/src/snowflake/cli/_app/snow_connector.py#L228-L230 that reads SNOWFLAKE_PRIVATE_KEY_RAW from the env variable. Schemachange don't have that currently

Understood! Thank you for this info.

We have many open issues related to this topic, so I plan to address them this week. Noting here to check if the following will be resolved, as they seem similar:

@sfc-gh-tmathew sfc-gh-tmathew added the enhancement New feature or request label Aug 29, 2025
@andrew-davey
Copy link

@sfc-gh-twhite is there an ETA on when this enhancement will be released?

@sfc-gh-tmathew
Copy link
Collaborator

@andrew-davey 4.1.0 is going to be released soon. As for the specific private key issue, we will prioritize this immediately after 4.1.0 release this week and include it in the 4.2.0 release before the holidays in December.

Thank you for your contribution. Once 4.1.0 is released, if you could update your contribution to be based on as an bug fix to 4.1.0 would be appreciated.

@sfc-gh-tmathew
Copy link
Collaborator

@fmterrorf 4.1.0 has addressed backward compatibility with mismatched variable names in favor of aligning with python connector's parameter names. Could you retest this PR against 4.1.0 and confirm if you still need to merge this PR or can close this out.

We sincerely appreciate your patience and your contribution to the project. We are trying to streamline a predictable release cadence and staying on top of requests and will need time to catch up.

Kindly respond back with your tests and resolving the merge conflict if you want the PR to be merged to master.

@sfc-gh-tmathew sfc-gh-tmathew added Under Review This is being discussed without planned changes community-contribution Submitted by community target: 4.2.0 Planned for 4.2.0 release and removed Under Review This is being discussed without planned changes labels Nov 18, 2025
@sfc-gh-tmathew sfc-gh-tmathew changed the base branch from master to rc4.2.0 November 18, 2025 21:24
Copy link
Collaborator

@sfc-gh-tmathew sfc-gh-tmathew left a comment

Choose a reason for hiding this comment

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

Could you attempt to resolve the merge conflicts and let us know soon enough to include the PR in 4.2.0 OR we can slate it for a later release.

@sfc-gh-tmathew sfc-gh-tmathew changed the base branch from rc4.2.0 to master November 18, 2025 21:33
@fmterrorf
Copy link
Author

@sfc-gh-tmathew sorry i currently don't have time to do so. I'll probably get to it this weekend

@sfc-gh-tmathew sfc-gh-tmathew added target: 4.4.0 Planned for 4.4.0 release and removed target: 4.2.0 Planned for 4.2.0 release labels Feb 9, 2026
@sfc-gh-tmathew
Copy link
Collaborator

sfc-gh-tmathew commented Feb 9, 2026

Hi @fmterrorf,

Thank you for this contribution! Reading the private key directly from SNOWFLAKE_PRIVATE_KEY environment variable is a useful addition for containerized deployments and CI/CD pipelines.

This addresses the use case from issue #252 (though we had marked it "won't fix" due to preferring file-based auth, this approach is cleaner than we initially thought).

Target: 4.4.0

Action needed: This PR has merge conflicts with master after our 4.3.0 release. Could you please rebase?

Once rebased, we'll do a final review and merge. Thanks!

@seth
Copy link

seth commented Feb 9, 2026

That's great to hear. We'll aim to get this branch cleaned up/rebased this week.

@sfc-gh-tmathew
Copy link
Collaborator

Thanks @seth. Here is a discussion that may be considered before attempting to rebase the PR. FYI please.

@fmterrorf fmterrorf force-pushed the read_private_key_from_env branch 3 times, most recently from a2afa09 to dbba8ff Compare February 10, 2026 20:54
@fmterrorf
Copy link
Author

@sfc-gh-tmathew I've updated the branch. I looked at the discussion you included and it looks it's using a temporary file to read the private keys from. We want to avoid that and would like to use the env var.

@sfc-gh-tmathew sfc-gh-tmathew changed the base branch from master to rc4.4.0 February 11, 2026 00:08
@sfc-gh-tmathew sfc-gh-tmathew dismissed their stale review February 11, 2026 00:10

Merge conflict has been resolved. and moving the changes into rc4.4.0 branch

@sfc-gh-tmathew sfc-gh-tmathew changed the base branch from rc4.4.0 to master February 11, 2026 00:36
Copy link
Collaborator

@sfc-gh-tmathew sfc-gh-tmathew left a comment

Choose a reason for hiding this comment

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

Review: Changes Requested

Thanks for the contribution @fmterrorf! This is a useful feature for CI/CD pipelines where storing keys in env vars is preferred over files. A few items to address before merging:

Code Issues

  1. Incorrect return type annotation (utils.py:1076)

    # Current
    def get_snowflake_private_key() -> str | PrivateKeyTypes:
    
    # Should be
    def get_snowflake_private_key() -> PrivateKeyTypes | None:
  2. Redundant condition (utils.py:1079)

    # Current
    if snowflake_private_key is not None and snowflake_private_key:
    
    # Simplify to
    if snowflake_private_key:
  3. Precedence conflict (DeployConfig.py:289-291)
    If both SNOWFLAKE_PRIVATE_KEY_PEM and SNOWFLAKE_PRIVATE_KEY_FILE/SNOWFLAKE_PRIVATE_KEY_PATH are set, both get passed to the session.

    Priority decision: Inline PEM (private_key) should take precedence over file-based (private_key_file). Update to remove file-based params when inline PEM is provided:

    snowflake_private_key = get_snowflake_private_key()
    if snowflake_private_key:
        session_kwargs["private_key"] = snowflake_private_key
        # Inline PEM takes precedence over file-based key
        session_kwargs.pop("private_key_file", None)
        session_kwargs.pop("private_key_file_pwd", None)

Naming Convention

  1. Rename env var to SNOWFLAKE_PRIVATE_KEY_PEM

    The current name SNOWFLAKE_PRIVATE_KEY is ambiguous. While the Snowflake connector does accept a private_key parameter directly, it expects an already-deserialized key object (bytes | str | RSAPrivateKey). This env var contains raw PEM content that schemachange deserializes before passing to the connector.

    Recommend renaming to SNOWFLAKE_PRIVATE_KEY_PEM to:

    • Maintain consistency with sibling SNOWFLAKE_PRIVATE_KEY_PATH
    • Make the expected format explicit (PEM-encoded content)
    • Distinguish from a direct pass-through parameter

Missing Items

  1. Unit tests - Please add tests for get_snowflake_private_key() covering:

    • Valid PEM key in env var
    • Empty/missing env var returns None
    • Invalid PEM content (error handling)
  2. Documentation - Update README to document the new SNOWFLAKE_PRIVATE_KEY_PEM environment variable

Optional

  1. Cryptography dependency - ~=45.0.5 is quite restrictive. Consider >=45.0.5,<47 or relying on snowflake-connector-python's existing cryptography dependency to avoid version conflicts.

Reminder: Before pushing your changes, please run:

pre-commit run --all-files
pytest

This will ensure linting, formatting, and tests pass before CI runs.

@fmterrorf
Copy link
Author

I'm going to add Documentation as well as Unit test in this PR. I tried running pytest on the master branch and I'm seeing failures on tests/session/test_Script.py.

Error log

pytest
=========================================================================================================================================== test session starts ============================================================================================================================================
platform darwin -- Python 3.13.7, pytest-9.0.1, pluggy-1.6.0
rootdir: /Users/daven/Documents/Calmwave/snowflake-repo/schemachange
configfile: pyproject.toml
testpaths: tests
collected 602 items

tests/config/test_ChangeHistoryTable.py .......                                                                                                                                                                                                                                                      [  1%]
tests/config/test_DeployConfig.py ...................                                                                                                                                                                                                                                                [  4%]
tests/config/test_RenderConfig.py .                                                                                                                                                                                                                                                                  [  4%]
tests/config/test_VerifyConfig.py ..........                                                                                                                                                                                                                                                         [  6%]
tests/config/test_connections_toml_private_key_loading.py ......                                                                                                                                                                                                                                     [  7%]
tests/config/test_edge_cases.py .................................                                                                                                                                                                                                                                    [ 12%]
tests/config/test_env_var_expansion.py .............                                                                                                                                                                                                                                                 [ 14%]
tests/config/test_get_config_secrets.py ................                                                                                                                                                                                                                                             [ 17%]
tests/config/test_get_merged_config.py ..................................................                                                                                                                                                                                                            [ 25%]
tests/config/test_get_yaml_config.py ....                                                                                                                                                                                                                                                            [ 26%]
tests/config/test_issue388_connections_toml_loading.py ....                                                                                                                                                                                                                                          [ 27%]
tests/config/test_parse_cli_args.py ..............                                                                                                                                                                                                                                                   [ 29%]
tests/config/test_short_forms_integration.py ...................                                                                                                                                                                                                                                     [ 32%]
tests/config/test_utils.py ............................................................................................                                                                                                                                                                              [ 47%]
tests/session/test_Script.py .........................EEEEEEEEEEEEEEEEEEEEEEEEEEEE............                                                                                                                                                                                                       [ 58%]
tests/session/test_SnowflakeSession.py ................................                                                                                                                                                                                                                              [ 63%]
tests/session/test_session_parameters.py .....                                                                                                                                                                                                                                                       [ 64%]
tests/session/test_uppercase_extensions.py .....                                                                                                                                                                                                                                                     [ 65%]
tests/test_JinjaEnvVar.py ....                                                                                                                                                                                                                                                                       [ 66%]
tests/test_JinjaTemplateProcessor.py .............................................                                                                                                                                                                                                                   [ 73%]
tests/test_ScriptExecutionError.py .........                                                                                                                                                                                                                                                         [ 75%]
tests/test_cli_misc.py ..........................                                                                                                                                                                                                                                                    [ 79%]
tests/test_cli_script_executor.py ..................................                                                                                                                                                                                                                                 [ 85%]
tests/test_issue_401_pat_exposure.py ....                                                                                                                                                                                                                                                            [ 85%]
tests/test_main.py .............                                                                                                                                                                                                                                                                     [ 88%]
tests/test_no_color.py ..                                                                                                                                                                                                                                                                            [ 88%]
tests/test_out_of_order.py ...........................                                                                                                                                                                                                                                               [ 92%]
tests/test_private_key_passphrase_redaction.py ....                                                                                                                                                                                                                                                  [ 93%]
tests/test_redact_config_secrets.py .....................................                                                                                                                                                                                                                            [ 99%]
tests/test_verify_deploy_auth_equivalence.py ..                                                                                                                                                                                                                                                      [100%]

================================================================================================================================================== ERRORS ==================================================================================================================================================
________________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_empty_folder_should_return_empty ________________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 165
      def test_given_empty_folder_should_return_empty(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:165
___________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_just_non_change_files_should_return_empty ____________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 171
      def test_given_just_non_change_files_should_return_empty(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:171
_______________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_version_number_regex_numeric_happy_path ________________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 183
      def test_version_number_regex_numeric_happy_path(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:183
________________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_version_number_regex_numeric_exception ________________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 198
      def test_version_number_regex_numeric_exception(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:198
_________________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_version_number_regex_text_happy_path _________________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 207
      def test_version_number_regex_text_happy_path(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:207
_________________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_version_number_regex_text_exception __________________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 217
      def test_version_number_regex_text_exception(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:217
___________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_version_files_should_return_version_files ____________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 226
      def test_given_version_files_should_return_version_files(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:226
___________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_same_version_twice_should_raise_exception ____________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 237
      def test_given_same_version_twice_should_raise_exception(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:237
_________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_single_version_file_should_extract_attributes __________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 246
      def test_given_single_version_file_should_extract_attributes(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:246
______________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_single_version_jinja_file_should_extract_attributes _______________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 259
      def test_given_single_version_jinja_file_should_extract_attributes(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:259
___________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_same_version_file_with_and_without_jinja_extension_should_raise_exception ____________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 272
      def test_given_same_version_file_with_and_without_jinja_extension_should_raise_exception(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:272
____________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_always_files_should_return_always_files _____________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 283
      def test_given_always_files_should_return_always_files(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:283
____________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_same_always_file_should_raise_exception _____________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 295
      def test_given_same_always_file_should_raise_exception(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:295
__________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_single_always_file_should_extract_attributes __________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 304
      def test_given_single_always_file_should_extract_attributes(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:304
_______________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_single_always_jinja_file_should_extract_attributes _______________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 315
      def test_given_single_always_jinja_file_should_extract_attributes(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:315
____________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_same_always_file_with_and_without_jinja_extension_should_raise_exception ____________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 326
      def test_given_same_always_file_with_and_without_jinja_extension_should_raise_exception(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:326
________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_repeatable_files_should_return_repeatable_files _________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 338
      def test_given_repeatable_files_should_return_repeatable_files(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:338
__________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_same_repeatable_file_should_raise_exception ___________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 349
      def test_given_same_repeatable_file_should_raise_exception(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:349
________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_single_repeatable_file_should_extract_attributes ________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 356
      def test_given_single_repeatable_file_should_extract_attributes(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:356
_____________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_single_repeatable_jinja_file_should_extract_attributes _____________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 367
      def test_given_single_repeatable_jinja_file_should_extract_attributes(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:367
__________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_same_repeatable_file_with_and_without_jinja_extension_should_raise_exception __________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 378
      def test_given_same_repeatable_file_with_and_without_jinja_extension_should_raise_exception(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:378
_____________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_cli_versioned_files_should_return_cli_versioned_files ______________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 389
      def test_given_cli_versioned_files_should_return_cli_versioned_files(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:389
____________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_cli_repeatable_files_should_return_cli_repeatable_files _____________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 401
      def test_given_cli_repeatable_files_should_return_cli_repeatable_files(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:401
________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_cli_always_files_should_return_cli_always_files _________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 410
      def test_given_cli_always_files_should_return_cli_always_files(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:410
_______________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_cli_versioned_jinja_file_should_extract_attributes _______________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 419
      def test_given_cli_versioned_jinja_file_should_extract_attributes(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:419
___________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_given_mixed_sql_and_cli_files_should_return_both ___________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 432
      def test_given_mixed_sql_and_cli_files_should_return_both(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:432
_________________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_cli_version_number_regex_should_apply_to_cli_scripts _________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 447
      def test_cli_version_number_regex_should_apply_to_cli_scripts(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:447
_______________________________________________________________________________________________ ERROR at setup of TestGetAllScriptsRecursively.test_cli_version_number_regex_invalid_should_raise_exception ________________________________________________________________________________________________
file /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py, line 456
      def test_cli_version_number_regex_invalid_should_raise_exception(self, fs):
E       fixture 'fs' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, capteesys, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, subtests, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/session/test_Script.py:456
============================================================================================================================================= warnings summary =============================================================================================================================================
tests/config/test_DeployConfig.py::test_authentication_parameters_cli_takes_precedence_over_env
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_DeployConfig.py:276: DeprecationWarning: DEPRECATION WARNING: 'private_key_path' is deprecated. Please use 'private_key_file' instead to match the Snowflake Python Connector parameter name. Update your configuration:
    - CLI: Use --snowflake-private-key-file instead of --snowflake-private-key-path
    - ENV: Use SNOWFLAKE_PRIVATE_KEY_FILE instead of SNOWFLAKE_PRIVATE_KEY_PATH
    - connections.toml: Use private_key_file instead of private_key_path
    - YAML: Use snowflake-private-key-file instead of snowflake-private-key-path
  'private_key_path' will be removed in a future version.
    session_kwargs = config.get_session_kwargs()

tests/config/test_DeployConfig.py::test_authentication_parameters_cli_takes_precedence_over_env
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_DeployConfig.py:276: DeprecationWarning: DEPRECATION WARNING: 'private_key_passphrase' is deprecated. Please use 'private_key_file_pwd' instead to match the Snowflake Python Connector parameter name. Update your configuration:
    - ENV: Use SNOWFLAKE_PRIVATE_KEY_FILE_PWD instead of SNOWFLAKE_PRIVATE_KEY_PASSPHRASE
    - connections.toml: Use private_key_file_pwd instead of private_key_passphrase
    - YAML: Use snowflake-private-key-file-pwd instead of snowflake-private-key-passphrase
  'private_key_passphrase' will be removed in a future version.
    session_kwargs = config.get_session_kwargs()

tests/config/test_DeployConfig.py::test_authentication_parameters_fallback_to_env
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_DeployConfig.py:305: DeprecationWarning: DEPRECATION WARNING: 'private_key_path' is deprecated. Please use 'private_key_file' instead to match the Snowflake Python Connector parameter name. Update your configuration:
    - CLI: Use --snowflake-private-key-file instead of --snowflake-private-key-path
    - ENV: Use SNOWFLAKE_PRIVATE_KEY_FILE instead of SNOWFLAKE_PRIVATE_KEY_PATH
    - connections.toml: Use private_key_file instead of private_key_path
    - YAML: Use snowflake-private-key-file instead of snowflake-private-key-path
  'private_key_path' will be removed in a future version.
    session_kwargs = config.get_session_kwargs()

tests/config/test_DeployConfig.py::test_deploy_config_expands_tilde_in_private_key_path
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_DeployConfig.py:326: DeprecationWarning: DEPRECATION WARNING: 'private_key_path' is deprecated. Please use 'private_key_file' instead to match the Snowflake Python Connector parameter name. Update your configuration:
    - CLI: Use --snowflake-private-key-file instead of --snowflake-private-key-path
    - ENV: Use SNOWFLAKE_PRIVATE_KEY_FILE instead of SNOWFLAKE_PRIVATE_KEY_PATH
    - connections.toml: Use private_key_file instead of private_key_path
    - YAML: Use snowflake-private-key-file instead of snowflake-private-key-path
  'private_key_path' will be removed in a future version.
    session_kwargs = config.get_session_kwargs()

tests/config/test_DeployConfig.py::test_deploy_config_expands_tilde_in_private_key_path_from_env
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_DeployConfig.py:346: DeprecationWarning: DEPRECATION WARNING: 'private_key_path' is deprecated. Please use 'private_key_file' instead to match the Snowflake Python Connector parameter name. Update your configuration:
    - CLI: Use --snowflake-private-key-file instead of --snowflake-private-key-path
    - ENV: Use SNOWFLAKE_PRIVATE_KEY_FILE instead of SNOWFLAKE_PRIVATE_KEY_PATH
    - connections.toml: Use private_key_file instead of private_key_path
    - YAML: Use snowflake-private-key-file instead of snowflake-private-key-path
  'private_key_path' will be removed in a future version.
    session_kwargs = config.get_session_kwargs()

tests/config/test_VerifyConfig.py::test_verify_config_cli_auth_takes_precedence_over_env
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_VerifyConfig.py:128: DeprecationWarning: DEPRECATION WARNING: 'private_key_path' is deprecated. Please use 'private_key_file' instead to match the Snowflake Python Connector parameter name. Update your configuration:
    - CLI: Use --snowflake-private-key-file instead of --snowflake-private-key-path
    - ENV: Use SNOWFLAKE_PRIVATE_KEY_FILE instead of SNOWFLAKE_PRIVATE_KEY_PATH
    - connections.toml: Use private_key_file instead of private_key_path
    - YAML: Use snowflake-private-key-file instead of snowflake-private-key-path
  'private_key_path' will be removed in a future version.
    session_kwargs = config.get_session_kwargs()

tests/config/test_VerifyConfig.py::test_verify_config_expands_tilde_in_private_key_path
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_VerifyConfig.py:176: DeprecationWarning: DEPRECATION WARNING: 'private_key_path' is deprecated. Please use 'private_key_file' instead to match the Snowflake Python Connector parameter name. Update your configuration:
    - CLI: Use --snowflake-private-key-file instead of --snowflake-private-key-path
    - ENV: Use SNOWFLAKE_PRIVATE_KEY_FILE instead of SNOWFLAKE_PRIVATE_KEY_PATH
    - connections.toml: Use private_key_file instead of private_key_path
    - YAML: Use snowflake-private-key-file instead of snowflake-private-key-path
  'private_key_path' will be removed in a future version.
    session_kwargs = config.get_session_kwargs()

tests/config/test_VerifyConfig.py::test_verify_config_expands_tilde_in_private_key_path_from_env
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_VerifyConfig.py:196: DeprecationWarning: DEPRECATION WARNING: 'private_key_path' is deprecated. Please use 'private_key_file' instead to match the Snowflake Python Connector parameter name. Update your configuration:
    - CLI: Use --snowflake-private-key-file instead of --snowflake-private-key-path
    - ENV: Use SNOWFLAKE_PRIVATE_KEY_FILE instead of SNOWFLAKE_PRIVATE_KEY_PATH
    - connections.toml: Use private_key_file instead of private_key_path
    - YAML: Use snowflake-private-key-file instead of snowflake-private-key-path
  'private_key_path' will be removed in a future version.
    session_kwargs = config.get_session_kwargs()

tests/config/test_connections_toml_private_key_loading.py::TestConnectionsTomlPrivateKeyLoading::test_private_key_file_pwd_loaded_from_connections_toml
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_connections_toml_private_key_loading.py:77: UserWarning:
  SECURITY WARNING: connections.toml file has insecure permissions!
    File: /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_private_key_file_pwd_load0/connections.toml
    Current permissions: 0o644
    Recommended: 0o600 (read/write for owner only)

  To fix, run:
    chmod 600 /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_private_key_file_pwd_load0/connections.toml

  This file may contain sensitive credentials and should only be
  readable by the file owner.

    config = get_merged_config(logger=logger)

tests/config/test_connections_toml_private_key_loading.py::TestConnectionsTomlPrivateKeyLoading::test_private_key_file_loaded_from_connections_toml
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_connections_toml_private_key_loading.py:136: UserWarning:
  SECURITY WARNING: connections.toml file has insecure permissions!
    File: /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_private_key_file_loaded_f0/connections.toml
    Current permissions: 0o644
    Recommended: 0o600 (read/write for owner only)

  To fix, run:
    chmod 600 /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_private_key_file_loaded_f0/connections.toml

  This file may contain sensitive credentials and should only be
  readable by the file owner.

    config = get_merged_config(logger=logger)

tests/config/test_connections_toml_private_key_loading.py::TestConnectionsTomlPrivateKeyLoading::test_legacy_private_key_passphrase_still_works
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_connections_toml_private_key_loading.py:194: UserWarning:
  SECURITY WARNING: connections.toml file has insecure permissions!
    File: /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_legacy_private_key_passph0/connections.toml
    Current permissions: 0o644
    Recommended: 0o600 (read/write for owner only)

  To fix, run:
    chmod 600 /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_legacy_private_key_passph0/connections.toml

  This file may contain sensitive credentials and should only be
  readable by the file owner.

    config = get_merged_config(logger=logger)

tests/config/test_connections_toml_private_key_loading.py::TestConnectionsTomlPrivateKeyLoading::test_new_params_take_precedence_over_legacy
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_connections_toml_private_key_loading.py:254: UserWarning:
  SECURITY WARNING: connections.toml file has insecure permissions!
    File: /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_new_params_take_precedenc0/connections.toml
    Current permissions: 0o644
    Recommended: 0o600 (read/write for owner only)

  To fix, run:
    chmod 600 /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_new_params_take_precedenc0/connections.toml

  This file may contain sensitive credentials and should only be
  readable by the file owner.

    config = get_merged_config(logger=logger)

tests/config/test_connections_toml_private_key_loading.py::TestConnectionsTomlPrivateKeyLoading::test_verify_and_deploy_load_identically_from_connections_toml
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_connections_toml_private_key_loading.py:311: UserWarning:
  SECURITY WARNING: connections.toml file has insecure permissions!
    File: /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_verify_and_deploy_load_id0/connections.toml
    Current permissions: 0o644
    Recommended: 0o600 (read/write for owner only)

  To fix, run:
    chmod 600 /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_verify_and_deploy_load_id0/connections.toml

  This file may contain sensitive credentials and should only be
  readable by the file owner.

    verify_config = get_merged_config(logger=logger)

tests/config/test_connections_toml_private_key_loading.py::TestConnectionsTomlPrivateKeyLoading::test_verify_and_deploy_load_identically_from_connections_toml
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_connections_toml_private_key_loading.py:324: UserWarning:
  SECURITY WARNING: connections.toml file has insecure permissions!
    File: /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_verify_and_deploy_load_id0/connections.toml
    Current permissions: 0o644
    Recommended: 0o600 (read/write for owner only)

  To fix, run:
    chmod 600 /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_verify_and_deploy_load_id0/connections.toml

  This file may contain sensitive credentials and should only be
  readable by the file owner.

    deploy_config = get_merged_config(logger=logger)

tests/config/test_connections_toml_private_key_loading.py::TestConnectionsTomlPrivateKeyLoading::test_passphrase_not_in_additional_snowflake_params
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_connections_toml_private_key_loading.py:392: UserWarning:
  SECURITY WARNING: connections.toml file has insecure permissions!
    File: /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_passphrase_not_in_additio0/connections.toml
    Current permissions: 0o644
    Recommended: 0o600 (read/write for owner only)

  To fix, run:
    chmod 600 /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_passphrase_not_in_additio0/connections.toml

  This file may contain sensitive credentials and should only be
  readable by the file owner.

    config = get_merged_config(logger=logger)

tests/config/test_issue388_connections_toml_loading.py::TestIssue388ConnectionsTomlLoading::test_private_key_file_pwd_loaded_from_connections_toml
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_issue388_connections_toml_loading.py:62: UserWarning:
  SECURITY WARNING: connections.toml file has insecure permissions!
    File: /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_private_key_file_pwd_load1/connections.toml
    Current permissions: 0o644
    Recommended: 0o600 (read/write for owner only)

  To fix, run:
    chmod 600 /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_private_key_file_pwd_load1/connections.toml

  This file may contain sensitive credentials and should only be
  readable by the file owner.

    config = get_merged_config(logger=logger)

tests/config/test_issue388_connections_toml_loading.py::TestIssue388ConnectionsTomlLoading::test_private_key_file_loaded_from_connections_toml
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_issue388_connections_toml_loading.py:119: UserWarning:
  SECURITY WARNING: connections.toml file has insecure permissions!
    File: /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_private_key_file_loaded_f1/connections.toml
    Current permissions: 0o644
    Recommended: 0o600 (read/write for owner only)

  To fix, run:
    chmod 600 /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_private_key_file_loaded_f1/connections.toml

  This file may contain sensitive credentials and should only be
  readable by the file owner.

    config = get_merged_config(logger=logger)

tests/config/test_issue388_connections_toml_loading.py::TestIssue388ConnectionsTomlLoading::test_legacy_private_key_passphrase_still_works
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_issue388_connections_toml_loading.py:174: UserWarning:
  SECURITY WARNING: connections.toml file has insecure permissions!
    File: /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_legacy_private_key_passph1/connections.toml
    Current permissions: 0o644
    Recommended: 0o600 (read/write for owner only)

  To fix, run:
    chmod 600 /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_legacy_private_key_passph1/connections.toml

  This file may contain sensitive credentials and should only be
  readable by the file owner.

    config = get_merged_config(logger=logger)

tests/config/test_issue388_connections_toml_loading.py::TestIssue388ConnectionsTomlLoading::test_new_params_take_precedence_over_legacy
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_issue388_connections_toml_loading.py:229: UserWarning:
  SECURITY WARNING: connections.toml file has insecure permissions!
    File: /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_new_params_take_precedenc1/connections.toml
    Current permissions: 0o644
    Recommended: 0o600 (read/write for owner only)

  To fix, run:
    chmod 600 /private/tmp/nix-shell-63961-0/pytest-of-daven/pytest-0/test_new_params_take_precedenc1/connections.toml

  This file may contain sensitive credentials and should only be
  readable by the file owner.

    config = get_merged_config(logger=logger)

tests/config/test_utils.py::test_get_snowflake_password[env_vars3-my-password]
tests/config/test_utils.py::test_get_snowflake_password[env_vars4-my-password]
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/schemachange/config/utils.py:435: DeprecationWarning: The SNOWSQL_PWD environment variable is deprecated and will be removed in a later version of schemachange. Please use SNOWFLAKE_PASSWORD instead.
    snowsql_pwd = get_snowsql_pwd()

tests/config/test_utils.py::test_get_snowflake_password[env_vars4-my-password]
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/config/test_utils.py:48: DeprecationWarning: Environment variables SNOWFLAKE_PASSWORD and SNOWSQL_PWD are both present, using SNOWFLAKE_PASSWORD
    result = get_snowflake_password()

tests/test_main.py::test_main_deploy_subcommand_given_arguments_make_sure_arguments_set_on_call[deploy: all cli argument names]
tests/test_main.py::test_main_deploy_subcommand_given_arguments_make_sure_arguments_set_on_call[deploy: all cli argument flags]
tests/test_main.py::test_main_deploy_subcommand_given_arguments_make_sure_arguments_set_on_call[deploy: all env_vars and all cli argument names]
tests/test_main.py::test_main_deploy_subcommand_given_arguments_make_sure_arguments_set_on_call[render: all cli argument names]
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/schemachange/config/parse_cli_args.py:532: UserWarning: Argument ['-v', '--verbose'] is deprecated and will be interpreted as a DEBUG log level.
    deprecate_verbose(args=args, verbose=verbose, parsed_args=parsed_args)

tests/test_private_key_passphrase_redaction.py::TestPrivateKeyPassphraseRedaction::test_verify_command_debug_logs_do_not_expose_legacy_passphrase
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/schemachange/cli.py:74: DeprecationWarning: DEPRECATION WARNING: 'private_key_passphrase' is deprecated. Please use 'private_key_file_pwd' instead to match the Snowflake Python Connector parameter name. Update your configuration:
    - ENV: Use SNOWFLAKE_PRIVATE_KEY_FILE_PWD instead of SNOWFLAKE_PRIVATE_KEY_PASSPHRASE
    - connections.toml: Use private_key_file_pwd instead of private_key_passphrase
    - YAML: Use snowflake-private-key-file-pwd instead of snowflake-private-key-passphrase
  'private_key_passphrase' will be removed in a future version.
    session_kwargs = config.get_session_kwargs()

tests/test_verify_deploy_auth_equivalence.py::TestVerifyDeployAuthEquivalence::test_verify_and_deploy_produce_identical_session_kwargs[private_key_with_legacy_parameter_names]
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/test_verify_deploy_auth_equivalence.py:84: DeprecationWarning: DEPRECATION WARNING: 'private_key_path' is deprecated. Please use 'private_key_file' instead to match the Snowflake Python Connector parameter name. Update your configuration:
    - CLI: Use --snowflake-private-key-file instead of --snowflake-private-key-path
    - ENV: Use SNOWFLAKE_PRIVATE_KEY_FILE instead of SNOWFLAKE_PRIVATE_KEY_PATH
    - connections.toml: Use private_key_file instead of private_key_path
    - YAML: Use snowflake-private-key-file instead of snowflake-private-key-path
  'private_key_path' will be removed in a future version.
    verify_kwargs = verify_config.get_session_kwargs()

tests/test_verify_deploy_auth_equivalence.py::TestVerifyDeployAuthEquivalence::test_verify_and_deploy_produce_identical_session_kwargs[private_key_with_legacy_parameter_names]
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/test_verify_deploy_auth_equivalence.py:84: DeprecationWarning: DEPRECATION WARNING: 'private_key_passphrase' is deprecated. Please use 'private_key_file_pwd' instead to match the Snowflake Python Connector parameter name. Update your configuration:
    - ENV: Use SNOWFLAKE_PRIVATE_KEY_FILE_PWD instead of SNOWFLAKE_PRIVATE_KEY_PASSPHRASE
    - connections.toml: Use private_key_file_pwd instead of private_key_passphrase
    - YAML: Use snowflake-private-key-file-pwd instead of snowflake-private-key-passphrase
  'private_key_passphrase' will be removed in a future version.
    verify_kwargs = verify_config.get_session_kwargs()

tests/test_verify_deploy_auth_equivalence.py::TestVerifyDeployAuthEquivalence::test_verify_and_deploy_produce_identical_session_kwargs[private_key_with_legacy_parameter_names]
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/test_verify_deploy_auth_equivalence.py:85: DeprecationWarning: DEPRECATION WARNING: 'private_key_path' is deprecated. Please use 'private_key_file' instead to match the Snowflake Python Connector parameter name. Update your configuration:
    - CLI: Use --snowflake-private-key-file instead of --snowflake-private-key-path
    - ENV: Use SNOWFLAKE_PRIVATE_KEY_FILE instead of SNOWFLAKE_PRIVATE_KEY_PATH
    - connections.toml: Use private_key_file instead of private_key_path
    - YAML: Use snowflake-private-key-file instead of snowflake-private-key-path
  'private_key_path' will be removed in a future version.
    deploy_kwargs = deploy_config.get_session_kwargs()

tests/test_verify_deploy_auth_equivalence.py::TestVerifyDeployAuthEquivalence::test_verify_and_deploy_produce_identical_session_kwargs[private_key_with_legacy_parameter_names]
  /Users/daven/Documents/Calmwave/snowflake-repo/schemachange/tests/test_verify_deploy_auth_equivalence.py:85: DeprecationWarning: DEPRECATION WARNING: 'private_key_passphrase' is deprecated. Please use 'private_key_file_pwd' instead to match the Snowflake Python Connector parameter name. Update your configuration:
    - ENV: Use SNOWFLAKE_PRIVATE_KEY_FILE_PWD instead of SNOWFLAKE_PRIVATE_KEY_PASSPHRASE
    - connections.toml: Use private_key_file_pwd instead of private_key_passphrase
    - YAML: Use snowflake-private-key-file-pwd instead of snowflake-private-key-passphrase
  'private_key_passphrase' will be removed in a future version.
    deploy_kwargs = deploy_config.get_session_kwargs()

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================================================================================= short test summary info ==========================================================================================================================================
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_empty_folder_should_return_empty
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_just_non_change_files_should_return_empty
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_version_number_regex_numeric_happy_path
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_version_number_regex_numeric_exception
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_version_number_regex_text_happy_path
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_version_number_regex_text_exception
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_version_files_should_return_version_files
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_same_version_twice_should_raise_exception
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_single_version_file_should_extract_attributes
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_single_version_jinja_file_should_extract_attributes
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_same_version_file_with_and_without_jinja_extension_should_raise_exception
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_always_files_should_return_always_files
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_same_always_file_should_raise_exception
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_single_always_file_should_extract_attributes
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_single_always_jinja_file_should_extract_attributes
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_same_always_file_with_and_without_jinja_extension_should_raise_exception
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_repeatable_files_should_return_repeatable_files
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_same_repeatable_file_should_raise_exception
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_single_repeatable_file_should_extract_attributes
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_single_repeatable_jinja_file_should_extract_attributes
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_same_repeatable_file_with_and_without_jinja_extension_should_raise_exception
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_cli_versioned_files_should_return_cli_versioned_files
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_cli_repeatable_files_should_return_cli_repeatable_files
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_cli_always_files_should_return_cli_always_files
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_cli_versioned_jinja_file_should_extract_attributes
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_given_mixed_sql_and_cli_files_should_return_both
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_cli_version_number_regex_should_apply_to_cli_scripts
ERROR tests/session/test_Script.py::TestGetAllScriptsRecursively::test_cli_version_number_regex_invalid_should_raise_exception
=============================================================================================================================== 574 passed, 31 warnings, 28 errors in 3.56s ================================================================================================================================
(schemachange)

@fmterrorf fmterrorf force-pushed the read_private_key_from_env branch from fcb6efb to 2f9e6bb Compare February 17, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Submitted by community enhancement New feature or request target: 4.4.0 Planned for 4.4.0 release

Projects

None yet

5 participants