Skip to content
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

Uploading by pattern causes an infinite loop of repeated re-uploads #99

Open
neitzke opened this issue Dec 12, 2021 · 0 comments
Open

Comments

@neitzke
Copy link

neitzke commented Dec 12, 2021

Hi all,

When I try to upload files by pattern using the current HEAD version, 34c2c18, everything works fine except that after the last file is uploaded, the whole list of files gets uploaded again, and so on in a seemingly infinite loop. The logging output shows that the list of files to be uploaded grows by one file every time one is uploaded:

  File list: ab-paper-part2/ab-paper-part2.aux,ab-paper-part2/ab-paper-part2.bbl,ab-paper-part2/ab-paper-part2.bcf,ab-paper-part2/ab-paper-part2.blg,ab-paper-part2/ab-paper-part2.fdb_latexmk,ab-paper-part2/ab-paper-part2.fls,ab-paper-part2/ab-paper-part2.log,ab-paper-part2/ab-paper-part2.out,ab-paper-part2/ab-paper-part2.pdf,ab-paper-part2/ab-paper-part2.run.xml,ab-paper-part2/ab-paper-part2.synctex.gz,ab-paper-part2/ab-paper-part2.tex,ab-paper-part2/latexmkrc,ab-paper-part2/specnet.mac
  Start uploading 14 files
  Upload ab-paper-part2/ab-paper-part2.aux -> /cs-abelianization/Papers/Specnet/Part2/ab-paper-part2/ab-paper-part2.aux: 11784 Bytes
  Uploaded: ab-paper-part2/ab-paper-part2.aux with id id:0fCA6K8ET4QAAAAAAAAEmA
  Uploaded: ab-paper-part2/ab-paper-part2.aux
  1/15 files uploaded
  Upload ab-paper-part2/ab-paper-part2.bbl -> /cs-abelianization/Papers/Specnet/Part2/ab-paper-part2/ab-paper-part2.bbl: 466 Bytes
  Uploaded: ab-paper-part2/ab-paper-part2.bbl with id id:0fCA6K8ET4QAAAAAAAAEmg
  Uploaded: ab-paper-part2/ab-paper-part2.bbl
  2/16 files uploaded
  Upload ab-paper-part2/ab-paper-part2.bcf -> /cs-abelianization/Papers/Specnet/Part2/ab-paper-part2/ab-paper-part2.bcf: 105651 Bytes
  Uploaded: ab-paper-part2/ab-paper-part2.bcf with id id:0fCA6K8ET4QAAAAAAAAEmw
  Uploaded: ab-paper-part2/ab-paper-part2.bcf
  3/17 files uploaded

I took a peek at the code and I have a guess at what has to be changed to fix this: it is

diff --git a/src/main.ts b/src/main.ts
index 7a4925c..dd97ea2 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -47,7 +47,7 @@ async function run() {
             core.info(`Uploading ${percent}%: ${file}`)
           } else if (percent === 100) {
             core.info(`Uploaded: ${file}`)
-            files.push(file)
+            uploadedFiles.push(file)
           }
         },
         partSizeBytes: partSizeBytes,

This change is also available as e66109c in my fork.

Unfortunately I don't know anything about JavaScript or TypeScript, so I can't easily compile the changed version; thus I didn't make a pull request. I am hoping that someone who is able to compile it easily might be willing to do so.

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant