Skip to content

Removed kosli expect deployment command server/#5041#720

Open
ToreMerkely wants to merge 3 commits intomainfrom
5041-removed-deployments
Open

Removed kosli expect deployment command server/#5041#720
ToreMerkely wants to merge 3 commits intomainfrom
5041-removed-deployments

Conversation

@ToreMerkely
Copy link
Contributor

  • Removed kosli expect deployment command server/#5041
  • Updated docs. Do not print deployments in kosli log env command
  • Reverted back some tabs that CC had removed

Copy link
Contributor

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 PR removes deployment-related CLI commands/output and updates documentation to reflect the new behavior (not showing deployments in environment event logs and removing deprecated deployment expectation flows).

Changes:

  • Remove kosli expect deployment (and the expect command group) plus related helper/test code.
  • Remove kosli list deployments and kosli get deployment commands and their golden-test fixtures.
  • Update docs and kosli log env/environment events table output to no longer include “deployments”.

Reviewed changes

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

Show a summary per file
File Description
docs.kosli.com/content/tutorials/tracing_a_production_incident_back_to_git_commits.md Updates example kosli log env output to remove deployments column and removes deployment history lines.
docs.kosli.com/content/tutorials/following_a_git_commit_to_runtime_environments.md Removes deployment references from the narrative “History” explanation.
docs.kosli.com/content/integrations/actions.md Removes deployments from the webhook payload example.
docs.kosli.com/content/faq/_index.md Replaces the “unknown command” example with a new one (but output format needs to match CLI).
cmd/kosli/testdata/output/list/list-deployments.txt Removes golden output for removed list deployments command.
cmd/kosli/testdata/output/get/get-deployment.txt Removes golden output for removed get deployment command.
cmd/kosli/testdata/output/get/get-deployment-latest.txt Removes golden output for removed get deployment command.
cmd/kosli/testHelpers.go Removes ExpectDeployment helper used by removed tests.
cmd/kosli/root.go Removes expect command registration and deployment-related flag help strings.
cmd/kosli/listSnapshots.go Removes “DEPLOYMENTS” column from environment events table (needs tab formatting fix).
cmd/kosli/listDeployments_test.go Deletes tests for removed list deployments command.
cmd/kosli/listDeployments.go Deletes implementation for removed list deployments command.
cmd/kosli/list.go Removes list deployments subcommand registration.
cmd/kosli/getDeployment_test.go Deletes tests for removed get deployment command.
cmd/kosli/getDeployment.go Deletes implementation for removed get deployment command.
cmd/kosli/get.go Removes get deployment subcommand registration.
cmd/kosli/expectDeployment_test.go Deletes tests for removed expect deployment command.
cmd/kosli/expectDeployment.go Deletes implementation for removed expect deployment command.
cmd/kosli/expect.go Deletes expect command group.
Comments suppressed due to low confidence (2)

cmd/kosli/listSnapshots.go:196

  • After removing the DEPLOYMENTS column, the rows in printEnvironmentEventsLogAsTable still include extra trailing tab separators (e.g. \t\t and \t\t\t). This produces an extra empty column beyond the 3-column header and can lead to misaligned table output for kosli log env / kosli log environment.

Adjust the row formatting so each printed row has the same number of tab-separated columns as the header (3), and update/remove the alignment comment accordingly.

		row := fmt.Sprintf("#%d\tArtifact: %s\t%s", snapshotIndex, artifactName, flow)
		rows = append(rows, row)
		row = fmt.Sprintf("\tFingerprint: %s\t\t", fingerprint)
		rows = append(rows, row)
		row = fmt.Sprintf("\tDescription: %s\t\t", description)
		rows = append(rows, row)
		row = fmt.Sprintf("\tReported at: %s\t\t", reportedAt)
		rows = append(rows, row)
		rows = append(rows, "\t\t\t") // These tabs are required for alignment
	}

cmd/kosli/get.go:25

  • The PR title/description doesn’t mention that the kosli get deployment command is removed here (along with its implementation and tests). If this is intentional, please explicitly call it out in the PR description (and any release notes/changelog), since it’s a user-facing breaking CLI change.
	// Add subcommands
	cmd.AddCommand(
		newGetApprovalCmd(out),
		newGetArtifactCmd(out),
		newGetEnvironmentCmd(out),
		newGetFlowCmd(out),
		newGetSnapshotCmd(out),
		newGetTrailCmd(out),

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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