Skip to content

Conversation

@rocktavious
Copy link
Collaborator

Resolves #

Problem

Untill now the CLI has been on opslevel-go 2024 because of a huge nullability shift along with a number of struct interface changes due to code-gen and standardization. This has prevented us from upgrading the CLI.

Solution

Paydown this tech debt and make it so the CLI is on the latest opslevel-go release.

Checklist

  • I have run this code, and it appears to resolve the stated issue.
  • This PR has no user interface changes or has already received approval from product management to change the interface.
  • Make a changie entry that explains the customer facing outcome of this change

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Upgrade CLI to use the latest opslevel-go v2025 release by updating import paths and adapting calls to new APIs and field names.

  • Bumped opslevel-go imports from v2024 to v2025 across all commands
  • Adjusted API signatures and field references (e.g. ChecksCount→TotalChecks, ListLevels signature, GetService simplification)
  • Updated CLI output formatting (ID string conversions, pointer assignments, table headers)

Reviewed Changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/cmd/scorecard.go Bumped import & use TotalChecks for scorecard display
src/cmd/rubric.go Bumped import & update ListLevels(nil) response handling
src/cmd/root.go Bumped opslevel-go import
src/cmd/repository.go Bumped opslevel-go import
src/cmd/property.go Bumped import, simplified GetService, updated PropertyDisplayStatus
src/cmd/policy.go Bumped opslevel-go import
src/cmd/maturity.go Bumped opslevel-go import
src/cmd/integration.go Bumped import & updated event integration Name extraction
src/cmd/infra.go Bumped import & convert IDs to string for CSV/output
src/cmd/graphql.go Bumped opslevel-go import
src/cmd/filter.go Bumped import & use NewNullableFrom for filter Name
src/cmd/example.go Bumped opslevel-go import
src/cmd/domain.go Bumped opslevel-go import
src/cmd/document.go Bumped opslevel-go import
src/cmd/deploy.go Bumped opslevel-go import
src/cmd/dependency.go Bumped opslevel-go import
src/cmd/check.go Bumped opslevel-go import
src/cmd/alias.go Bumped opslevel-go import
src/cmd/action.go Bumped import, updated webhook action ID printing & table columns
src/cmd/account.go Bumped opslevel-go import
Comments suppressed due to low confidence (3)

src/cmd/scorecard.go:75

  • The column header 'CHECKS_COUNT' no longer matches the value being printed ('TotalChecks'). Consider renaming it to 'TOTAL_CHECKS' for clarity.
w := common.NewTabWriter("ID", "NAME", "PASSING_CHECKS", "CHECKS_COUNT", "SERVICE_COUNT")

src/cmd/property.go:227

  • The logic mapping propertyDisplayStatus to an enum pointer was changed; consider adding or updating unit tests for readPropertyDefinitionInput to verify correct behavior for various input strings.
propDefInput.PropertyDisplayStatus = &status

src/cmd/property.go:64

  • The removal of alias-based resolution (previously GetServiceWithAlias) may change behavior for non-ID arguments. Ensure this simplification aligns with expected API semantics or document the change.
service, err = getClientGQL().GetService(args[0])

Copy link
Contributor

@derek-etherton-opslevel derek-etherton-opslevel left a comment

Choose a reason for hiding this comment

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

changes all make sense to me except one comment.

If a second pair of hands testing would be helpful, how can I get this running locally?

@rocktavious rocktavious marked this pull request as draft June 5, 2025 18:44
* Setup e2e tests for domain

* PR feedback

* Checkpoint

* Expand test coverage

* Add system test

* First pass at fixing example command

* more tweaks

* Fix CI

* Fix up all example commands

* More fixes

* fixes

* more fixes for removal of old code

* Update Taskfile.yml

* fix e2e integration tests

* few more tweaks after testing manually
@rocktavious rocktavious marked this pull request as ready for review June 24, 2025 16:32
@rocktavious rocktavious merged commit 1766067 into main Jun 24, 2025
5 checks passed
@rocktavious rocktavious deleted the kr/upgrade-opslevel-go-2025 branch June 24, 2025 16:34
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