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

Fix compatibility with configuration cache #304

Merged
merged 4 commits into from Sep 19, 2022
Merged

Fix compatibility with configuration cache #304

merged 4 commits into from Sep 19, 2022

Commits on Sep 16, 2022

  1. Fix compatibility with configuration cache

    This commit reworks the agent task actions so that they are compatible
    with the configuration cache. The problem was that when the configuration
    cache is enabled, it will try to serialize the task actions that we add,
    so that if the task is not up-to-date and that the configuration didn't
    change, it can replay the action.
    
    The problem was that our task action used, as an input, a `Provider<List<String>>`,
    where those strings represented paths which do _not_ exist when the
    action is serialized yet. In practice, we don't care, because those
    are implementation details of the task action: the directories will
    not exist _before_ the task is executed, and not _after_, they only
    exist during task execution.
    
    The configuration cache, however, wants to know about all inputs.
    We could have changed the action so that it uses a _root directory_
    instead of a list of directories as input, and make the computation
    of the `session-` directories _during_ the task action: this would
    have worked because the only input would be the "output directory"
    that we pass as root. However, the task action is also used in another
    task which uses completely different inputs, which are not derived
    from a single directory.
    
    At the same time, we _don't_ need the `Provider` semantics in the
    task action: all we care about is to have a supplier which will
    generate a list of directories. Therefore, we changed the `Provider`
    type to a `Supplier` one: the lambda will be serialized, but the
    only thing it will capture is the `outputDir` provider which is
    fine, configuration-cache wise.
    
    Now, let me take a pill.
    
    Fixes #302
    melix committed Sep 16, 2022
    Configuration menu
    Copy the full SHA
    d7a1da8 View commit details
    Browse the repository at this point in the history
  2. More configuration cache fixes

    Lambdas must be serializable in order to be configuration cache
    compatible.
    melix committed Sep 16, 2022
    Configuration menu
    Copy the full SHA
    d28d28e View commit details
    Browse the repository at this point in the history
  3. More configuration cache fixes

    melix committed Sep 16, 2022
    Configuration menu
    Copy the full SHA
    646f7d9 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2022

  1. Configuration menu
    Copy the full SHA
    165d8f8 View commit details
    Browse the repository at this point in the history