Skip to content

fix windows ingest script#1699

Merged
nikhilsinhaparseable merged 2 commits into
parseablehq:mainfrom
nikhilsinhaparseable:fix-windows-script
Jun 23, 2026
Merged

fix windows ingest script#1699
nikhilsinhaparseable merged 2 commits into
parseablehq:mainfrom
nikhilsinhaparseable:fix-windows-script

Conversation

@nikhilsinhaparseable

@nikhilsinhaparseable nikhilsinhaparseable commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

fix to show command to see logs, status and stop the script

Summary by CodeRabbit

  • Chores
    • Improved the script’s self-referencing command handling so guidance/help text consistently points to the correct way to run it from any location.
    • Updated status, error hints, examples, and usage output to use the same generated command string throughout.

@coderabbitai

coderabbitai Bot commented Jun 23, 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: 40bd5aaa-ecda-4790-bada-8d2e36bb68b6

📥 Commits

Reviewing files that changed from the base of the PR and between 15714c2 and a968661.

📒 Files selected for processing (1)
  • scripts/ingest.ps1
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/ingest.ps1

Walkthrough

scripts/ingest.ps1 is updated to resolve its own path into $SCRIPT_PATH with a fallback, then build a $SCRIPT_CMD string using powershell -NoProfile -ExecutionPolicy Bypass -File. All user-facing output strings that previously hardcoded .\ingest.ps1 or the full PowerShell invocation are replaced with $SCRIPT_CMD.

Changes

ingest.ps1 Self-Invocation Refactor

Layer / File(s) Summary
$SCRIPT_PATH and $SCRIPT_CMD definition
scripts/ingest.ps1
Adds $SCRIPT_PATH (resolved script location with fallback) and $SCRIPT_CMD (full PowerShell self-invocation string with -NoProfile -ExecutionPolicy Bypass -File) at script scope.
User-facing message updates
scripts/ingest.ps1
Replaces hardcoded .\ingest.ps1 and full powershell ... -File .\ingest.ps1 strings in Show-Status output, the already-running stop hint, failed/successful start diagnostics, help text examples, and default-case usage errors with $SCRIPT_CMD.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • parseablehq/parseable#1489: Introduced the Windows scripts/ingest.ps1 script that this PR refactors to use dynamic self-path resolution.

Poem

🐇 A rabbit hops through PowerShell land,
No hardcoded paths — $SCRIPT_CMD's the plan!
With -NoProfile and Bypass in tow,
My own path I find wherever I go.
The messages now point correctly to me,
A self-aware script, as tidy can be! 🌿

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description lacks required template sections including the issue reference, detailed description of goals and rationale, key changes made, and testing/documentation checkboxes. Complete the PR description following the template by adding issue reference, detailed description, rationale for changes, and completing the required checklist items.
Title check ❓ Inconclusive The title is vague and generic, using 'fix windows ingest script' without clearly conveying what specific aspect of the script was fixed or improved. Use a more specific title that highlights the main change, such as 'Update Windows ingest script to show logs, status, and stop commands' or similar.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

@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 `@scripts/ingest.ps1`:
- Around line 26-33: The $SCRIPT_CMD variable uses double quotes around the path
which allows PowerShell to re-interpret special characters like $ and backticks
when users copy the command. Additionally, the third fallback uses a relative
path that depends on the current working directory instead of using
$PSScriptRoot for consistency. Wrap the $SCRIPT_PATH variable reference in
single quotes within the $SCRIPT_CMD assignment to prevent interpolation of
special characters, and replace the fallback value from ".\ingest.ps1" with
$PSScriptRoot concatenated with the script filename to ensure a reliable
absolute path.
🪄 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: efd9f695-f2aa-4317-989d-7d54c9334b96

📥 Commits

Reviewing files that changed from the base of the PR and between 595af02 and 15714c2.

📒 Files selected for processing (1)
  • scripts/ingest.ps1

Comment thread scripts/ingest.ps1 Outdated
@nikhilsinhaparseable nikhilsinhaparseable merged commit 8b71296 into parseablehq:main Jun 23, 2026
12 checks passed
parmesant pushed a commit to parmesant/parseable that referenced this pull request Jun 24, 2026
* fix windows ingest script

* use PSScriptRoot join path
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