-
Notifications
You must be signed in to change notification settings - Fork 5
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
Is the implicit get after a put necessary? #32
Comments
Thanks for submitting and issue! I totally agree with you that we should include a I'll want to verify whether Concourse actually does a |
If it helps this is the logs I see for implicit gets:
|
I think we'll run into a problem if we try to skip cloning the repo on the implicit jobs:
- name: test
plan:
- get: pull-request
trigger: true
version: every
- put: pull-request
params:
path: pull-request
status: pending
get_params: { skip_download: true } <--- pull-request volume will be empty!
- task: test
input_mapping: { source: pull-request } <--- Oh no! I've asked in the Concourse discord to validate whether or not this is how it works 😅 |
ups sorry closed by accident eheh, alright I'll wait for the feedback from the concourse team |
@itsdalmo Yeah, if you implement put: update-status
resource: pull-request
params: {...}
get_params: {skip_download: true} This will still have the implicit Which is super janky, but well, all PR workflows will be until we finish spaces support (and perhaps a notifications API for communicating commit status would be nice). :) |
Thanks @vito! Looking forward to resources v2, but what you are suggesting seems clean enough for now 😄 What do you think @pn-santos ? |
So if I understand correctly, I would need to "alias" the If that's so seems like an acceptable compromise. I was actually already thinking of aliasing them anyway. I'm using this resource to set 5 separate checks on github and having parallel |
@pn-santos - I've merged the PR to add Would you mind taking it for a spin and seeing if it works? I'm travelling today so unfortunately cannot test it in the wild myself 😄 |
Sure, I'll report back the results, thx for the quick turn around 👍 |
Everything seems to work ok, only had 1 minor issue, when using:
I got this:
I guess When I switched to:
then everything worked 💯 |
Thanks for testing this @pn-santos - #37 made |
Note, this does an implicit-get. If you wanted to avoid the extra "get" of the resource, this GitHub Issue provides a workaround: telia-oss/github-pr-resource#32 [#163883149]
Note, this does an implicit-get. If you wanted to avoid the extra "get" of the resource, this GitHub Issue provides a workaround: telia-oss/github-pr-resource#32 [#163883149]
from the docs: --- When specifying skip_download the pull request volume mounted to subsequent tasks will be empty, which is a problem when you set e.g. the pending status before running the actual tests. The workaround for this is to use an alias for the put (see telia-oss/github-pr-resource#32 for more details). Example here: put: update-status <-- Use an alias for the pull-request resource resource: pull-request params: path: pull-request status: pending get_params: {skip_download: true} --- Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
Is the implicit
get
that concourse does after aput
is necessary for this resource to work? or could it be skipped?I've had a look at the source code and there seems to be no way to use something similar to the
get_params: {skip_download: true}
of the docker image resource to skip the implicitget
step (please correct me if I'm wrong).In my case, I'm running 4 "checks" concurrently and at first glance, the get that is always executed after I update the checks status (with
put
) seems unecessary... Would it make sense to check for a "skip" in thein
step?The text was updated successfully, but these errors were encountered: