Skip to content

Conversation

vyasgun
Copy link
Contributor

@vyasgun vyasgun commented Jun 16, 2025

  • Changed log level from Debug to Error when logging preflight check errors.
  • Updated fix description to clarify that port is required by crc.

Description

Fixes: #4662

Relates to: PR #4772 (Follow up to this PR)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Proposed changes

Testing

Contribution Checklist

  • I Keep It Small and Simple: The smaller the PR is, the easier it is to review and have it merged
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Which platform have you tested the code changes on?
    • Linux
    • Windows
    • MacOS

Summary by Sourcery

Improve error visibility by changing preflight check log level and clarify SSH port requirement message

Bug Fixes:

  • Log preflight check errors at Error level instead of Debug

Enhancements:

  • Update SSH port check description to state the port is required by CRC

- Changed log level from Debug to Error when logging check errors.
- Updated fix description to clarify that port is required by crc.
Copy link

sourcery-ai bot commented Jun 16, 2025

Reviewer's Guide

This PR strengthens error visibility by changing preflight check logging from Debug to Error and improves clarity of the SSH port check message by updating its fix description wording.

Class diagram for updated Check logging and SSH port check message

classDiagram
    class Check {
        +doCheck(config)
    }
    class logging {
        +Error(string)
        +Debug(string)
    }
    Check --|> logging : uses

    class sshPortCheck {
        +fixDescription
    }
    sshPortCheck : fixDescription = "crc requires port <port> to run SSH"
Loading

File-Level Changes

Change Details Files
Elevate logging level for preflight check errors
  • Replaced logging.Debug(err.Error()) with logging.Error(err.Error())
pkg/crc/preflight/preflight.go
Clarify wording of SSH port check fix description
  • Updated fixDescription from “crc uses port %d to run SSH” to “crc requires port %d to run SSH”
pkg/crc/preflight/preflight_checks_nonlinux.go

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@openshift-ci openshift-ci bot requested review from gbraad and lilyLuLiu June 16, 2025 17:12
Copy link

openshift-ci bot commented Jun 16, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign praveenkumar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @vyasgun - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@praveenkumar
Copy link
Member

/retest

@praveenkumar
Copy link
Member

/test e2e-microshift-crc

@vyasgun
Copy link
Contributor Author

vyasgun commented Jun 20, 2025

I see this ssh failure in e2e microshift test run:

{  ServerAliveInterval 30
ServerAliveCountMax 1200
Activated service account credentials for: [218685291244-compute@developer.gserviceaccount.com]
Updated property [core/project].
Updated property [compute/zone].
Updated property [compute/region].
ssh: connect to host 34.132.143.33 port 22: Connection refused
Connection closed
ERROR: (gcloud.compute.scp) [/bin/scp] exited with return code [255].
{"component":"entrypoint","error":"wrapped process failed: exit status 255","file":"sigs.k8s.io/prow/pkg/entrypoint/run.go:84","func":"sigs.k8s.io/prow/pkg/entrypoint.Options.internalRun","level":"error","msg":"Error executing test process","severity":"error","time":"2025-06-19T10:19:03Z"}
time="2025-06-19T10:19:03Z" level=warning msg="skipped directory \".config\" when creating secret from directory \"/tmp/secret\""
time="2025-06-19T10:19:03Z" level=warning msg="skipped directory \".ssh\" when creating secret from directory \"/tmp/secret\""
error: failed to execute wrapped command: exit status 255
}

@praveenkumar
Copy link
Member

/retest

1 similar comment
@praveenkumar
Copy link
Member

/retest

@praveenkumar
Copy link
Member

/test e2e-microshift-crc

Copy link

openshift-ci bot commented Jun 24, 2025

@praveenkumar: No presubmit jobs available for crc-org/crc@main

In response to this:

/test e2e-microshift-crc

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@crc-org crc-org deleted a comment from openshift-ci bot Jun 24, 2025
@vyasgun
Copy link
Contributor Author

vyasgun commented Jun 24, 2025

/test e2e-microshift-crc

Copy link

openshift-ci bot commented Jun 24, 2025

@vyasgun: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-microshift-crc 7656dc4 link true /test e2e-microshift-crc

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@praveenkumar praveenkumar merged commit e267724 into crc-org:main Jun 24, 2025
33 of 35 checks passed
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.

crc setup - Make error message for port 2222 already in use more explicit
2 participants