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

rspec: Metadata server on Google App Engine displays IP address read from metadata server failed #853

Closed
flaky-bot bot opened this issue Sep 3, 2021 · 4 comments · Fixed by #1095
Assignees
Labels
flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. samples Issues that are directly related to samples. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@flaky-bot
Copy link

flaky-bot bot commented Sep 3, 2021

Note: #763 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.


commit: 0211f1d
buildURL: Build Status, Sponge
status: failed

Test output
Failure/Error:
  expect(page.body).to match(
    /External IP: \d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/
  )

expected "\n<meta http-equiv="content-type" content="text/html;charset=utf-8">\n<title>502 Ser... not complete your request.

Please try again in 30 seconds.

\n

\n\n" to match /External IP: \d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}/
Diff:
@@ -1,10 +1,19 @@
-/External IP: \d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}/
+
+
+<title>502 Server Error</title>
+
+
+

Error: Server Error


+

The server encountered a temporary error and could not complete your request.

Please try again in 30 seconds.


+


+
+
./spec/metadata_server_spec.rb:32:in `block (2 levels) in <top (required)>'

@flaky-bot flaky-bot bot added flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 3, 2021
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Sep 3, 2021
@flaky-bot flaky-bot bot added the flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. label Sep 4, 2021
@flaky-bot
Copy link
Author

flaky-bot bot commented Sep 4, 2021

Looks like this issue is flaky. 😟

I'm going to leave this open and stop commenting.

A human should fix and close this.


When run at the same commit (0211f1d), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).

@dazuma dazuma added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Sep 10, 2021
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Dec 9, 2021
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Mar 2, 2022
@dazuma
Copy link
Member

dazuma commented Aug 18, 2022

Seems to be happening consistently now.

Failures:

  1) Metadata server on Google App Engine displays IP address read from metadata server
     Failure/Error: visit @url

     Capybara::Poltergeist::StatusFailError:
       Request to '' failed to reach server, check DNS and/or server status
     # ./spec/metadata_server_spec.rb:30:in `block (2 levels) in <top (required)>'

Finished in 13 minutes 9 seconds (files took 0.37129 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/metadata_server_spec.rb:29 # Metadata server on Google App Engine displays IP address read from metadata server

The deployment tries four times, and fails with the following:

ERROR: (gcloud.app.deploy) Error Response: [9] An internal error occurred while processing task /app-engine-flex/flex_await_healthy/flex_await_healthy>2022-08-18T15:32:45.048Z1168.fn.0: app.rb:16:in `require': cannot load such file -- sinatra (LoadError)
	from app.rb:16:in `<main>'
ERROR: (gcloud.app.deploy) ABORTED: Cannot operate on apps/cloud-samples-ruby-test-kokoro/services/default/versions/adataserver-4fa3a12542 because an operation is already in progress for apps/cloud-samples-ruby-test-kokoro/services/default/versions/adataserver-4fa3a12542 by 7347e8f6-715e-4883-adfa-85e042c9da34.
ERROR: (gcloud.app.deploy) Error Response: [9] An internal error occurred while processing task /app-engine-flex/flex_await_healthy/flex_await_healthy>2022-08-18T15:39:24.651Z1458.fn.2: app.rb:16:in `require': cannot load such file -- sinatra (LoadError)
	from app.rb:16:in `<main>'
ERROR: (gcloud.app.deploy) ABORTED: Cannot operate on apps/cloud-samples-ruby-test-kokoro/services/default/versions/adataserver-4fa3a12542 because an operation is already in progress for apps/cloud-samples-ruby-test-kokoro/services/default/versions/adataserver-4fa3a12542 by 02a5f1fe-007c-4660-afcd-bfd054ae58d0.

This is a bit puzzling to me. The symptom appears to be that it's not able to load sinatra.rb, but sinatra is definitely installed in the bundle:

Step #1: Step 11/14 : RUN bundle install --deployment --without="development test" && rbenv rehash
Step #1:  ---> Running in fadd4ed42787
Step #1: [DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set deployment 'true'`, and stop using this flag
Step #1: Warning: the running version of Bundler (2.1.4) is older than the version that created the lockfile (2.3.20). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.3.20`.
Step #1: Fetching gem metadata from https://rubygems.org/....
Step #1: Using bundler 2.1.4
Step #1: Fetching ruby2_keywords 0.0.5
Step #1: Installing ruby2_keywords 0.0.5
Step #1: Fetching mustermann 2.0.2
Step #1: Installing mustermann 2.0.2
Step #1: Fetching rack 2.2.4
Step #1: Installing rack 2.2.4
Step #1: Fetching rack-protection 2.2.2
Step #1: Installing rack-protection 2.2.2
Step #1: Fetching tilt 2.0.11
Step #1: Installing tilt 2.0.11
Step #1: Fetching sinatra 2.2.2
Step #1: Installing sinatra 2.2.2
Step #1: Bundle complete! 5 Gemfile dependencies, 7 gems now installed.
Step #1: Gems in the groups development and test were not installed.
Step #1: Bundled gems are installed into `./vendor/bundle`

It is probably worth trying to reproduce this in isolation by doing a clean deploy of the app.

@SandeepTuniki
Copy link
Contributor

Update - @bajajneha27 and I attempted to reproduce this issue, but we were able to deploy the app on joonix. I'll attempt this one more time during my next rotation.

@SandeepTuniki
Copy link
Contributor

SandeepTuniki commented Jul 11, 2023

This issue seems to be related to #teampoltergeist/poltergeist#936

EDIT: The issue is unrelated to poltergeist, and is fixed in #1095. However, poltergeist is unmaintained since 2020 atleast, so we need to move away from it. I'll create a separate issue to track this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flakybot: flaky Tells the Flaky Bot not to close or comment on this issue. flakybot: issue An issue filed by the Flaky Bot. Should not be added manually. priority: p2 Moderately-important priority. Fix may not be included in next release. 🚨 This issue needs some love. samples Issues that are directly related to samples. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants