Closed busma13 closed 5 months ago
This solution works, but I want to look into why we can't just use the array of asset names for jobSpec.assets
. The initializeTestExecution
calls JobValidator.validateConfig()
. The JobValidator
uses the OperationLoader
which expects asset IDs, not assets names. It seems like jobConfig
and ExecutionConfig
types might be getting muddled.
I dug into this and here's what I found out:
OperationLoader
uses the asset name it is given as part of the path to the asset.JobValidator
is used exclusively by the JobsService
except for when it is used by tests. JobsService._ensureAssets()
converts all jobSpec.assets
strings to their IDs using spawnAssetLoader
, so validation always passes because the assets are in a subdirectory named as the asset ID.recovery-spec
is the only test that uses assets from the teraslice.assets_directory
. So asset names must be converted to asset IDs so that OperationLoader
has the proper path to the assets.OperationLoader
can use the asset name in the asset path to find the information it is looking for.I think the changes I have made in the PR solve the problem sufficiently.
This PR makes the following changes:
TerasliceHarness.getBaseAssetIds()
to get the IDs of autoloaded assetsTerasliceHarness.getBaseAssetIds()
inrecovery-spec
to set thejobSpec.assets
array to only the autoloaded assets.These changes prevent the
recovery-spec
from trying to use assets placed in theteraslice.assets_directory
by other tests running in parallel, that have not finished uploading to ES. Ref: #3567