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

Re-resolve / delete stored provenance information if downloading it in the scanner fails #8311

Open
sschuberth opened this issue Feb 19, 2024 · 3 comments
Labels
downloader About the downloader tool enhancement Issues that are considered to be enhancements scanner About the scanner tool

Comments

@sschuberth
Copy link
Member

sschuberth commented Feb 19, 2024

Sometimes, a provenance resolved successfully to some fixed revision, but at a later point in time the host disappeared (e.g. svn.codehaus.org). In that case, the resolved provenance is retrieved from the database and passed to the scanner wrapper, but the scanner implementation will fail to download it. See e.g. this data

  - provenance:
      vcs_info:
        type: "Subversion"
        url: "https://svn.codehaus.org/plexus/plexus-containers"
        revision: "981837"
        path: ""
      resolved_revision: "981837"
    scanner:
      name: "DOS"
      version: "1.0"
      configuration: ""
    summary:
      start_time: "2024-02-19T16:05:39.209930165Z"
      end_time: "2024-02-19T16:05:39.266308013Z"
      issues:
      - timestamp: "2024-02-19T16:05:39.265568285Z"
        source: "DOS"
        message: "IOException: Unable to initialize a Subversion working tree in '/tmp/ort-DefaultWorkingTreeCache4990696171266543978'\
          \ from https://svn.codehaus.org/plexus/plexus-containers.\nCaused by: SVNException:\
          \ svn: E175002: unknown host\nsvn: E175002: OPTIONS request failed on '/plexus/plexus-containers'\n\
          \    Caused by: UnknownHostException: svn.codehaus.org: Name or service\
          \ not known"
        severity: "ERROR"

In such a case it would be nice if the scanner implementation had a way to either trigger re-resolution of the provenance immediately, or at least delete the stored provenance to trigger re-resolution on the next run.

@sschuberth sschuberth added enhancement Issues that are considered to be enhancements downloader About the downloader tool scanner About the scanner tool labels Feb 19, 2024
@sschuberth
Copy link
Member Author

or at least delete the stored provenance

@fviernau do we happen to have a helper-cli command for this. maybe?

@fviernau
Copy link
Member

@fviernau do we happen to have a helper-cli command for this. maybe?

not that I'm aware of. orthw has a commad to delete the resolved provenance entries.

@sschuberth
Copy link
Member Author

orthw has a commad to delete the resolved provenance entries.

Note to myself:

https://github.com/oss-review-toolkit/orthw/blob/727d6dd4ba645872dd4cd5acb038232ba7d10a11/orthw#L666-L682

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
downloader About the downloader tool enhancement Issues that are considered to be enhancements scanner About the scanner tool
Projects
None yet
Development

No branches or pull requests

2 participants