-
Notifications
You must be signed in to change notification settings - Fork 74
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
Allow ArtifactLocator
s to have inputs derived from task outputs.
#1662
Conversation
Generate changelog in
|
Is this going to be sufficiently lazy? The case I ran into is one where an artifact property is derived from another task, so the property value can't actually be evaluated until the property's task dependencies have run rather than when the set of artifacts is realized. |
I think this should be fine? this is only ever passed into the output of another task, so it'd only be evaluated when trying to evaluate those inputs. It's a bit of a shame (having tighter validation loop). I'll write an extra integration test to confirm, but feel free to clone and check this against your use case as well, then we can iterate from there. |
configureEach
instead of whenObjectAdded
for the artifacts
block.ArtifactLocator
s to have inputs derived from task outputs.
ArtifactLocator
s to have inputs derived from task outputs.ArtifactLocator
s to have inputs derived from task outputs.
Released 7.58.0 |
Before this PR
When you usewhenObjectAdded
it will eagerly realise any objects that exist in the provider:So if a provider has a task output, it will complain because it's trying to realise it at configuration time, which is not possible.It turns out that the validation in
ArtifactLocator
would always callget
, so it's never enough to do aconfigureEach
or awhenObjectAdded
, as we would eagerly realise it the moment a concrete version was added to the set.An alternative is to wrap the
ArtifactLocator
into a provider, however, I believe that will lose task dependency information!After this PR
==COMMIT_MSG==
Allow
ArtifactLocator
s to have inputs derived from task outputs.==COMMIT_MSG==
Use
@Nested
inSetProperty
task input forCreateManifest
task. The validation happens when converting toJsonArtifactLocator
. Add integration tests that allow using derived task output providers.Possible downsides?