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

Change git-clone default userHome #1180

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

natifridman
Copy link

Changes

Change git-clone default userHome to fix clone error as non-root error: could not lock config file /home/git/.gitconfig: No such file or directory

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • Follows the authoring recommendations
  • Includes docs (if user facing)
  • Includes tests (for new tasks or changed functionality)
  • Meets the Tekton contributor standards (including functionality, content, code)
  • Commit messages follow commit message best practices
  • Has a kind label. You can add one by adding a comment on this PR that
    contains /kind <type>. Valid types are bug, cleanup, design, documentation,
    feature, flake, misc, question, tep
  • Complies with Catalog Organization TEP, see example. Note An issue has been filed to automate this validation
    • File path follows <kind>/<name>/<version>/name.yaml

    • Has README.md at <kind>/<name>/<version>/README.md

    • Has mandatory metadata.labels - app.kubernetes.io/version the same as the <version> of the resource

    • Has mandatory metadata.annotations tekton.dev/pipelines.minVersion

    • mandatory spec.description follows the convention

        ```
      
        spec:
          description: >-
            one line summary of the resource
      
            Paragraph(s) to describe the resource.
        ```
      

See the contribution guide for more details.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jul 17, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: natifridman / name: Nati Fridman (24e05a9)

@tekton-robot tekton-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 17, 2023
@tekton-robot
Copy link

Hi @natifridman. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@tekton-robot tekton-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 17, 2023
@tekton-robot
Copy link

Catlin Output
FILE: task/git-clone/0.9/git-clone.yaml
WARN : Step "clone" uses image "$(params.gitInitImage)" that contains variables; skipping validation

Copy link
Contributor

@khrm khrm left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 17, 2023
@@ -107,7 +107,7 @@ spec:
description: |
Absolute path to the user's home directory.
type: string
default: "/home/git"
default: "/workspace/nonroot"
Copy link
Member

Choose a reason for hiding this comment

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

this can probably change user experience for all the current users. Can you please bump the version of git-clone? Also can you please help with the Pipelines version and the platform on which you are facing this issue? Probably it will be worth adding in the readme of the new version of git-clone task v0.10.
@khrm @natifridman do let me know your thoughts around this 😄

Copy link
Author

Choose a reason for hiding this comment

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

Created new version v0.10
@vinamra28 Let me know if I missed something. Where would you add the Pipelines version?

@tekton-robot tekton-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 23, 2023
@tekton-robot
Copy link

Diff between version 0.9 and 0.10
diff --git a/task/git-clone/0.9/git-clone.yaml b/task/git-clone/0.10/git-clone.yaml
index c7eed37..931c68c 100644
--- a/task/git-clone/0.9/git-clone.yaml
+++ b/task/git-clone/0.10/git-clone.yaml
@@ -3,7 +3,7 @@ kind: Task
 metadata:
   name: git-clone
   labels:
-    app.kubernetes.io/version: "0.9"
+    app.kubernetes.io/version: "0.10"
   annotations:
     tekton.dev/pipelines.minVersion: "0.38.0"
     tekton.dev/categories: Git

@tekton-robot
Copy link

Catlin Output
FILE: task/git-clone/0.10/git-clone.yaml
WARN : Step "clone" uses image "$(params.gitInitImage)" that contains variables; skipping validation
FILE: task/git-clone/0.9/git-clone.yaml
WARN : Step "clone" uses image "$(params.gitInitImage)" that contains variables; skipping validation
FILE: task/gitlab-set-status/0.2/gitlab-set-status.yaml
WARN : Step "set-status" uses image "registry.access.redhat.com/ubi8/python-38@sha256:af6f93b81f9313de95966e8cd681edb9dbcb5fdbddc5a4cc365af8e4534096ef"; consider using a image tagged with specific version along with digest eg. abc.io/img:v1@sha256:abcde
Catlin script lint Output
WARN : step: gitlab-set-status is not using #!/usr/bin/env 

- Bumping git-clone version
- Change git-clone default userHome to fix clone error as non-root
`error: could not lock config file /home/git/.gitconfig: No such file or directory`

Signed-off-by: Nati Fridman <nafridma@redhat.com>
@tekton-robot
Copy link

