Skip to content

Fix/s3 table creds#268

Merged
codingcyclist merged 1 commit intodevelopfrom
fix/s3-table-creds
Apr 26, 2026
Merged

Fix/s3 table creds#268
codingcyclist merged 1 commit intodevelopfrom
fix/s3-table-creds

Conversation

@codingcyclist
Copy link
Copy Markdown
Contributor

@codingcyclist codingcyclist commented Apr 26, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Catalog property injection now respects server-provided environment variable configurations
    • Property name sanitization now handles additional special characters more robustly
  • Chores

    • Version bumped to 0.3.60
    • Added boto3 dependency for iceberg support

@codingcyclist codingcyclist requested a review from bradhe April 26, 2026 07:56
@github-actions
Copy link
Copy Markdown
Contributor

⚠️ WARNING: This PR targets main instead of develop

This PR is targeting main which will trigger a production deployment when merged.

If this is a regular feature/fix PR, please change the base branch to develop.
If this is intentional (e.g., hotfix), you can ignore this warning.

Current base: main
Recommended base: develop

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

📝 Walkthrough

Walkthrough

Version increments applied to workspace and Python project configurations (0.3.59 → 0.3.60), alongside refinement to catalog property injection logic that prioritizes server-provided environment variable keys and expands character sanitization rules to include hyphens.

Changes

Cohort / File(s) Summary
Version Bumps
Cargo.toml, pyproject.toml
Version incremented from 0.3.59 to 0.3.60 across workspace and Python package configurations.
Catalog Property Injection Logic
crates/tower-cmd/src/run.rs
Modified property injection to prefer server-provided property.environment_variable keys; expanded sanitization in create_pyiceberg_catalog_property_name to replace - with _ alongside existing . and : replacements.
Iceberg Dependency Extra
pyproject.toml
Added boto3>=1.35.0 to the [project.optional-dependencies].iceberg extra.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • jo-sm
  • giray123
  • bradhe
  • konstantinoscs
  • socksy

Poem

🐰 A tiny hop through versions past,
From fifty-nine to sixty at last!
Properties now know their way,
With hyphens tamed, they'll gently play.
Boto3 joins the iceberg dance,
One small release, one steady advance. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The PR title 'Fix/s3 table creds' is vague and does not clearly describe the changes. The changeset includes version bumps, catalog property injection improvements, and boto3 dependency additions, but the title only hints at S3/credentials without specifics. Use a more descriptive title that clearly explains the main change, such as 'Add boto3 dependency and improve catalog property injection for S3 credentials' or 'Prefer environment variable names from server in catalog property injection'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/s3-table-creds

Comment @coderabbitai help to get the list of available commands and usage tips.

@codingcyclist codingcyclist changed the base branch from main to develop April 26, 2026 07:57
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@crates/tower-cmd/src/run.rs`:
- Around line 630-634: The code currently uses
property.environment_variable.unwrap_or_else(...) which treats Some("") as
valid; change the logic that sets name so empty or all-whitespace
environment_variable values are treated as missing by checking/trimming
property.environment_variable before deciding to use it, and only fall back to
create_pyiceberg_catalog_property_name(&catalog.name, &property.name) when the
env var is None or blank; update the assignment that defines name (referencing
property.environment_variable, create_pyiceberg_catalog_property_name,
catalog.name, property.name) to perform that defensive check.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 51727b05-9bc5-487d-960f-22af11cfe272

📥 Commits

Reviewing files that changed from the base of the PR and between 17b41d7 and bc69a01.

⛔ Files ignored due to path filters (2)
  • Cargo.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • Cargo.toml
  • crates/tower-cmd/src/run.rs
  • pyproject.toml

Comment on lines +630 to +634
let name = property
.environment_variable
.unwrap_or_else(|| {
create_pyiceberg_catalog_property_name(&catalog.name, &property.name)
});
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Defensively handle empty environment_variable values.

At Line 630, Some("") will bypass fallback and produce an invalid env var key. Treat empty/whitespace values as missing and then fallback to create_pyiceberg_catalog_property_name.

Suggested patch
-            let name = property
-                .environment_variable
-                .unwrap_or_else(|| {
-                    create_pyiceberg_catalog_property_name(&catalog.name, &property.name)
-                });
+            let name = property
+                .environment_variable
+                .as_deref()
+                .filter(|value| !value.trim().is_empty())
+                .map(str::to_string)
+                .unwrap_or_else(|| {
+                    create_pyiceberg_catalog_property_name(&catalog.name, &property.name)
+                });
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/tower-cmd/src/run.rs` around lines 630 - 634, The code currently uses
property.environment_variable.unwrap_or_else(...) which treats Some("") as
valid; change the logic that sets name so empty or all-whitespace
environment_variable values are treated as missing by checking/trimming
property.environment_variable before deciding to use it, and only fall back to
create_pyiceberg_catalog_property_name(&catalog.name, &property.name) when the
env var is None or blank; update the assignment that defines name (referencing
property.environment_variable, create_pyiceberg_catalog_property_name,
catalog.name, property.name) to perform that defensive check.

@codingcyclist codingcyclist merged commit 0978742 into develop Apr 26, 2026
33 checks passed
@codingcyclist codingcyclist deleted the fix/s3-table-creds branch April 26, 2026 09:47
@coderabbitai coderabbitai Bot mentioned this pull request Apr 26, 2026
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.

2 participants