Skip to content

feat: bootstrap OpenShell SDK as an optional dependency - #1752

Open
rohanKanojia wants to merge 1 commit into
devfile:mainfrom
rohankanojia-forks:pr/openshell-sdk-dependency
Open

rohanKanojia wants to merge 1 commit into
devfile:mainfrom
rohankanojia-forks:pr/openshell-sdk-dependency

Conversation

@rohanKanojia

@rohanKanojia rohanKanojia commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Add github.com/ai-openshell/sdk-go and a small pkg/openshell package that wraps the SDK client constructor.

The SDK is compiled into the controller, but nothing calls it yet, so operator behaviour is unchanged. Lifecycle management for OpenShell workspaces follows in a separate change.

Dependency changes from go mod tidy:

New direct dependency:

  • github.com/ai-openshell/sdk-go v0.1.11

Indirect version bumps required by the SDK:

Module From To
google.golang.org/grpc v1.83.2 v1.85.0
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af v1.36.12
google.golang.org/genproto/googleapis/api v0.0.0-20260803160001-6ac0973c030d v0.0.0-20260817212433-ac3dfec99bb1
google.golang.org/genproto/googleapis/rpc v0.0.0-20260803160001-6ac0973c030d v0.0.0-20260817212433-ac3dfec99bb1
golang.org/x/oauth2 v0.36.0 v0.38.0
golang.org/x/sync v0.24.0 v0.25.0
cel.dev/expr v0.25.2 v0.25.3

No new indirect modules are added.

What issues does this PR fix or reference?

Part of eclipse-che/che#24035

Is it tested? How?

PR Checklist

  • E2E tests pass (when PR is ready, comment /test v8-devworkspace-operator-e2e, v8-che-happy-path to trigger)
    • v8-devworkspace-operator-e2e: DevWorkspace e2e test
    • v8-che-happy-path: Happy path for verification integration with Che

Summary by CodeRabbit

  • New Features
    • Added a public option for creating a client with the OpenShell SDK. Client creation does not contact the gateway; connection or authentication errors may appear on the first request.
  • Tests
    • Added coverage for client creation with valid and invalid gateway addresses, and for sandbox lifecycle operations using a test client.

@openshift-ci

openshift-ci Bot commented Dec 1, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PR adds an openshell package with an SDK-backed client constructor, updates Go dependencies, and adds tests for client construction and fake-client sandbox lifecycle operations.

Changes: OpenShell client

Layer / File(s) Summary
SDK client integration and validation
go.mod, pkg/openshell/client.go, pkg/openshell/client_test.go
Adds the SDK dependency and NewClient wrapper. Tests cover construction with an unreachable address, rejection of an empty address, and fake-client sandbox lifecycle operations.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: Minimal · up to a39fe · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat: bootstrap OpenShell SDK as an optional dependency" matches the main change. The PR adds the github.com/ai-openshell/sdk-go module to go.mod and a new pkg/openshell package that wraps …
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.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "feat: bootstrap OpenShell SDK as an optional dependency" matches the main change. The PR adds the github.com/ai-openshell/sdk-go module to go.mod and a new pkg/openshell package that wraps the SDK client constructor. The title is short, specific, and uses a conventional commit prefix. One minor gap: the title does not mention the wrapper or the indirect dependency updates, but it covers the primary intent.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 18a2fc78-bb5a-432c-9c17-4245b3c919b8
Commits

Reviewing files that changed from the base of the PR and between df87552 and a39feae.

Files ignored due to path filters: 1

  • go.sum is excluded by !**/*.sum
Files selected for processing: 1

  • go.mod

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@codecov

codecov Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.35%. Comparing base (3526ad3) to head (a39feae).
⚠️ Report is 48 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1752      +/-   ##
==========================================
+ Coverage   40.45%   45.35%   +4.90%     
==========================================
  Files         174      180       +6     
  Lines       15949    13576    -2373     
==========================================
- Hits         6452     6158     -294     
+ Misses       9096     6952    -2144     
- Partials      401      466      +65     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rohanKanojia
rohanKanojia marked this pull request as ready for review December 2, 2026 10:28
@rohanKanojia
rohanKanojia force-pushed the pr/openshell-sdk-dependency branch from 38cf2ee to df87552 Compare December 3, 2026 13:03
@rohanKanojia
rohanKanojia requested a review from tolusha December 3, 2026 14:28
@openshift-ci

openshift-ci Bot commented Dec 3, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: rohanKanojia, tolusha
Once this PR has been reviewed and has the lgtm label, please assign dkwon17 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Add github.com/ai-openshell/sdk-go and a small pkg/openshell package
that wraps the SDK client constructor.

The SDK is compiled into the controller, but nothing calls it yet, so
operator behaviour is unchanged. Lifecycle management for OpenShell
workspaces follows in a separate change.

Part of eclipse-che/che#24035

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@rohanKanojia
rohanKanojia force-pushed the pr/openshell-sdk-dependency branch from df87552 to a39feae Compare December 4, 2026 12:23
@openshift-ci openshift-ci Bot removed the lgtm label Dec 4, 2026
@openshift-ci

openshift-ci Bot commented Dec 4, 2026

Copy link
Copy Markdown

New changes are detected. LGTM label has been removed.

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