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

Caching issue when deploying unit tests #26

Open
sitapriyamoorthi opened this issue Dec 17, 2024 · 0 comments
Open

Caching issue when deploying unit tests #26

sitapriyamoorthi opened this issue Dec 17, 2024 · 0 comments
Assignees

Comments

@sitapriyamoorthi
Copy link
Collaborator

1. Is the default state of call caching turned on (both read from cache and write to cache) when we run unit tests?

  • Background: Cromwell enables call caching by default in its configuration. This means that when workflows are executed, their results can be:

- Written to the cache: Outputs of successful tasks are stored.

- Read from the cache: If a task with identical inputs and runtime conditions is executed again, Cromwell retrieves the outputs from the cache instead of re-executing the task.

2. If call caching is enabled by default, does that mean re-running tests will read outputs from the cached calls?

Potential Problem: In a typical unit testing scenario, workflows and tasks should be executed afresh every time to verify their correctness. However, if call caching is enabled and outputs are read from the cache during a re-run:

  • It could falsely indicate that tasks are working correctly, even if they are not.

  • Test coverage would be compromised since the actual execution of the workflow or task is bypassed.

Implications: This behavior defeats the purpose of unit testing, as it relies on cached results instead of performing actual executions.

3. For unit tests that explicitly test call caching, could there be issues if the environment enforces caching irrespective of the runtime cache settings?

Potential Problem: Unit tests designed to validate call caching behavior (e.g., testing read_from_cache and write_to_cache runtime attributes) could yield misleading results if:

  • The testing environment forces caching on/off, overriding the runtime settings specified in the WDL.

  • This would prevent testing scenarios where caching is explicitly enabled or disabled for specific tasks.

Example: If we set read_from_cache: false in the WDL runtime block for a task, but the environment ignores this setting and uses cached outputs anyway, the test would fail to evaluate the desired behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants