autophagy commented on a change in pull request #16332:
URL: https://github.com/apache/flink/pull/16332#discussion_r662842662



##########
File path: tools/azure-pipelines/jobs-template.yml
##########
@@ -129,6 +129,22 @@ jobs:
     condition: not(eq('${{parameters.test_pool_definition.name}}', 'Default'))
     displayName: Cache Maven local repo
 
+  - task: Cache@2
+    inputs:
+      key: '"$(module)" | $(TESTCONTAINER_CACHE_KEY)'
+      restoreKeys: '"$(module)" | $(TESTCONTAINER_CACHE_FALLBACK_KEY)'
+      path: $(TESTCONTAINER_CACHE_FOLDER)
+      cacheHitVar: TESTCONTAINER_CACHE_HIT
+    continueOnError: true
+    condition: not(eq('${{parameters.test_pool_definition.name}}', 'Default'))
+    displayName: Cache Testcontainer docker images
+
+  - script: |
+      docker load -i $(TESTCONTAINER_CACHE_FOLDER)/cache.tar || true
+    displayName: Restore Testcontainer docker images
+    condition: and(not(canceled()), eq(variables.TESTCONTAINER_CACHE_HIT, 
'true'))
+    continueOnError: true

Review comment:
       Ah, I think I understand: there wasnt a cache hit for the key, so it 
fell to the fallback cache which populates `TEST_CONTAINER_CACHE_HIT` with 
`inexact` rather than `true`. Switching to a static cache key and removing the 
fallback key will mean this won't occur again. Thanks for pointing it out 
:sweat_smile: 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to