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

Failing Netlify Builds #142

Closed
richnoah opened this issue Jun 27, 2022 · 31 comments
Closed

Failing Netlify Builds #142

richnoah opened this issue Jun 27, 2022 · 31 comments
Assignees

Comments

@richnoah
Copy link

In the process of attempting to resolve the issue of missing content from PR 2379 Bocoup and other contributors have encountered build errors on Netlify.

An example of the build error can be seen on this deploy log.

It appears there is a Netlify mismatch. We found a similar issue on the Netlify build image repo PR 790

@SteveALee
Copy link
Contributor

SteveALee commented Jun 28, 2022

The most likely cause is a local build by someone has used a version of bundler that is not available in the netlify builds or clashes with that. Or is not compatible with the Ruby version we use, 2.6

This get recorded in the lock file.

It might be a problem with the bundler version not being fixed for local builds. If that is possible. Probably by making sure the lock file is under version control.

To resolve it make sure Ruby 2.6 is used locally and use a version of bundler specified in older lock files. The lock file should be checked in to vc to ensure local builds throw the error rather than netlify.

I used rvm to install the correct Ruby.

@richnoah
Copy link
Author

Still running into build errors. An issue was submitted to Netlify outlining a similar error. No responses as of yet: https://answers.netlify.com/t/unable-to-deploy-error-installing-bundler-non-zero-exit-code-1/70160

@SteveALee
Copy link
Contributor

Now I'm on my workstation I can clearly see the rror does not make sense

5:45:16 PM: Using bundler version 2.3.4 from Gemfile.lock
5:45:17 PM: ERROR:  Error installing bundler:
5:45:17 PM: 	"bundler" from bundler conflicts with /opt/buildhome/.rvm/gems/ruby-2.6.2/bin/bundler

I'm using bundler 2-3-10 and have had no problems. maybe they have changed they config?

@richnoah
Copy link
Author

@SteveALee who is they?

@SteveALee
Copy link
Contributor

it's deployed now

I forced a redeploy after throwing away the cache - not sure you have that option available in the Netlify web app.

On occasions of weird errors that often fixes them.

I notices you have used bundler 2.3.4 and I have 2.3.10 but that seems not to be an issue.

Let me know if other builds fail.

Steve

@evmiguel
Copy link
Collaborator

@SteveALee thank you for deploying. Could you clear the cache for #138? It would be good to see the builds pass as well. Thank you!

@evmiguel
Copy link
Collaborator

@SteveALee in addition to #138, could the caches for #140 and #141 be cleared as well?

@SteveALee
Copy link
Contributor

What a mess. Not sure why. Never seen that many before

now building

https://app.netlify.com/sites/wai-aria-practices2/deploys

@evmiguel
Copy link
Collaborator

Thank you @SteveALee

@evmiguel evmiguel reopened this Jun 28, 2022
@evmiguel
Copy link
Collaborator

Hi @SteveALee, I pushed a new commit to #138, and the build is still failing. Also failing for #145, which is in draft right now. Could you clear the caches for these?

@richnoah
Copy link
Author

@SteveALee you mentioned having the ability to do this via the Netlify web app. Are there credentials available for that in case we need to carry that out in the future? Sorry to be pinging you so much in the wee hours.

@SteveALee
Copy link
Contributor

Best to get to the bottom of the problem as this should not keep happening. I suspect the bundler version recorded in the lock file.

I'll discuss with @shawna-slh the option to give someone team access to netlify but we have limited to avoid accidents.

@SteveALee
Copy link
Contributor

OK so changing the bundler version seems to make no difference. And only a no cache build works.

Seems it needs chasing with netlify

@SteveALee
Copy link
Contributor

If you point me to the Netlify forum post you created I'll add more info

@richnoah
Copy link
Author

@SteveALee the Netifly forum post I referenced earlier was found through research. It has since been removed. We have not created a post in the forum but if it will help I am more than happy to do so.

@SteveALee
Copy link
Contributor

@richnoah ah, I see. no worries. I have a little time to explore today.

Did these previews ever deploy? If so any ideas as to what might have changed?

@richnoah
Copy link
Author

@SteveALee does not look like there were any deploys. @evmiguel and @howard-e have been researching and trying to determine first how to resolve and second what might have caused the issue. No findings yet. What would be helpful to you that we could provide on our end?

@SteveALee
Copy link
Contributor

I cannot see anything obvious that might cause the error - which is anyway not very specific. The config is good and comparable to others repos. As it only some new PRs that are failing it seem even less likely to be something Netlify specific.

I suggest you raise an issue with Netlify in their forums.

@evmiguel
Copy link
Collaborator

@SteveALee I tried to make a post in Netlify forums, and I received the following:
Screen Shot 2022-06-29 at 10 15 00 AM

@captn3m0
Copy link
Contributor

Facing the same issue with endoflife.date builds and I think the issue only exists for existing caches. Since Netlify doesn't provide a way to clear all build caches - only workaround for now seems to be to re-trigger a build.

captn3m0 added a commit to captn3m0/wai-aria-practices that referenced this issue Jun 29, 2022
As a workaround for w3c#142, set a ruby-version that doesn't have an existing cache on Netlify.
This prevents builds from using the poisoned cached with ruby-2.6, and builds should work correctly.

Based on tests [here](endoflife-date/endoflife.date#1360), where downgrading to ruby 3.0.3
seems to be a valid workaround.
@captn3m0
Copy link
Contributor

Filed #146 which avoids the issue by upgrading ruby to 2.7 (2.6 is no longer supported), which avoids the existing caches on Netlify.

Merging this should resolve the issue, however existing PRs will need to be rebased.

@evmiguel
Copy link
Collaborator

@captn3m0 thank you for moving so quickly! I added a .ruby-version to #138 before seeing the above.

@SteveALee
Copy link
Contributor

SteveALee commented Jun 29, 2022

In theory when I built without the cache that should have reset the issue by regenerating the cache- sigh! There is obviously a bug being triggered only in your repo as others are fine

Yes 2.6 is out of date but having you build your repo using a different version that the main wai website build may well lead to weird problems when @shawna-slh merges your code in. That could invalidate your preview testing. Upgrading everything to 2.7 woulds require a LOT of testing so we have not yet done it.

As a work around you could set that in your own branches but you must make sure of the need to test with 2.6. That is a risk. I'll defer to @shawna-slh on that decision.

Also the ruby version that Netlify uses is defined in the netlify.toml file. So no need for a new file unless that takes precedence.

@evmiguel evmiguel reopened this Jun 29, 2022
@evmiguel
Copy link
Collaborator

@SteveALee thank you for the clarification. I've removed the .ruby-version in #147 to be in congruence with WAI.

@SteveALee
Copy link
Contributor

@evmiguel thank - but we still need a fix for you! :(

@evmiguel
Copy link
Collaborator

@SteveALee here is the updated post on the Netlify forum: https://answers.netlify.com/t/deploy-fails-non-zero-exit-code-on-bundler-install/70245

@evmiguel
Copy link
Collaborator

@SteveALee could you please clear the cache for #148 in the meantime?

@SteveALee
Copy link
Contributor

deploy in progress.

@SteveALee
Copy link
Contributor

I tried a few things and switching the Docker image to be the Xenial Ubuntu my have fixed it. Absolutely no idea why

@evmiguel
Copy link
Collaborator

Confirmed that build passes in #149 @richnoah @SteveALee

@SteveALee
Copy link
Contributor

yay - I updated the support request - it's still not been looked at by Netlify :(

@richnoah richnoah closed this as completed Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants