-
Notifications
You must be signed in to change notification settings - Fork 13
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
chore: rename AIRBYTE_ALLOW_CUSTOM_CODE to AIRBYTE_ENABLE_UNSAFE_CODE #415
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR updates the environment variable used to control custom code execution for improved clarity and consistency with the declarative manifest. The change renames the environment variable value from "AIRBYTE_ALLOW_CUSTOM_CODE" to "AIRBYTE_ENABLE_UNSAFE_CODE".
- Updated the environment variable value in both the constant assignment and error message.
- Adjusted the documentation string to match the new environment variable name.
Comments suppressed due to low confidence (1)
airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py:22
- [nitpick] Consider renaming the constant to something like ENV_VAR_ENABLE_UNSAFE_CODE so it fully reflects the updated environment variable name.
ENV_VAR_ALLOW_CUSTOM_CODE = "AIRBYTE_ENABLE_UNSAFE_CODE"
📝 WalkthroughWalkthroughThe change updates the environment variable controlling custom code execution. In the file, references to the variable have been modified from Changes
Would you like any additional details or a sequence diagram, or is this summary sufficient for your needs? wdyt? Tip ⚡🧪 Multi-step agentic review comment chat (experimental)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py (1)
22-22
: Consider renaming the constant to match its new value?The constant name
ENV_VAR_ALLOW_CUSTOM_CODE
now contains the value"AIRBYTE_ENABLE_UNSAFE_CODE"
, creating a slight mismatch between the name (using "ALLOW") and the value (using "ENABLE_UNSAFE").Perhaps renaming this constant to
ENV_VAR_ENABLE_UNSAFE_CODE
would provide better naming consistency, wdyt?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: Check: 'source-pokeapi' (skip=false)
- GitHub Check: Check: 'source-amplitude' (skip=false)
- GitHub Check: Check: 'source-shopify' (skip=false)
- GitHub Check: Check: 'source-hardcoded-records' (skip=false)
- GitHub Check: Pytest (All, Python 3.11, Ubuntu)
- GitHub Check: Pytest (All, Python 3.10, Ubuntu)
- GitHub Check: SDM Docker Image Build
- GitHub Check: Pytest (Fast)
- GitHub Check: Analyze (python)
🔇 Additional comments (3)
airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py (3)
38-38
: Error message update looks good!The error message has been correctly updated to reference the new environment variable name, which ensures users receive the right instructions.
58-58
: Documentation update looks good!The function documentation has been properly updated to reference the new environment variable name, maintaining consistency with the implementation change.
60-60
:❓ Verification inconclusive
Verify this line works with the renamed environment variable
This line hasn't been modified, but it uses the constant whose value has changed. The code will now check for
AIRBYTE_ENABLE_UNSAFE_CODE
instead ofAIRBYTE_ALLOW_CUSTOM_CODE
.It would be good to verify that all dependent systems/documentation are updated to use the new environment variable name to avoid confusion.
🏁 Script executed:
#!/bin/bash # Search for other occurrences of the old environment variable name in the codebase rg "AIRBYTE_ALLOW_CUSTOM_CODE" --type pyLength of output: 40
Ensure all documentation and dependent systems align with the new environment variable usage
It appears that no remaining occurrences of the old environment variable
AIRBYTE_ALLOW_CUSTOM_CODE
were found in the Python codebase. However, could you please double-check that all dependent systems, configuration files, and documentation have been updated to reference the new environment variableAIRBYTE_ENABLE_UNSAFE_CODE
? Also, confirm that the constantENV_VAR_ALLOW_CUSTOM_CODE
is now correctly set to use the new variable name. wdyt?
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.
LGTM!
What
How
Additional Context
Notes for Reviewer
Recommended Reading Order
Can This PR Be Reverted and Rolled Back
Summary by CodeRabbit