Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/documentation-style-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ Add periods to descriptions

**Format**
```markdown
✅ **Note:** The CLI requires Go 1.26.3 or later.
✅ **Note:** The CLI requires Go 1.26.4 or later.

✅ **Important:** Never commit `.env` files to version control.

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/.build-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
description: 'Go version to use'
required: false
type: string
default: '1.26.3'
default: '1.26.4'
upload-artifact:
description: 'Whether to upload artifacts'
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/.build-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
description: 'Go version to use'
required: false
type: string
default: '1.26.3'
default: '1.26.4'
artifact-name:
description: 'Name for the artifact'
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/.setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
description: 'Go version to use'
required: false
type: string
default: '1.26.3'
default: '1.26.4'
install-taskfile:
description: 'Whether to install Taskfile'
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/.smoke-tests-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
description: 'Go version to use'
required: false
type: string
default: '1.26.3'
default: '1.26.4'
ref:
description: 'Git ref to checkout (for fork PRs)'
required: false
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Builds the DR CLI binary across multiple operating systems (Linux, macOS, Window

**Inputs:**
- `os-matrix` (string, default: `["ubuntu-latest", "macos-latest", "windows-latest"]`) - OS matrix for builds
- `go-version` (string, default: `1.26.3`) - Go version to use
- `go-version` (string, default: `1.26.4`) - Go version to use
- `upload-artifact` (boolean, default: `false`) - Whether to upload artifacts
- `artifact-name-prefix` (string, default: `dr`) - Prefix for artifact names

Expand All @@ -21,7 +21,7 @@ jobs:
build:
uses: ./.github/workflows/.build-matrix.yaml
with:
go-version: '1.26.3'
go-version: '1.26.4'
upload-artifact: true
secrets: inherit
```
Expand All @@ -30,7 +30,7 @@ jobs:
Builds Windows binary using GoReleaser (cross-compiled from Ubuntu).

**Inputs:**
- `go-version` (string, default: `1.26.3`) - Go version to use
- `go-version` (string, default: `1.26.4`) - Go version to use
- `artifact-name` (string, default: `dr-windows`) - Name for the artifact
- `ref` (string, optional) - Git ref to checkout (useful for fork PRs)

Expand All @@ -49,7 +49,7 @@ Runs smoke tests on Linux and macOS.

**Inputs:**
- `os-matrix` (string, default: `["ubuntu-latest", "macos-latest"]`) - OS matrix
- `go-version` (string, default: `1.26.3`) - Go version to use
- `go-version` (string, default: `1.26.4`) - Go version to use
- `ref` (string, optional) - Git ref to checkout

