Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declutter Git step log output #839

Merged
merged 3 commits into from
Jul 26, 2021
Merged

Declutter Git step log output #839

merged 3 commits into from
Jul 26, 2021

Conversation

HeavyWombat
Copy link
Contributor

Changes

We received end user feedback on some Git step output messages being misleading, which might take the focus away from the actual error message:

  • Omit warnings in Git+SSH use cases.
  • Add Tekton related .docker directory to base image to avoid warning.
  • Avoid misleading .ssh directory message by putting it into the base image.

Submitter Checklist

  • Includes tests if functionality changed/was added
  • Includes docs if changes are user-facing
  • Set a kind label on this PR
  • Release notes block has been filled in, or marked NONE

See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.

Release Notes

Updated Git download step to avoid misleading warnings and messages.

Add option flag to only show errors to keep the output brief.
There is a misleading message in the Git step that is cause by Tekton
assuming to find a specific directory in the container image:
```
2021/07/21 13:36:04 warning: unsuccessful cred copy: ".docker"
  from "/tekton/creds" to "/": unable to create destination directory:
  mkdir /.docker: permission denied
```

Add empty `.docker` directory with to avoid the warning.
When using the Git step with a SSH Git URL, a misleading message is
returned in case the `git` command fails, e.g. wrong URL.
```
Could not create directory '/.ssh'.
Failed to add the host to the list of known hosts (/.ssh/known_hosts).
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
```

Add empty `.ssh` directory to avoid the misleading message.
@HeavyWombat HeavyWombat added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jul 21, 2021
@openshift-ci openshift-ci bot added the release-note Label for when a PR has specified a release note label Jul 21, 2021
@HeavyWombat HeavyWombat requested review from SaschaSchwarze0 and removed request for qu1queee July 23, 2021 15:07
Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 26, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 26, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SaschaSchwarze0

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

The pull request process is described 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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 26, 2021
@openshift-merge-robot openshift-merge-robot merged commit 9b0e9a0 into main Jul 26, 2021
@HeavyWombat HeavyWombat deleted the fix/git-warnings branch July 26, 2021 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note Label for when a PR has specified a release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants