Skip to content

Feature Request: Adding execution timeout #47

@dgkf

Description

@dgkf

To support a safer failure mode for the execution engine (GitHub CI/CD), we thought that it might be useful for val.meter to make an effort to wrap up evaluation if it's getting close to the timeout for a GH runner.

We discussed that failing gracefully is a priority. Even if we are only able to derive partial information, it is more important that we have some data about a package so that end users can make downstream decisions about a cohort of packages in a snapshot of CRAN, as opposed to having to roll back to an earlier snapshot for specific packages that failed to generate metrics.

Some ideas:

Set individual metric limits (using setTimeLimit)

If we abort metrics that would evaluate beyond the runner timeout (probably with a small buffer), we could then reserve enough time for us to return NA for any remaining metrics and produce reported metrics that are as useful as possible.

We could then write out a PACKAGES file or .Rds as usual at the end of the session

Set session limits (using setSessionTimeLimit)

If instead we just wanted to abort the entire session when we are nearing the timeout, we then have a different problem - how do we record the metrics that were able to be evaluated?

We could stream to a PACKAGES file during evaluation. As metrics finish evaluating, they can write out to this file so that it builds over the course of metric evaluation. Even if interrupted, we'd have a partial PACKAGES file that would still be as useful as possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Discussion

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions