stevedlawrence commented on code in PR #18:
URL: 
https://github.com/apache/daffodil-infrastructure/pull/18#discussion_r2372207588


##########
actions/release-candidate/src/main.js:
##########
@@ -102,7 +102,14 @@ async function run() {
                        publish = false;
                }
 
-               const release_dir = `${ os.tmpdir() }/release`;
+               // the name of the directory where we store release artifacts 
doesn't actually

Review Comment:
   Note only is this the same comment, it's the exact same code. When GitHub 
runs an action, it has no way to download dependencies. Instead they must all 
be provided in the repository somehow. And there are really only two ways to do 
this:
   
   The first is to just commit the `node_modules` directory that contains all 
dependencies. GitHub will find that and be able to run the actions. But the 
`node_modules` directory can be huge and full of binary stuff--for us, it's 
something like150MB of dependencies. The bulk of that is the typescript library 
and the github action library, but still a ton of other little random 
dependencies.
   
   The second option is to essentially statically link everything into a single 
.js file and commit that. Then we don't need to commit the `node_modules` 
directory, and there's optimizations so that the compiled binary isn't 
ridiculously huge--in our case they're only only a handful of MB.
   
   The second option is and we, and most other GitHub actions do. The 
statically compiled stuff is in dist/{main,post}/index.js. And any time we make 
a change to main.js or post.js we need to also statically compile it to the 
index.js files and commit that along side it. And our CI has a check to make 
sure this is done. As far as I can tell, this is pretty standard practice for 
actions. You'll see most actions tend to have a dist directory that is 
basically the statically compiled version of their scripts.
   
   So for this reason, our PRs for this action should also have duplications, 
once for the core scripts, and the other for the statically compiled scripts.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to