build: update binary-upload to use correct tarball name - #65282
Conversation
the binary-upload target uses $(TARNAME)-$(OSTYPE)-$(ARCH).tar.xz as the name to upload whereas it is created by the $(BINARYTAR) target as $(BINARYNAME). Since BINARYNAME includes the optional VARIATION when present this gets missed out int he binary-upload target, for example during a release build for Alpine/musl. This commit changes the binary-upload target to use the same variable for the tarball that is used when the file is created. Signed-off-by: Stewart X Addison <sxa@ibm.com>
|
Confirmed that it works with the Noting that there may be further issues if the promotion step has any problems with the filenames including the extra |
|
Ping @nodejs/releasers for review in case there's anything I might have missed with this change or if there are other regexs etc. which may need to be changed elsewhere to handle this. Noting that this is likely still a reasonable change even if other things are required as it does not seem to have a negative impact on any existing releases from what I can see as the filenames are as they were before - Line 1108 in 9e23066 iojs+release job does not use VARIATION anywhere other than the new code added for Alpine.
|
| chmod 664 $(TARNAME)-$(OSTYPE)-$(ARCH).tar.gz | ||
| scp -p $(TARNAME)-$(OSTYPE)-$(ARCH).tar.gz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-$(OSTYPE)-$(ARCH).tar.gz | ||
| ssh $(STAGINGSERVER) "rclone copyto nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-$(OSTYPE)-$(ARCH).tar.gz $(CLOUDFLARE_BUCKET)/nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-$(OSTYPE)-$(ARCH).tar.gz" | ||
| ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME)-$(OSTYPE)-$(ARCH).tar.gz.done" | ||
| chmod 664 $(BINARYNAME).tar.gz | ||
| scp -p $(BINARYNAME).tar.gz $(STAGINGSERVER):nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(BINARYNAME).tar.gz | ||
| ssh $(STAGINGSERVER) "rclone copyto nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(BINARYNAME).tar.gz $(CLOUDFLARE_BUCKET)/nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(BINARYNAME).tar.gz" | ||
| ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(BINARYNAME).tar.gz.done" |
There was a problem hiding this comment.
(Not a blocking comment).
Noting here that $(BINARYNAME) is defined as
Lines 1108 to 1112 in 9e23066
$(TARNAME)-$(OSTYPE)-$(ARCH)
$(OSTYPE) is defined as
Lines 13 to 16 in 9e23066
$(PLATFORM) is defined as
Lines 1001 to 1004 in 9e23066
i.e. they happen to have the same definition (as uname without parameters behaves as uname -s) which is how this has been working up until now 😅.
Using $(BINARYNAME) for consistency with what was created is much safer than the above, so +1.
|
As per the comments at nodejs/build#4423 (comment) we will need to get this backported to the release lines ASAP if we want to make this live. Once this is approved and merged in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65282 +/- ##
==========================================
- Coverage 90.32% 90.31% -0.02%
==========================================
Files 751 751
Lines 250000 250000
Branches 47231 47230 -1
==========================================
- Hits 225816 225788 -28
- Misses 15566 15620 +54
+ Partials 8618 8592 -26 🚀 New features to boost your workflow:
|
@nodejs/releasers thoughts? ☝️ |
The
binary-uploadtarget in the top level Makefile uses$(TARNAME)-$(OSTYPE)-$(ARCH).taras the name to upload whereas it is created by the$(BINARYTAR)target as$(BINARYNAME).tar. SinceBINARYNAMEincludes the optionalVARIATION(set tomusl) to distinguish it fromlinux-x64this is missing during thebinary-uploadtarget, for example during a release build for Alpine/musl causing the error described in nodejs/build#4423 (comment)This changes the
binary-upload targetto use the same variable for the tarball that is used when the file is created so there is consistency.