Skip to content

SNOW-3342254: Extended network logging on v4.4.0#2858

Draft
sfc-gh-fpawlowski wants to merge 19 commits into
v4.4.0-basefrom
SNOW-3342254-extended-logs
Draft

SNOW-3342254: Extended network logging on v4.4.0#2858
sfc-gh-fpawlowski wants to merge 19 commits into
v4.4.0-basefrom
SNOW-3342254-extended-logs

Conversation

@sfc-gh-fpawlowski
Copy link
Copy Markdown
Contributor

Summary

  • Extended networking debug logging (ext_logging.py + cursor.py tracing hooks)
  • Testing-repro scripts (bypass_test.py, put_repro.py) parameterized via local parameters.json
  • Shell runner (run_repro.sh) that generates sample data and captures logs

Based on

v4.4.0 tag — cherry-picked from fpawlowski/Extended-network-logging

Test plan

  • Run ./testing-repro/run_repro.sh against preprod
  • Verify logs are produced in testing-repro/*.log

sfc-gh-mmishchenko and others added 12 commits April 17, 2026 11:24
… control

Tracing is now controlled via two new parameters on cursor.execute():
- _trace_execute (default True): traces the REST call to Snowflake
- _trace_file_transfer (default False): traces PUT/GET file transfer

Removed the original tracing hooks from connectionpool._new_conn and
ssl_wrap_socket to avoid redundant/misplaced tracing.

Made-with: Cursor
Attach SecretMaskingFilter to the ext_logging logger to ensure
any sensitive data (tokens, passwords, keys) is masked before
log messages reach handlers.

Made-with: Cursor
CI mac build is timing out — add elapsed-time markers around each
major step (venv creation, pip install, wheel build) so we can
pinpoint which phase hangs.  Also add PUT repro and S3 bypass
upload scripts under testing-repro/.

Made-with: Cursor
The pyenv shim hangs in non-interactive environments (no TTY) when no
version is selected. Fix by resolving the installed patch version with
`pyenv versions --bare` and exporting PYENV_VERSION before invoking
the shim. Also adds extended diagnostics: pyenv state, PATH, TTY check,
disk usage, pip version, and per-step elapsed timing.

Made-with: Cursor
…s.json

Instead of hardcoded credentials, both bypass_test.py and put_repro.py now
read connection parameters from a local parameters.json file (gitignored).
A parameters.json.example template is provided for reference.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Shell script that runs both bypass_test.py and put_repro.py, captures
logs, and reports where output files are written. Generates sample data
files on the fly if data/ is empty. Checks for parameters.json before
running.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
run_repro.sh now accepts bypass|repro|all (default) to run specific
scripts. Creates a .venv with dependencies if one doesn't exist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov-commenter
Copy link
Copy Markdown

⚠️ JUnit XML file not found

The CLI was unable to find any JUnit XML files to upload.
For more help, visit our troubleshooting guide.

sfc-gh-fpawlowski and others added 6 commits April 17, 2026 12:06
Both scripts now write full DEBUG logs to bypass.log / repro.log and
show only INFO on the console. Shell script updated to match new log
file names and removed redundant tee piping.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Usage: ./run_repro.sh repro --wheel dist/snowflake_connector_python-*.whl
Recreates venv and installs the specified wheel instead of PyPI.
Prints installed connector version on every run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
run_repro.sh now auto-detects a .whl in wheel/ when --wheel is not
given (falls back to PyPI). Both Python scripts and the shell runner
write all debug logs to the logs/ subdirectory.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Recreates the venv and reinstalls all dependencies from scratch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Strip non-connector changes so this branch contains only the extended
networking logging (ext_logging.py + cursor.py). Repro scripts will
live on a separate branch on top of this one.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

3 participants