ruby-docs-samples
ruby-docs-samples copied to clipboard
rspec: Metadata server on Google App Engine displays IP address read from metadata server failed
Note: #763 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.
commit: 0211f1dc84faf7dca9924ac9fa37e570b5c5690e 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">\n502 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}/
+
+
+502 Server Error
+
+
+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)>'
Looks like this issue is flaky. :worried:
I'm going to leave this open and stop commenting.
A human should fix and close this.
When run at the same commit (0211f1dc84faf7dca9924ac9fa37e570b5c5690e), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge).
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.
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.
This issue seems to be related to #https://github.com/teampoltergeist/poltergeist/issues/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.