Follow-up from "Artifact 'abstraction' class"
Taken from the linked issue:
Element.stage_dependency_artifacts()for the incremental workspace build:
- Create a separate, temporary
last_successfulas that is really a different artifact.
- Move the optional
keyparameter from the
Artifactmethods to the
Artifactconstructor, storing it in a member variable. Makes much more sense, in my opinion, as this prevents accessing different artifacts with the same
- Create the
Artifactobject only when the relevant cache key is determined. Replace the
Artifactobject in the infrequent case when the relevant cache key changes (workspace build, pull in non-strict mode). I.e., create
- Move simplified metadata cache to the
Artifactclass. The above changes should guarantee that the same
Artifactobject is never used to access different artifacts and thus, this should allow simpler metadata caching.
- The above
- Use _get_subdirectory() when interacting directly with an artifact subdirectory
- Tidy up and removal of redundant accessors/private methods in element.py
This merge request, when approved, will close: #955 (closed)