**Secrets (required):**
Expand All @@ -62,7 +62,7 @@ jobs:
smoke-test:
uses: ./.github/workflows/.smoke-tests-matrix.yaml
with:
go-version: '1.26.3'
go-version: '1.26.4'
secrets:
DR_API_TOKEN: ${{ secrets.DR_API_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
Basic environment setup (checkout, Go, Taskfile, caching).

**Inputs:**
- `go-version` (string, default: `1.26.3`) - Go version to use
- `go-version` (string, default: `1.26.4`) - Go version to use
- `install-taskfile` (boolean, default: `true`) - Whether to install Taskfile
- `setup-cache` (boolean, default: `false`) - Whether to setup Go cache

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26.3'
go-version: '1.26.4'

- name: golangci-lint
uses: golangci/golangci-lint-action@v7
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26.3'
go-version: '1.26.4'

- name: Install Taskfile
uses: arduino/setup-task@v2
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26.3'
go-version: '1.26.4'

- name: Install Envdoc
run: |
Expand All @@ -188,7 +188,7 @@ jobs:
if: needs.detect-changes.outputs.go_code == 'true' || needs.detect-changes.outputs.completion == 'true'
uses: ./.github/workflows/.build-matrix.yaml
with:
go-version: '1.26.3'
go-version: '1.26.4'
upload-artifact: true
artifact-name-prefix: 'dr'
secrets: inherit
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/fork-smoke-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26.3'
go-version: '1.26.4'

- name: Install gosec
run: go install github.com/securego/gosec/v2/cmd/gosec@latest
Expand All @@ -115,7 +115,7 @@ jobs:
needs: [resolve-pr, security-scan]
uses: ./.github/workflows/.build-windows.yaml
with:
go-version: '1.26.3'
go-version: '1.26.4'
artifact-name: 'dr-windows-fork'
ref: ${{ needs.resolve-pr.outputs.sha }}
secrets: inherit
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
needs: [resolve-pr, security-scan]
uses: ./.github/workflows/.smoke-tests-matrix.yaml
with:
go-version: '1.26.3'
go-version: '1.26.4'
ref: ${{ needs.resolve-pr.outputs.sha }}
secrets: inherit

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26.3'
go-version: '1.26.4'

- name: Run goreleaser
uses: goreleaser/goreleaser-action@v6
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/security-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
# - name: Set up Go
# uses: actions/setup-go@v5
# with:
# go-version: '1.26.3'
# go-version: '1.26.4'

# - name: Install gosec
# run: go install github.com/securego/gosec/v2/cmd/gosec@latest
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
# - name: Set up Go
# uses: actions/setup-go@v5
# with:
# go-version: '1.26.3'
# go-version: '1.26.4'

# - name: Install govulncheck
# run: go install golang.org/x/vuln/cmd/govulncheck@latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/smoke-tests-on-demand.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
if: needs.check-fork.outputs.is_fork == 'false'
uses: ./.github/workflows/.build-windows.yaml
with:
go-version: '1.26.3'
go-version: '1.26.4'
artifact-name: 'dr-windows'
secrets: inherit

Expand All @@ -86,7 +86,7 @@ jobs:
if: needs.check-fork.outputs.is_fork == 'false'
uses: ./.github/workflows/.smoke-tests-matrix.yaml
with:
go-version: '1.26.3'
go-version: '1.26.4'
secrets:
DR_API_TOKEN: ${{ secrets.DR_API_TOKEN }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/smoke-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
build-windows:
uses: ./.github/workflows/.build-windows.yaml
with:
go-version: '1.26.3'
go-version: '1.26.4'
artifact-name: 'dr-windows'
secrets: inherit

smoke-test:
uses: ./.github/workflows/.smoke-tests-matrix.yaml
with:
go-version: '1.26.3'
go-version: '1.26.4'
secrets:
DR_API_TOKEN: ${{ secrets.DR_API_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: "2"
run:
go: 1.26.3
go: 1.26.4
linters:
enable:
- asasalint
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ If you would like to build and install from source, you can do so by following t

#### Prerequisites

- Go 1.26.3 or later (for building from source)
- Go 1.26.4 or later (for building from source)
- Git
- [Task](https://taskfile.dev/) (for development and task running)

Expand Down
13 changes: 12 additions & 1 deletion cmd/auth/login/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/datarobot/cli/internal/config"
"github.com/datarobot/cli/internal/config/viperx"
"github.com/datarobot/cli/internal/log"
"github.com/datarobot/cli/tui"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -76,7 +77,17 @@ func RunE(cmd *cobra.Command, args []string) error { //nolint: cyclop
// Clear existing token and get new one
viperx.Set(config.DataRobotAPIKey, "")

key, err := auth.WaitForAPIKeyCallback(cmd.Context(), datarobotHost)
var key string

auth.PrintAuthInstructions(auth.AuthCallbackURL(datarobotHost))

err = tui.RunWithSpinner("Waiting for browser authorization…", func() error {
var waitErr error

key, waitErr = auth.WaitForAPIKeyCallback(cmd.Context(), datarobotHost)

return waitErr
})
if err != nil {
log.Error(err)

Expand Down
21 changes: 18 additions & 3 deletions cmd/component/shared/addModel.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"time"

"github.com/charmbracelet/bubbles/list"
"github.com/charmbracelet/bubbles/spinner"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/lipgloss"
"github.com/datarobot/cli/internal/copier"
Expand All @@ -46,15 +47,21 @@ const (
type AddModel struct {
screen addScreens
list list.Model
spinner spinner.Model
width int
height int
errorMsg string
RepoURLs []string
}

func NewAddModel() AddModel {
s := spinner.New()
s.Spinner = spinner.Dot
s.Style = tui.InfoStyle

return AddModel{
screen: addLoadingScreen,
screen: addLoadingScreen,
spinner: s,
}
}

Expand Down Expand Up @@ -149,7 +156,7 @@ func (am AddModel) loadComponents() tea.Cmd {
}

func (am AddModel) Init() tea.Cmd {
return tea.Batch(am.loadComponents(), tea.WindowSize())
return tea.Batch(am.loadComponents(), am.spinner.Tick, tea.WindowSize())
}

func (am AddModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { //nolint: cyclop
Expand All @@ -159,6 +166,14 @@ func (am AddModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { //nolint: cyclop
am.errorMsg = ""
return am, nil
}
case spinner.TickMsg:
if am.screen == addLoadingScreen {
var cmd tea.Cmd

am.spinner, cmd = am.spinner.Update(msg)

return am, cmd
}
case tea.WindowSizeMsg:
am.width = msg.Width
am.height = msg.Height
Expand Down Expand Up @@ -230,7 +245,7 @@ func (am AddModel) View() string {
func (am AddModel) addLoadingScreenView() string {
var sb strings.Builder

sb.WriteString("Loading components...")
sb.WriteString(tui.InfoStyle.Render(am.spinner.View()+" ") + "Loading components")

return sb.String()
}
Expand Down
Loading