Skip to content

gatsby-source-shopify: Improve urlBuilder format warning #37661

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hahlh
Copy link
Contributor

@Hahlh Hahlh commented Feb 15, 2023

Description

Improve the formatting and information provided in the console.warn to make the warnings actionable and provide context information about what is happening.

For large eCommerce projects it is common for these error to completely make Gatsby Cloud logs unusable because they cause they logs to surpass the maximum log length.

It has been not immediately clear were the error messages originate and they don't provide actionable information yet:

image

image

This PR doesn't yet address other question like whether jpeg should be considered valid and whether the warnings should be provided in another manner that doesn't make Gatsby Cloud logs unusable if such issues occur (e.g. with a migration of an existing large eCommerce site to Gatsby).

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Feb 15, 2023
@Hahlh
Copy link
Contributor Author

Hahlh commented Feb 15, 2023

AVIF is apparently also not available for gatsby-source-shopify. If the GraphQL query includes AVIF as a format, it throws these errors for likely every image as it tries to convert them to AVIF.
Please let me know whether you need a minimal reproduction and whether I could create a new ticket for tracking this one.

@LekoArts LekoArts added topic: source-shopify Related to the gatsby-source-shopify plugin topic: source-plugins Relates to the Gatsby source plugins (e.g. -filesystem) and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Feb 20, 2023
@LekoArts
Copy link
Contributor

Your screenshot shows jpeg but our Set includes this as a valid format 🤔

Do you mean you've used AVIF in the gatsbyImageData query? Can you give an example of what you mean?

@Hahlh
Copy link
Contributor Author

Hahlh commented Mar 2, 2023

Hey Lennart!

Thank you for the reply.

This appears to be related to jpeg vs jpg.
It relates to both this and avif (see second screenshot).

@Hahlh
Copy link
Contributor Author

Hahlh commented Mar 2, 2023

Same seems to happen with PNG instead of png:

image

This specific PR is only addressing the logging of these errors.
If you would like to, we can open another one to also address these false positives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: source-plugins Relates to the Gatsby source plugins (e.g. -filesystem) topic: source-shopify Related to the gatsby-source-shopify plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants