-
Notifications
You must be signed in to change notification settings - Fork 13
chore: add PR template and Claude guidelines #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
f6966c3
bbe20d1
355efcc
3e3f062
0c78a01
eca5c35
f5e5a8a
719dfb7
cb0abf2
d720b1a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <!-- PR title format: follow Conventional Commits style, e.g. | ||
| feat: add new postgres minor release images | ||
| fix: correctly mark stale instances as unknown | ||
| docs: add database migration guide | ||
| Common types: feat, fix, docs, chore, test, refactor, build(release) | ||
| See: https://www.conventionalcommits.org/en/v1.0.0/#summary | ||
| --> | ||
| ## Summary | ||
|
|
||
| <!-- Briefly describe what changed and why. Link to a GitHub issue if appropriate. --> | ||
|
|
||
| ## Checklist | ||
|
|
||
| - [ ] Tests added or updated (unit, regression, integration as needed) | ||
| - [ ] Docs/README updated (or not, with justification) | ||
| - [ ] Issue is linked (branch name or URL in PR description) | ||
| - [ ] Security checks (no secrets, vulnerabilities) | ||
| - [ ] Breaking changes (if any) are clearly called out in the PR description | ||
|
|
||
| ## Notes for Reviewers | ||
|
|
||
| <!-- Instructions to help with the review including known limitations, design rationale, or follow-up tasks. --> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Snowflake Extension – Claude Guidelines | ||
|
|
||
| ## Pull Requests | ||
|
|
||
| When creating a PR description, read and follow the template in | ||
| `.github/pull_request_template.md`. Use Conventional Commits style for | ||
| the PR title (e.g. `feat:`, `fix:`, `docs:`, `chore:`, `test:`, `refactor:`). |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,46 @@ | ||||||
| # Use this file to set a group of values to environment variables; you can source this file to set all the values at once. | ||||||
| export EDGE_INSTALL_SCRIPT=install.py | ||||||
| export REPO=https://pgedge-devel.s3.amazonaws.com/REPO | ||||||
| export EDGE_REPO=$REPO/$EDGE_INSTALL_SCRIPT | ||||||
| export EDGE_HOST=127.0.0.1 | ||||||
|
|
||||||
| # Use this environment variable to set the number of seconds that a timing-sensitive test | ||||||
| # sleeps before confirming a result has been replicated. | ||||||
| export EDGE_SLEEP=5 | ||||||
|
|
||||||
| # Your setup scripts should start at the following port, and iterate through the setup for the number of nodes in | ||||||
| # EDGE_NODES. | ||||||
|
|
||||||
| export EDGE_START_PORT=5432 | ||||||
| export EDGE_NODES=2 | ||||||
|
|
||||||
| # This is where the installation should happen: | ||||||
| export NC_DIR="nc" | ||||||
| export EDGE_HOME_DIR="$NC_DIR/pgedge" | ||||||
| export EDGE_CLUSTER="demo" | ||||||
| export EDGE_CLUSTER_DIR="$EDGE_HOME_DIR/cluster/$EDGE_CLUSTER" | ||||||
|
|
||||||
| # These are the arguments associated with the cli setup: | ||||||
| export EDGE_USERNAME="lcusr" | ||||||
| export EDGE_PASSWORD="password" | ||||||
| export EDGE_DB="lcdb" | ||||||
| export EDGE_REPUSER=`whoami` | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Show the new variable plus the two loader implementations that read these env files.
rg -n -C2 'EDGE_REPUSER|load_dotenv|def source_config_file' test/t/lib/18config.env test/t/util_test.py test/runner.pyRepository: pgEdge/snowflake Length of output: 1670 🏁 Script executed: # Read the source_config_file implementation in test/runner.py (lines 424-450)
sed -n '424,450p' test/runner.pyRepository: pgEdge/snowflake Length of output: 1654 🏁 Script executed: # Read the source_config_file implementations in test/t/util_test.py (around lines 146-170 and 199-220)
sed -n '146,220p' test/t/util_test.pyRepository: pgEdge/snowflake Length of output: 4262 🏁 Script executed: # Check if 18config.env file is referenced anywhere in the codebase
rg -n '18config\.env' --type py --type shRepository: pgEdge/snowflake Length of output: 42 🏁 Script executed: # Search for any references to 18config or this specific env file
rg -i '18config|EDGE_REPUSER' --type py --type sh --type yaml --type toml --type jsonRepository: pgEdge/snowflake Length of output: 42 🏁 Script executed: # Check if 18config.env exists and is new/recent
ls -la test/t/lib/18config.env 2>/dev/null || echo "File not found"Repository: pgEdge/snowflake Length of output: 132 🏁 Script executed: # Search broader patterns to see if this env file is referenced in any way
rg -i 'lib.*env|config\.env' test/ --type py --type sh | head -20Repository: pgEdge/snowflake Length of output: 257 🏁 Script executed: # Check what's in the config.env file that IS being used
cat test/t/lib/config.env 2>/dev/null | head -30Repository: pgEdge/snowflake Length of output: 42 🏁 Script executed: # See if 18config.env is sourced or loaded anywhere
rg -n 'source.*config|load_dotenv' test/Repository: pgEdge/snowflake Length of output: 1101 🏁 Script executed: # Check what config_file is being passed to source_config_file in test/runner.py
sed -n '120,130p' test/runner.pyRepository: pgEdge/snowflake Length of output: 478 🏁 Script executed: # Check the context around line 125 in test/runner.py to see which file is loaded
sed -n '110,130p' test/runner.pyRepository: pgEdge/snowflake Length of output: 1180 🏁 Script executed: # Check if there are any test files that reference config options or 18config
find test/ -name "*.py" -o -name "*.sh" | xargs grep -l "18config\|EDGE_REPUSER" 2>/dev/null || echo "No references found"Repository: pgEdge/snowflake Length of output: 79 🏁 Script executed: # Check the git log or PR context to understand if this is a new file being added
git log --oneline test/t/lib/18config.env 2>/dev/null | head -5 || echo "File may be newly added"Repository: pgEdge/snowflake Length of output: 105 This new config file is never imported or sourced anywhere in the codebase, and the backtick syntax will not be evaluated by the loaders. The file The loaders ( Fix: Use -export EDGE_REPUSER=`whoami`
+export EDGE_REPUSER="${USER}"Also confirm whether 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| # postgres version details | ||||||
| export EDGE_INST_VERSION=18 | ||||||
| export EDGE_COMPONENT="pg$EDGE_INST_VERSION" | ||||||
|
|
||||||
| # Leave spock_ver empty if you want to use spocks default version | ||||||
| # As of 1st August 2024, spock40 is the default pinned version | ||||||
|
|
||||||
| # As of 10/23/24: Note that if the spock version is empty, cluster add-node will FAIL: | ||||||
| # It will return an error: ERROR: function spock.set_cluster_readonly() does not exist | ||||||
| export EDGE_SPOCK_VER="4.0.9" | ||||||
|
|
||||||
| export EDGE_CLI="pgedge" | ||||||
|
|
||||||
| # Path to store autoddl related actual outputs | ||||||
| export EDGE_ACTUAL_OUT_DIR="/tmp/auto_ddl/" | ||||||
|
|
||||||
| # To ensure locale related outputs (such as monetary values) stay consistent | ||||||
| export LC_ALL="C.UTF-8" | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initialize
resultbefore the failing calls.Line 195 can fail before
subprocess.run(...)assignsresult(build_psql_command(...)andopen(...)can both raise). When that happens, theexceptpath tries to write toresult.stderr/result.returncodeand masks the real failure withUnboundLocalError.🔧 Suggested fix
🧰 Tools
🪛 Ruff (0.15.5)
[error] 196-196:
subprocesscall: check for execution of untrusted input(S603)
🤖 Prompt for AI Agents