Skip to content

Unify error reporting for launch, refresh and sketch changes#466

Merged
dmitry-lyfar merged 1 commit into
mainfrom
fix/change-status-report
Sep 2, 2025
Merged

Unify error reporting for launch, refresh and sketch changes#466
dmitry-lyfar merged 1 commit into
mainfrom
fix/change-status-report

Conversation

@dmitry-lyfar
Copy link
Copy Markdown
Collaborator

@dmitry-lyfar dmitry-lyfar commented Aug 29, 2025

Description

  • Make error reporting for refresh, launch and sketch-sdk consistent in cases when the progress is aborted. Earlier, if the change became 'Undone' after Ctrl+C it either reported the results as an aborted change or just finished silently.
  • Fix reporting for the sketch-sdk command if sketch refresh was interrupted.

Self-review quick check

  • Make decisions that cost a lot to reverse explicit in the PR description.
  • Avoid nested conditions.
  • Delete dead code and redundant comments.
  • Normalise symmetries by sticking to doing identical things identically.
// one way to handle errors
if err := f(); err != nil {
   ...
}

// one way to handle multiple returns
val, err := f()
if err != nil {
   ...
}
...
  • Check that coupled code elements, files, and directories are adjacent. For example, test data is stored as close as possible to a test.
  • Put variable declaration and initialisation together.
  • Divide large expressions into digestable and self-explanatory ones. Use multiple variables if required.
  • Put a blank line between two logically different chunks of code.
  • Follow the style guide for new error messages.

Docs

  • I have checked and added or updated relevant documentation.
  • I have checked and added or updated relevant release notes.
  • I have included the technical author in the review.

Or:

  • I confirm the PR has no implications for documentation.

@dmitry-lyfar dmitry-lyfar self-assigned this Aug 29, 2025
@dmitry-lyfar dmitry-lyfar force-pushed the fix/change-status-report branch from 6b8827d to 1857ea1 Compare August 29, 2025 06:01
@dmitry-lyfar dmitry-lyfar marked this pull request as ready for review August 29, 2025 06:02
Copy link
Copy Markdown
Contributor

@jonathan-conder jonathan-conder left a comment

Choose a reason for hiding this comment

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

Looks good, just a style issue

Comment thread cmd/workshop/sketch.go Outdated
@dmitry-lyfar dmitry-lyfar force-pushed the fix/change-status-report branch from 1857ea1 to dddcf74 Compare September 2, 2025 02:05
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 2, 2025

TICS Quality Gate

✔️ Passed

workshop

All conditions passed

See the results in the TICS Viewer

The following files have been checked for this project
  • cmd/workshop/launch.go
  • cmd/workshop/refresh.go
  • cmd/workshop/sketch.go
  • cmd/workshop/wait.go

Automatic-tests / code-coverage / TICS GitHub Action

@dmitry-lyfar dmitry-lyfar merged commit 585018e into main Sep 2, 2025
11 checks passed
@dmitry-lyfar dmitry-lyfar deleted the fix/change-status-report branch September 2, 2025 02:52
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