Diff between version 0.9 and 0.10
diff --git a/task/git-clone/0.9/README.md b/task/git-clone/0.10/README.md
index dc7d2e2..26ab4c2 100644
--- a/task/git-clone/0.9/README.md
+++ b/task/git-clone/0.10/README.md
@@ -102,7 +102,7 @@ spec:
 * **verbose**: Log the commands that are executed during `git-clone`'s operation. (_default_: true)
 * **sparseCheckoutDirectories**: Which directories to match or exclude when performing a sparse checkout (_default_: "")
 * **gitInitImage**: The image providing the git-init binary that this Task runs. (_default_: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:TODO")
-* **userHome**: The user's home directory. (_default_: "/tekton/home")
+* **userHome**: The user's home directory. (_default_: "/workspace/nonroot")
 
 ## Results
 
diff --git a/task/git-clone/0.9/git-clone.yaml b/task/git-clone/0.10/git-clone.yaml
index 0ac2d72..931c68c 100644
--- a/task/git-clone/0.9/git-clone.yaml
+++ b/task/git-clone/0.10/git-clone.yaml
@@ -3,7 +3,7 @@ kind: Task
 metadata:
   name: git-clone
   labels:
-    app.kubernetes.io/version: "0.9"
+    app.kubernetes.io/version: "0.10"
   annotations:
     tekton.dev/pipelines.minVersion: "0.38.0"
     tekton.dev/categories: Git
@@ -107,7 +107,7 @@ spec:
       description: |
         Absolute path to the user's home directory.
       type: string
-      default: "/home/git"
+      default: "/workspace/nonroot"
   results:
     - name: commit
       description: The precise commit SHA that was fetched by this Task.

@tekton-robot
Copy link

Catlin Output
FILE: task/git-clone/0.10/git-clone.yaml
WARN : Step "clone" uses image "$(params.gitInitImage)" that contains variables; skipping validation

@tekton-robot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.

/lifecycle stale

Send feedback to tektoncd/plumbing.

@tekton-robot tekton-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 21, 2023
@piyush-garg
Copy link
Contributor

/test pull-tekton-catalog-build-tests

@tekton-robot
Copy link

Diff between version 0.9 and 0.10
diff --git a/task/git-clone/0.9/README.md b/task/git-clone/0.10/README.md
index dc7d2e2..26ab4c2 100644
--- a/task/git-clone/0.9/README.md
+++ b/task/git-clone/0.10/README.md
@@ -102,7 +102,7 @@ spec:
 * **verbose**: Log the commands that are executed during `git-clone`'s operation. (_default_: true)
 * **sparseCheckoutDirectories**: Which directories to match or exclude when performing a sparse checkout (_default_: "")
 * **gitInitImage**: The image providing the git-init binary that this Task runs. (_default_: "gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:TODO")
-* **userHome**: The user's home directory. (_default_: "/tekton/home")
+* **userHome**: The user's home directory. (_default_: "/workspace/nonroot")
 
 ## Results
 
diff --git a/task/git-clone/0.9/git-clone.yaml b/task/git-clone/0.10/git-clone.yaml
index 0ac2d72..931c68c 100644
--- a/task/git-clone/0.9/git-clone.yaml
+++ b/task/git-clone/0.10/git-clone.yaml
@@ -3,7 +3,7 @@ kind: Task
 metadata:
   name: git-clone
   labels:
-    app.kubernetes.io/version: "0.9"
+    app.kubernetes.io/version: "0.10"
   annotations:
     tekton.dev/pipelines.minVersion: "0.38.0"
     tekton.dev/categories: Git
@@ -107,7 +107,7 @@ spec:
       description: |
         Absolute path to the user's home directory.
       type: string
-      default: "/home/git"
+      default: "/workspace/nonroot"
   results:
     - name: commit
       description: The precise commit SHA that was fetched by this Task.

@natifridman
Copy link
Author

/retest

@tekton-robot
Copy link

@natifridman: 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
pull-tekton-catalog-integration-tests 24e05a9 link true /test pull-tekton-catalog-integration-tests

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/test-infra repository. I understand the commands that are listed here.

@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

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

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 23, 2024
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. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants