Skip to content

Commit b64e4dd

Browse files
committed
Stuff
1 parent 8f7cd77 commit b64e4dd

2 files changed

Lines changed: 12 additions & 9 deletions

File tree

.github/workflows/CI.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
# This job takes a long time (1+ hours).
5050
# So we intentionally skip this job on PR runs.
5151
# But we still run this job on Merge Queue jobs.
52-
if: github.event_name != 'pull_request'
52+
# if: github.event_name != 'pull_request' # TODO: Uncomment this line before merging the PR
5353
runs-on: ubuntu-latest
5454
timeout-minutes: 360
5555
strategy:
@@ -69,7 +69,7 @@ jobs:
6969
make clean
7070
make nuke
7171
make purge_download_cache_dir
72-
- name: Download the old versions.json, so we can re-use it
72+
- name: Download the old versions.json, so we can re-use it and build on top of it
7373
run: curl -LO https://julialang-s3.julialang.org/bin/versions.json
7474
- name: Build versions.json
7575
run: make build
@@ -95,7 +95,6 @@ jobs:
9595
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'
9696
runs-on: ubuntu-latest
9797
timeout-minutes: 60
98-
9998
steps:
10099
- name: Download versions.json from previous job
101100
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
@@ -112,7 +111,7 @@ jobs:
112111
- name: Purge Fastly cache (Fastly sits in front of S3)
113112
run: curl -X PURGE https://julialang-s3.julialang.org/bin/versions.json
114113

115-
test-current-s3:
114+
test-current-s3-allowed-to-fail:
116115
# We intentionally do not make this job a "required status check" on PRs.
117116
# Because if the currently deployed `versions.json` on S3 is already broken,
118117
# then this job will fail, which would block us from merging a PR with fixes.

src/VersionsJSONUtil.jl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -548,12 +548,12 @@ function main!(content::OutputJsonContent, cfg::Config)
548548
# Download this URL to a local file in a temp directory
549549
number_urls_tried += 1
550550

551-
# This will download the file to a tempfile, which will automatically
552-
# be cleaned up when the Julia process exits.
551+
# This will download the file to a tempfile
553552
filepath = Downloads.download(string(url))
554553

555554
if filesize(filepath) == 0
556555
# The file is empty
556+
rm(filepath; force = true)
557557
update_download_progress!(version, filename; advance = true)
558558
continue # skip the rest of this for-loop iteration
559559
end
@@ -622,6 +622,9 @@ function main!(content::OutputJsonContent, cfg::Config)
622622
# Let's be forward-thinking: Make this an array of dictionaries that is
623623
# easy to extensibly match.
624624
push!(meta[version].files, FileDict(file_dict))
625+
626+
# Delete the downloaded file
627+
rm(filepath; force = true)
625628
end
626629

627630
file_dict = find_filedict(content, version, url)
@@ -640,11 +643,12 @@ function main!(content::OutputJsonContent, cfg::Config)
640643
asc_filename = basename(string(asc_url))
641644
@debug "Downloading $asc_filename"
642645
try
643-
asc_filepath = download_to_cache(asc_filename, asc_url)
646+
asc_filepath = Downloads.download(string(asc_url))
644647
asc_signature = String(read(asc_filepath))
648+
rm(asc_filepath)
645649
catch ex
646-
if (ex isa HTTP.Exceptions.StatusError) && (ex.status == 404)
647-
# mark_url_as_nonexistent!(content, version, url) # TODO: Decide if we want to mark
650+
if (ex isa Downloads.RequestError) && (ex.response.status == 404)
651+
mark_url_as_nonexistent!(content, version, url)
648652
update_download_progress!(version, filename; advance = true)
649653
continue # skip the rest of this for-loop iteration
650654
else

0 commit comments

Comments
 (0)