Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update font URLs and add additional error handling#7418

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
emilykl merged 9 commits intomasterfromfix-font-redirects-ci
May 21, 2025

Conversation

@emilykl
Copy link
Contributor

@emilyklemilykl commentedMay 6, 2025
edited
Loading

We have been getting "529 Too Many Requests" errors when downloading fonts in the CI.

It seems these were due to multiple redirects happening for each font URL.

  • I've added the font files directly into the repo to sidestep all of this in the future (I don't love adding 10MB of size to the repo, and open to removing them in the future if it causes issues, but I also don't want to be spending any more time fixing the font downloads every few weeks)

  • I've updated the URLs in the script to use the "final" URL to avoid redirects, and this seems to resolve the issue -- download works successfully now

  • I've also setallow_redirects=False in the request and added logging to print the new URL so the script can be updated, so we can catch this earlier next time

  • I've updated the script to skip downloading the fonts if the file is already present, so while the download script will still run in the CI, it won't actually execute the downloads since the files are in the repo now

  • I've also updated the.circleci/env_image.sh script so that it will fail if any step fails, which was not the case before, which made this issue harder to debug

@gvwilsongvwilson added P1needed for current cycle fixfixes something broken performancesomething is slow labelsMay 8, 2025
install-geckodriver:false
install-chrome:true
chrome-version:"127.0.6533.119"
chrome-version:"136.0.7103.92"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

why this change?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

CI wasfailing with a message about "Chrome failed to start" and this resolved the issue; in any case, it seems good to keep the Chrome version somewhat up to date.

outfile=dir_out+name
print("Getting: ",url)
ifos.path.exists(outfile):
print(" => Already exists: ",outfile)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

rather than overwrite (I don't know how often font files themselves update)?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I did this instead of removing the download step from the CI; in other words, the download script will still run but it will not actually attempt to download the fonts because they are already in the repo.

I could alternatively modify the script to overwrite, and remove the step that runs the script from the CI. I liked this approach though because it's easier to revert if we change our minds about keeping the fonts in the repo.

I don't think we're worried about the font files being updated all that often... if we were I wouldn't want to put them in the repo.

@emilyklemilykl merged commitb560368 intomasterMay 21, 2025
1 check passed
@emilyklemilykl deleted the fix-font-redirects-ci branchMay 21, 2025 19:14
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@gvwilsongvwilsongvwilson approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

@emilyklemilykl

Labels

fixfixes something brokenP1needed for current cycleperformancesomething is slow

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@emilykl@gvwilson

[8]ページ先頭

©2009-2025 Movatter.jp