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

Fix flaky integration tests on CI #7866

Closed
bep opened this issue Oct 21, 2020 · 9 comments · Fixed by #7867
Closed

Fix flaky integration tests on CI #7866

bep opened this issue Oct 21, 2020 · 9 comments · Fixed by #7867
Assignees
Milestone

Comments

@bep
Copy link
Member

bep commented Oct 21, 2020

ERROR 2020/10/21 07:25:56 Failed to get JSON resource "https://api.instagram.com/oembed/?url=https://instagram.com/p/BWNjjyYFxVx/&hidecaption=1": Failed to retrieve remote file: Bad Request

Also similar for the Twitter.

@bep bep added the Bug label Oct 21, 2020
@bep bep self-assigned this Oct 21, 2020
@bep bep added this to the v0.77 milestone Oct 21, 2020
bep added a commit to bep/hugo that referenced this issue Oct 21, 2020
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing).

Fixes gohugoio#7866
bep added a commit to bep/hugo that referenced this issue Oct 21, 2020
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing).

Fixes gohugoio#7866
bep added a commit to bep/hugo that referenced this issue Oct 21, 2020
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing).

Fixes gohugoio#7866
bep added a commit to bep/hugo that referenced this issue Oct 21, 2020
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing).

Fixes gohugoio#7866
bep added a commit to bep/hugo that referenced this issue Oct 21, 2020
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing).

Fixes gohugoio#7866
@moorereason
Copy link
Contributor

I'm assuming this is a rate limit issue? I wonder if it would it help to add backoff+retry options to the getJSON func.

@bep
Copy link
Member Author

bep commented Oct 21, 2020

We're not adding stuff to getJSON -- that will soon (hopefully) be replaced by a (hopefully) more robust resources.GetRemote (or something).

bep added a commit to bep/hugo that referenced this issue Oct 21, 2020
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing).

Fixes gohugoio#7866
bep added a commit to bep/hugo that referenced this issue Oct 21, 2020
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing).

Fixes gohugoio#7866
bep added a commit to bep/hugo that referenced this issue Oct 21, 2020
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing).

Fixes gohugoio#7866
bep added a commit to bep/hugo that referenced this issue Oct 21, 2020
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing).

Fixes gohugoio#7866
@bep bep closed this as completed in #7867 Oct 22, 2020
bep added a commit that referenced this issue Oct 22, 2020
This change is mostly motivated to get a more stable CI build (we're building the Hugo site there, with Instagram and Twitter shortcodes sometimes failing).

Fixes #7866
@onedrawingperday
Copy link
Contributor

Finally!!

cc: @kaushalmodi

@kaushalmodi
Copy link
Contributor

@onedrawingperday Thanks for tagging me here (and even remembering that I very much was troubled by that getJSON error).

@onedrawingperday
Copy link
Contributor

@kaushalmodi You're welcome. I've also been beaten by this error myself and I followed the discussion back then between you and Bjørn Erik closely. So of course, I remembered.

digitalcraftsman added a commit to gohugoio/hugoBasicExample that referenced this issue Oct 24, 2020
@digitalcraftsman
Copy link
Member

Due to failed HTTP requests the instagram short code has been removed from https://github.com/gohugoio/hugoBasicExample. However, approximately 20 whitelisted themes on www.themes.gohugo.io use a (customized) version of the https://github.com/gohugoio/hugoBasicExample that still include the instagram shortcode. Thus the demos for this themes can't be build.

As mentioned by Alexandros here the error can be suppressed for the whitelisted themes with an config option once Hugo 0.77.0 is released.


The actual reason why getJSON fails seems to be that the instagram shortcode is generating urls that point to a deprecated Instragram API endpoint.

When using the instagram shortcode with id BWNjjyYFxVx the shortcodes uses this template to construct the url https://api.instagram.com/oembed/?url=https://instagram.com/p/BWNjjyYFxVx. When opening it a notice informs you about the deprecation of the linked API endpoint.

@onedrawingperday
Copy link
Contributor

Hello @digitalcraftsman

instagram shortcode is generating urls that point to a deprecated Instragram API endpoint.

The above merits its own issue in the main issues tracker.

Apparently Instagram is ending the last remaining public API endpoint.

The Instagram shortcodes will either need to be refactored or removed.

@digitalcraftsman
Copy link
Member

Hello Alexandros,

I've added the information for context but created a new issue as suggested by you.

CaiJimmy pushed a commit to CaiJimmy/hugo-theme-stack that referenced this issue Oct 26, 2020
lxndrblz added a commit to lxndrblz/anatole that referenced this issue Oct 30, 2020
Closes #82 and #84

Please see the following link for more information sourrounding the issues with the Instagram Shortcode.

gohugoio/hugo#7866
ivangjxyz pushed a commit to ivangjxyz/anatole that referenced this issue Oct 31, 2020
Closes lxndrblz#82 and lxndrblz#84

Please see the following link for more information sourrounding the issues with the Instagram Shortcode.

gohugoio/hugo#7866
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants