Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54207

Update delete plugin flow to error out for anything other than file not found

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: Minor Minor
    • evergreen

      This is in reference to this comment

      The error handling for plugin and directory deletions should fail silently if file or directory not found.  However, if we get any other error when attempting deletions, then the method should return an error.

      Acceptance criteria:

      • a test triggering showing that we now return an error if the file cannot be deleted and is not already absent
        • (removing Write Permission on the file during the test seems like a good candidate?)
      • In such case, the logging should be as clear as possible.

      Open question

      Should we have our own deleteFile variant that would try many steps to delete something before abandoning? (I am inclined to think so)

          [JENKINS-54207] Update delete plugin flow to error out for anything other than file not found

          Mandie Smith created issue -
          Mandie Smith made changes -
          Remote Link New: This issue links to "PR 320 comments relevant to this ticket (Web Link)" [ 21951 ]
          Baptiste Mathus made changes -
          Assignee Original: R. Tyler Croy [ rtyler ]

          Elton Alves added a comment -

          i would like to work on this issue, anyone can guide me ? im a little bit new with java, and i have only 1 PR on jenkins repo

           

          thanks

          Elton Alves added a comment - i would like to work on this issue, anyone can guide me ? im a little bit new with java, and i have only 1 PR on jenkins repo   thanks
          Baptiste Mathus made changes -
          Labels Original: evergreen newbie-friendly New: evergreen newbie-friendly technical-debt
          Baptiste Mathus made changes -
          Labels Original: evergreen newbie-friendly technical-debt New: evergreen newbie-friendly

          Marking this as blocked by JENKINS-54545, even if not absolutely the case. But it would probably be cleaner and more readable to handle errors and avoid a bit of duplication after we've promisified the code.

          Baptiste Mathus added a comment - Marking this as blocked by JENKINS-54545 , even if not absolutely the case. But it would probably be cleaner and more readable to handle errors and avoid a bit of duplication after we've promisified the code.
          Baptiste Mathus made changes -
          Link New: This issue is blocked by JENKINS-54545 [ JENKINS-54545 ]

          tonho, sorry missed your comment. This issue is about Jenkins Evergreen, whose code is https://github.com/jenkins-infra/evergreen. The language is currently (Node) Javascript and Typescript.
          For this very issue, this is going to be Typescript. But even if you do not know it well, and your goal is to learn, then very likely JENKINS-54545 first, then this one here are absolute great opportunities (the overall expected number of lines is going to be less than 50 modified lines for the former, and likely a dozen or so for the latter).

          Please come over our chat on https://gitter.im/jenkins-infra/evergreen so that we can help you. Likely you want to look at https://github.com/jenkins-infra/evergreen/blob/master/HACKING.adoc

          Thanks a bunch!

          Baptiste Mathus added a comment - tonho , sorry missed your comment. This issue is about Jenkins Evergreen, whose code is https://github.com/jenkins-infra/evergreen . The language is currently (Node) Javascript and Typescript. For this very issue, this is going to be Typescript. But even if you do not know it well, and your goal is to learn, then very likely JENKINS-54545 first, then this one here are absolute great opportunities (the overall expected number of lines is going to be less than 50 modified lines for the former, and likely a dozen or so for the latter). Please come over our chat on https://gitter.im/jenkins-infra/evergreen so that we can help you. Likely you want to look at https://github.com/jenkins-infra/evergreen/blob/master/HACKING.adoc Thanks a bunch!
          Baptiste Mathus made changes -
          Description Original: This is in reference to [this comment|[https://github.com/jenkins-infra/evergreen/pull/320#pullrequestreview-167387801].]

          The error handling for plugin and directory deletions should fail silently if file or directory not found.  However, if we get any other error when attempting deletions, then the method should return an error.
          New: This is in reference to [this comment|[https://github.com/jenkins-infra/evergreen/pull/320#pullrequestreview-167387801].]

          The error handling for plugin and directory deletions should fail silently if file or directory not found.  However, if we get any other error when attempting deletions, then the method should return an error.

          h3. Acceptance criteria:
          * a test triggering showing that we now return an error if the file cannot be deleted and is *not* already absent
          ** (removing Write Permission on the file during the test seems like a good candidate?)
          * In such case, the logging should be as clear as possible.

          h3. Open question
          Should we have our own {{deleteFile}} variant that would try many steps to delete something before abandoning? (I am inclined to think so)

            jennyfive Jen Lijó
            asmith_cb Mandie Smith
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: