Skip to content

bugfix: schema updation issue#1686

Merged
nikhilsinhaparseable merged 1 commit into
parseablehq:mainfrom
parmesant:standalone-schema-bugfix
Jun 18, 2026
Merged

bugfix: schema updation issue#1686
nikhilsinhaparseable merged 1 commit into
parseablehq:mainfrom
parmesant:standalone-schema-bugfix

Conversation

@parmesant

@parmesant parmesant commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

in standalone mode, the .schema file from staging wasn't getting pushed to storage due to the improper usage of path().extension() function. It was always returning None. Instead of checking whether the extension is schema, check if the file path ends with .schema

Fixes #XXXX.

Description


This PR has:

  • been tested to ensure log ingestion and log query works.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

Summary by CodeRabbit

  • Bug Fixes
    • Improved schema file discovery by detecting staging schema files via their filename suffix (.schema) rather than relying on exact extension matching, resulting in more reliable schema loading.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 84a8f956-e149-4e9f-bcde-856e747cb5a0

📥 Commits

Reviewing files that changed from the base of the PR and between fa2c4bd and f44f167.

📒 Files selected for processing (1)
  • src/parseable/streams.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/parseable/streams.rs

Walkthrough

Two methods in src/parseable/streams.rs change how schema staging files are identified: both Stream::schema_files and Stream::get_schemas_if_present now use ends_with(".schema") string suffix matching instead of extension() == "schema" path extension comparison.

Changes

Schema File Detection

Layer / File(s) Summary
Schema file suffix matching
src/parseable/streams.rs
schema_files and get_schemas_if_present both replace extension() == "schema" with ends_with(".schema") to detect schema staging files.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐇 Two tiny lines, a suffix swap,
.schema matched with ends_with snap!
No more extension checks to fret,
The schema files are safely set.
Hop hop, the diff is oh-so-small! 🌿

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'bugfix: schema updation issue' is vague and generic. It references a bug but doesn't specifically describe what the issue is or what changed. Make the title more specific, e.g., 'Fix schema file detection by using path ends_with instead of extension'
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description explains the problem and solution clearly, but the checklist items remain unchecked and the issue reference is incomplete (XXXX placeholder not replaced).
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 unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/parseable/streams.rs`:
- Around line 532-533: The filter method on line 532 and the similar filter on
line 542 use Path::ends_with(".schema") which checks path-component suffixes
instead of actual filename suffixes, causing it to incorrectly skip schema files
with names like `.ingestor.{id}.schema`. Replace the Path::ends_with check with
a proper filename string comparison by extracting the file name using
file_name() and converting it to a string, then checking if it
ends_with(".schema") to correctly match both plain .schema files and ingestor
schema files. Apply this fix to both filter operations.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d515a5a1-240d-49a1-88bd-21d114a3defd

📥 Commits

Reviewing files that changed from the base of the PR and between 7d1d9a9 and fa2c4bd.

📒 Files selected for processing (1)
  • src/parseable/streams.rs

Comment thread src/parseable/streams.rs Outdated
in standalone mode, the `.schema` file from staging wasn't getting pushed to storage due to the improper usage of `path().extension()` function.
It was always returning `None`. Instead of checking whether the extension is `schema`, check if the file path ends with `.schema`
@nikhilsinhaparseable nikhilsinhaparseable merged commit 0f35674 into parseablehq:main Jun 18, 2026
12 checks passed
@parmesant parmesant deleted the standalone-schema-bugfix branch June 18, 2026 09:56
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