-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support downloads from other workflows #517
base: main
Are you sure you want to change the base?
Conversation
120ae0f
to
32ebaaf
Compare
I've started putting together a unit test to validate these changes, but I'm running in to a bit of a hurdle with mocking Thanks! |
Hi @owenfarrell Thanks for opening this PR! Sharing some information as I'm not entirely sure yet if we want to go down this approach as there have been some recent discussions going on internally. Better continuous deployment is huge ask that we're starting to pick up work in the area. Artifacts is a big piece of the puzzle and the ability to easily download from other workflows is paramount. The API you see documented here https://developer.github.com/v3/actions/artifacts/#download-an-artifact is basically an external API. You can use it to download artifacts from any workflow, however it's fairly limited as you can only get a zip. Networking resiliency is a big issue so we need the ability to retry downloads without starting the whole thing over. The current APIs used in @actions/artifact are special internal APIs that can download files individually from an artifact with retries and everything however they are scoped only to a single workflow run. There has been some internal discussions about possibly expanding the scope of the internal APIs to allow artifacts from other workflows and runs to be downloaded using the same api token (this is tricky as there are a lot of security implications). There are also considerations to expand the APIs available here: https://developer.github.com/v3/actions/artifacts/ but that poses it's own challenges. Internally we're still coming up with a plan as there are a lot of architectural & engineering considerations that we have to take into account. I wanted to offer at least some feedback and transparency regarding the direction of your PR. If there are any new developments I'll make sure to communicate them 😃 |
Hi @konradpabjan, tl;dr I truly appreciate the acknowledgment and response. And I recognize that this isn't a straightforward problem to solve given the blend of internally-, privately-, and publicly-available assets.
Your comment here hints at the concept, but I want to call this out explicitly - this isn't just a continuous deployment problem. Continuous deployment is certainly part of it, but the principle of building once applies to lots of aspects across the entire SDLC (e.g. analysis, integration, testing). And users' desire to adhere to that "build once" principle is demonstrated by the fact that this was the very first issue raised against the However, I think there is a willingness to take on a truly minimum viable product (or something "fairly limited" as you put it) since users are leveraging workarounds that use the public, external API already. I don't say that in an attempt to endorse my own PR, but rather to highlight the continued cost of delay. Without a de facto standard, we're going to continue to rely on workarounds... and those workarounds aren't going to adhere to the non-functional requirements you've identified (e.g. security concerns like leaking private artifacts). I'm looking forward to seeing what you and your team come up with in order to help close that gap. Please let me know if I can provide any support. Cheers, |
+1 on this one, is there a ticket I can follow?
@konradpabjan Indeed this is restrictive. In my case I have already compressed (tar+zstd) my artifact into one file. The API gives me the choice of downloading it, but with limitations:
I appreciate the team's work, please do let us know of updates as workarounds are getting finicky. EDIT: I just notice this is a very specific pull request (that is definitely interesting as the start of solving the issues described). I don't want to distract the conversation, if there are github issues tracking the progress I would be happy to comment there, otherwise I'll open new ones, I guess under the upload-artifact project. |
Issue with downloading artifact from another workflow. More info: actions/toolkit#517
Created owenfarrell#2 to update this PR's branch with the latest code from |
Signed-off-by: Owen Farrell <owen.farrell@gmail.com>
@vaughan-clare In order to keep the commit log clean(er), I rebased over the top of |
any updates on the support for this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #501