Skip to content

Conversation

@kerak19
Copy link
Contributor

@kerak19 kerak19 commented Sep 19, 2025

The component creation & configuration were split into two. As a remedy we provided separate PUT API endpoint that combines creation & configuration for the simpler CLI integration.

Breaking: components update command will now fail if stack-ref isn't provided for non-existing component. It's a step forward to combine the create & update commands into one, so stack-ref is necessary in case the component doesn't exist and needs to be created. If it exists, it's updated otherwise

@kerak19 kerak19 self-assigned this Sep 19, 2025
@kerak19 kerak19 requested a review from Copilot September 19, 2025 11:02
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

This pull request updates the CLI to support the recent split of component creation and configuration into separate operations. The main change introduces a combined PUT API endpoint that handles both creation and configuration for better CLI integration, while also making breaking changes to the component update command requiring stack-ref for non-existing components.

  • Replaces separate create/configure operations with a combined CreateAndConfigureComponent API
  • Updates component update logic to require stack-ref when component doesn't exist
  • Reorganizes import statements and removes deprecated stack configuration commands

Reviewed Changes

Copilot reviewed 79 out of 80 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
internal/testcfg/config.go Updates test configuration to use new combined component creation API
cmd/cycloid/components/update.go Adds stack-ref validation and uses combined create/configure endpoint
cmd/cycloid/components/create.go Renames to CreateAndConfigureComponent and updates API calls
cmd/cycloid/middleware/organization_components.go Implements new CreateAndConfigureComponent method and adds stack config retrieval
client/models/*.go Adds new model definitions for combined component operations
cmd/cycloid/stacks/*.go Removes deprecated stack config commands and updates use case handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please if possible, make the client update a separate PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

@kerak19
Also, you didn't added the version on the version file at the root of this folder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here's the client update: #387

I'll rebase this PR on top of it

Copy link
Contributor

@fhacloid fhacloid left a comment

Choose a reason for hiding this comment

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

@kerak19 check the client thing while I review the rest

Copy link
Contributor

Choose a reason for hiding this comment

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

@kerak19
Also, you didn't added the version on the version file at the root of this folder

@kerak19 kerak19 changed the base branch from develop to lo-check-cli-client September 22, 2025 11:19
Copy link
Contributor

@fhacloid fhacloid left a comment

Choose a reason for hiding this comment

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

@kerak19 I the formatter you use in the command added to the makefile ?

I see all imports where sorted

@kerak19
Copy link
Contributor Author

kerak19 commented Sep 22, 2025

@kerak19 I the formatter you use in the command added to the makefile ?

I see all imports where sorted

It's make format-go

@kerak19 kerak19 force-pushed the lo-check-cli-client branch from 9f8c997 to 9b527a1 Compare September 23, 2025 09:13
Component creation & configuration was split into 2 parts on the API, but we also added a PUT that combines these two into one call.

Updated the code to reflect these changes.

Breaking: components update command will now fail if stack-ref isn't provided for non-existing component. It's a step forward to combine the create & update commands into one, so stack-ref is necessary in case the component doesn't exist and needs to be created. If it exists, it's updated otherwise
@kerak19 kerak19 merged commit 92f79cf into lo-check-cli-client Sep 23, 2025
1 check passed
@kerak19 kerak19 deleted the lo-check-cli branch September 23, 2025 09:22
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