Skip to content

UN-2706 [MISC] Build tools with dumb-init to enable proper SIGTERM handling in containers#1480

Merged
johnyrahul merged 4 commits intomainfrom
UN-2706-build-tools-with-dumb-init
Aug 13, 2025
Merged

UN-2706 [MISC] Build tools with dumb-init to enable proper SIGTERM handling in containers#1480
johnyrahul merged 4 commits intomainfrom
UN-2706-build-tools-with-dumb-init

Conversation

@kirtimanmishrazipstack
Copy link
Contributor

@kirtimanmishrazipstack kirtimanmishrazipstack commented Aug 12, 2025

What

  • Build tools after dumb init changes on this PR

Why

  • OSS tools are not invoking during workflow run.
  • Reason is we haven't not build tool with dumb-init. So when runner tries to invoke using dumb-init, tool fails

How

Can this PR break any existing features. If yes, please list possible items. If no, please explain why. (PS: Admins do not merge the PR without this section filled)

Database Migrations

Env Config

  • N/A

Relevant Docs

Related Issues or PRs

Dependencies Versions

Notes on Testing

  • Tested by running workflow by locally building

Screenshots

Checklist

I have read and understood the Contribution Guidelines.

@kirtimanmishrazipstack kirtimanmishrazipstack changed the title build tools UN-2706 [MISC] Build tools with dumb-init to enable proper SIGTERM handling in containers Aug 12, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 12, 2025

Summary by CodeRabbit

  • Chores
    • Updated tool versions and container images:
      • Classifier → 0.0.66
      • Structure → 0.0.84
      • Text Extractor → 0.0.63
    • Refreshed public tool registry to reference the latest images and tags for the above tools.
    • Updated sample environment variables to align with the new Structure tool image and tag.
    • No functional changes expected; updates ensure consistency with the latest tool releases.

Walkthrough

Bumped toolVersion fields in three tool config JSONs (classifier, structure, text_extractor), updated public tool registry entries for classify and text_extractor to match new versions and image tags, and updated backend sample.env structure image reference. No other fields or behavior changed.

Changes

Cohort / File(s) Change Summary
Tool config version bumps
tools/classifier/src/config/properties.json, tools/structure/src/config/properties.json, tools/text_extractor/src/config/properties.json
Incremented toolVersion: classifier 0.0.65 → 0.0.66, structure 0.0.81 → 0.0.84, text_extractor 0.0.62 → 0.0.63
Registry updates (versions & images)
unstract/tool-registry/tool_registry_config/public_tools.json
Updated classify and text_extractor entries: toolVersion bumped (classify 0.0.65 → 0.0.66, text_extractor 0.0.62 → 0.0.63) and container image references (image_url, image_tag) updated to matching versions.
Backend env sample update
backend/sample.env
Updated STRUCTURE_TOOL_IMAGE_URL and STRUCTURE_TOOL_IMAGE_TAG from docker:unstract/tool-structure:0.0.83 / 0.0.83docker:unstract/tool-structure:0.0.84 / 0.0.84.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch UN-2706-build-tools-with-dumb-init

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@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: 4

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to Reviews > Disable Cache setting
Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 5f3b338 and 2db6acb.

📒 Files selected for processing (4)
  • tools/classifier/src/config/properties.json (1 hunks)
  • tools/structure/src/config/properties.json (1 hunks)
  • tools/text_extractor/src/config/properties.json (1 hunks)
  • unstract/tool-registry/tool_registry_config/public_tools.json (2 hunks)
🔇 Additional comments (1)
tools/structure/src/config/properties.json (1)

5-5: No public registry entry found for “structure” – no update needed

I searched the unstract/tool-registry/tool_registry_config/public_tools.json and other JSON configs and found no "tool_uid": "structure" or similar entry. Since there’s no existing public registry record for the Structure tool, you can safely ignore the registry-update step.

Copy link
Contributor

@chandrasekharan-zipstack chandrasekharan-zipstack left a comment

Choose a reason for hiding this comment

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

@kirtimanmishrazipstack address the comments of coderabbit, it has pointed out correctly. Also you can update backend's sample.env too to benefit OSS users. Leave it as latest if its already changed that way

Copy link
Contributor

@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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to Reviews > Disable Cache setting
Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 2db6acb and 0e4d0d3.

📒 Files selected for processing (1)
  • unstract/tool-registry/tool_registry_config/public_tools.json (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (3)
unstract/tool-registry/tool_registry_config/public_tools.json (3)

8-8: Tool version bump for classify looks correct

toolVersion set to 0.0.66. This aligns with the stated goal of rebuilding with dumb-init.


119-119: Tool version bump for text_extractor looks correct

toolVersion set to 0.0.63, consistent with the PR narrative of rebuilding the tool images.


194-196: Resolved prior mismatch: image tag now aligned with toolVersion (text_extractor 0.0.63)

image_url and image_tag updated to 0.0.63, matching properties.toolVersion. This fixes the previously flagged 0.0.62 vs 0.0.63 divergence.

Optional follow-up: ensure the images were rebuilt with dumb-init as entrypoint and pushed before merging to avoid runtime SIGTERM regressions. Use the script in my earlier comment to validate Docker Hub tags.

Copy link
Contributor

@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

🧹 Nitpick comments (1)
backend/sample.env (1)

78-80: Reduce drift risk by avoiding duplicated image coordinates.

STRUCTURE_TOOL_IMAGE_URL repeats NAME+TAG, which can drift if only one is updated. Consider:

  • Using only NAME+TAG in envs and composing URL in code at runtime, or
  • Adding a preflight validation to fail fast if URL and NAME:TAG don’t match.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to Reviews > Disable Cache setting
Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 0e4d0d3 and ec0aa02.

📒 Files selected for processing (2)
  • backend/sample.env (1 hunks)
  • tools/structure/src/config/properties.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • tools/structure/src/config/properties.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (1)
backend/sample.env (1)

78-80: Version bump to tool-structure 0.0.84 looks correct.

STRUCTURE_TOOL_IMAGE_URL and STRUCTURE_TOOL_IMAGE_TAG are consistently updated to 0.0.84 and align with the PR intent to pick up the new build.

@github-actions
Copy link
Contributor

filepath function $$\textcolor{#23d18b}{\tt{passed}}$$ SUBTOTAL
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_logs}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_cleanup}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_cleanup\_skip}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_client\_init}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image\_exists}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config\_without\_mount}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_run\_container}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image\_for\_sidecar}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_sidecar\_container}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{TOTAL}}$$ $$\textcolor{#23d18b}{\tt{11}}$$ $$\textcolor{#23d18b}{\tt{11}}$$

@sonarqubecloud
Copy link

@johnyrahul johnyrahul merged commit 61bd152 into main Aug 13, 2025
7 checks passed
@johnyrahul johnyrahul deleted the UN-2706-build-tools-with-dumb-init branch August 13, 2025 04:15
pk-zipstack pushed a commit that referenced this pull request Aug 20, 2025
…ndling in containers (#1480)

* build tools

* build tools change

* update structure tools

---------

Co-authored-by: Rahul Johny <116638720+johnyrahul@users.noreply.github.com>
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.

3 participants