Skip to content

fix(xtest): Use embedded platform otdfctl in auto#445

Merged
dmihalcik-virtru merged 2 commits intomainfrom
DSPX-3086-enable-pqc-suite
May 5, 2026
Merged

fix(xtest): Use embedded platform otdfctl in auto#445
dmihalcik-virtru merged 2 commits intomainfrom
DSPX-3086-enable-pqc-suite

Conversation

@dmihalcik-virtru
Copy link
Copy Markdown
Member

@dmihalcik-virtru dmihalcik-virtru commented Apr 30, 2026

When detect-otdfctl finds otdfctl/ in the platform checkout, PLATFORM_OTDFCTL_DIR
is set and guaranteed to exist. The auto-detect fallback was previously warning
and falling through to a standalone opentdf/otdfctl checkout, so platform PRs
that embed otdfctl (e.g. for PQC support) were not actually tested against their
own source. Now we set use_existing=true so the symlink step wires sdk/go/src/{tag}
to the platform checkout instead.

Older platform tags (e.g. v0.9.0) are unaffected: detect-otdfctl finds no otdfctl/
directory there, so PLATFORM_OTDFCTL_DIR stays empty and the elif condition is false.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Summary by CodeRabbit

  • Bug Fixes
    • Improved Go auto-detect logic in the setup tool to properly reuse existing platform-embedded tools when available, reducing unnecessary reinstallations and improving setup efficiency.

When detect-otdfctl finds otdfctl/ in the platform checkout, PLATFORM_OTDFCTL_DIR
is set and guaranteed to exist. The auto-detect fallback was previously warning
and falling through to a standalone opentdf/otdfctl checkout, so platform PRs
that embed otdfctl (e.g. for PQC support) were not actually tested against their
own source. Now we set use_existing=true so the symlink step wires sdk/go/src/{tag}
to the platform checkout instead.

Older platform tags (e.g. v0.9.0) are unaffected: detect-otdfctl finds no otdfctl/
directory there, so PLATFORM_OTDFCTL_DIR stays empty and the elif condition is false.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@dmihalcik-virtru dmihalcik-virtru requested review from a team as code owners April 30, 2026 15:42
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 30, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f80067cf-a54f-4323-a1b9-4ed3f083e30e

📥 Commits

Reviewing files that changed from the base of the PR and between 88550e3 and 6d26147.

📒 Files selected for processing (1)
  • xtest/setup-cli-tool/action.yaml

📝 Walkthrough

Walkthrough

The GitHub Actions composite action setup-cli-tool was modified to directly reuse an existing platform-embedded otdfctl tool when the PLATFORM_OTDFCTL_DIR environment variable is set during Go version auto-detection, rather than requiring explicit configuration to enable reuse.

Changes

Go Auto-Detect Reuse Logic

Layer / File(s) Summary
Conditional Logic
xtest/setup-cli-tool/action.yaml (lines 170–184)
When standalone resolver data is used but a platform otdfctl/ exists, the action now sets use_existing=true and needs_source=false to reuse the platform-embedded tool directly, replacing prior guidance that reuse required explicit otdfctl-source=platform configuration.
Status Notice
xtest/setup-cli-tool/action.yaml (lines 170–184)
A notice is emitted to inform users that the Go version resolved from the standalone repo will reuse the platform-embedded otdfctl at PLATFORM_OTDFCTL_DIR.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • pflynn-virtru

Poem

🐰 A clever switch in Go's own flow,
Platform tools now directly know,
No extra fuss, just reuse the way—
One path is cleaner, hip-hooray! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: enabling reuse of embedded platform otdfctl in auto-detect mode instead of falling back to standalone checkout.
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
  • Commit unit tests in branch DSPX-3086-enable-pqc-suite

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the setup-cli-tool GitHub Action to enable automatic reuse of the platform-embedded otdfctl directory when the Go SDK is selected and a platform checkout is available. Previously, the action would fall back to a standalone checkout; this change optimizes the process by setting use_existing to true and needs_source to false when the directory is detected. I have no feedback to provide.

@github-actions
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 4, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

@dmihalcik-virtru dmihalcik-virtru merged commit 7e76234 into main May 5, 2026
16 checks passed
@dmihalcik-virtru dmihalcik-virtru deleted the DSPX-3086-enable-pqc-suite branch May 5, 2026 13:01
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