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

Ruby by the Bay #569

Open
wants to merge 81 commits into
base: develop
Choose a base branch
from
Open

Ruby by the Bay #569

wants to merge 81 commits into from

Conversation

mi-wood
Copy link
Member

@mi-wood mi-wood commented Mar 30, 2019

Context

The Ruby by the Bay changes!

We'll use this to run in an app in heroku.

@mi-wood mi-wood changed the base branch from rubyforgood to develop March 30, 2019 19:32
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 March 30, 2019 19:33 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 March 30, 2019 20:41 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 March 30, 2019 21:00 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 March 30, 2019 21:31 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 March 30, 2019 21:46 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 March 30, 2019 22:26 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 March 30, 2019 22:34 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 March 30, 2019 23:25 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 March 30, 2019 23:56 Inactive
@DeeDeeG
Copy link
Contributor

DeeDeeG commented Mar 31, 2019

Hi folks! Very cool to see this much activity!

@DeeDeeG

This comment has been minimized.

@DeeDeeG

This comment has been minimized.

@mi-wood mi-wood temporarily deployed to refuge-staging-14-pr-569 April 1, 2019 18:22 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 April 1, 2019 18:24 Inactive
@mi-wood mi-wood temporarily deployed to refuge-staging-14-pr-569 April 1, 2019 18:27 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 April 1, 2019 18:32 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 April 1, 2019 18:47 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 April 1, 2019 18:57 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 April 1, 2019 19:13 Inactive
@tkwidmer tkwidmer temporarily deployed to refuge-staging-14-pr-569 April 4, 2019 19:57 Inactive
@DeeDeeG
Copy link
Contributor

DeeDeeG commented Apr 9, 2019

Hi folks, just taking a look at our CI checks...

Travis says there is one failing test...

Failed examples:
rspec ./spec/api/v1/restrooms_spec.rb:21 # Restrooms API does not list restroom edits
Failing test with full error message (To expand, click/tap, or keyboard focus and press "Enter.")
Failures:
  1) Restrooms API does not list restroom edits
     Failure/Error: edit = create(:restroom)
     
     ActiveRecord::RecordNotUnique:
       PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "restrooms_pkey"
       DETAIL:  Key (id)=(1) already exists.
       : INSERT INTO "restrooms" ("name", "street", "city", "state", "directions", "comment", "created_at", "updated_at", "downvote", "upvote", "country") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11) RETURNING "id"
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `async_exec_params'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `block (2 levels) in exec_no_cache'
     # /usr/local/bundle/gems/activesupport-5.2.2.1/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
     # /usr/local/bundle/gems/activesupport-5.2.2.1/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
     # /usr/local/bundle/gems/activesupport-5.2.2.1/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:610:in `block in exec_no_cache'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:579:in `block (2 levels) in log'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:578:in `block in log'
     # /usr/local/bundle/gems/activesupport-5.2.2.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:569:in `log'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:609:in `exec_no_cache'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:598:in `execute_and_clear'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:81:in `exec_query'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:122:in `exec_insert'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql/database_statements.rb:115:in `exec_insert'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:154:in `insert'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:21:in `insert'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/persistence.rb:185:in `_insert_record'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/persistence.rb:732:in `_create_record'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/counter_cache.rb:184:in `_create_record'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/locking/optimistic.rb:70:in `_create_record'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/attribute_methods/dirty.rb:140:in `_create_record'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/callbacks.rb:346:in `block in _create_record'
     # /usr/local/bundle/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
     # /usr/local/bundle/gems/bugsnag-6.8.0/lib/bugsnag/integrations/rails/active_record_rescue.rb:25:in `run_callbacks'
     # /usr/local/bundle/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:816:in `_run_create_callbacks'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/callbacks.rb:346:in `_create_record'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/timestamp.rb:102:in `_create_record'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/persistence.rb:703:in `create_or_update'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/callbacks.rb:342:in `block in create_or_update'
     # /usr/local/bundle/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:132:in `run_callbacks'
     # /usr/local/bundle/gems/bugsnag-6.8.0/lib/bugsnag/integrations/rails/active_record_rescue.rb:25:in `run_callbacks'
     # /usr/local/bundle/gems/activesupport-5.2.2.1/lib/active_support/callbacks.rb:816:in `_run_save_callbacks'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/callbacks.rb:342:in `create_or_update'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/persistence.rb:306:in `save!'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/validations.rb:52:in `save!'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/transactions.rb:315:in `block in save!'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/transactions.rb:387:in `block in with_transaction_returning_status'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `block in transaction'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `transaction'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/transactions.rb:212:in `transaction'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/transactions.rb:385:in `with_transaction_returning_status'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/transactions.rb:315:in `save!'
     # /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/suppressor.rb:48:in `save!'
     # /usr/local/bundle/gems/factory_bot-4.8.2/lib/factory_bot/configuration.rb:18:in `block in initialize'
     # /usr/local/bundle/gems/factory_bot-4.8.2/lib/factory_bot/evaluation.rb:18:in `create'
     # /usr/local/bundle/gems/factory_bot-4.8.2/lib/factory_bot/strategy/create.rb:12:in `block in result'
     # /usr/local/bundle/gems/factory_bot-4.8.2/lib/factory_bot/strategy/create.rb:9:in `tap'
     # /usr/local/bundle/gems/factory_bot-4.8.2/lib/factory_bot/strategy/create.rb:9:in `result'
     # /usr/local/bundle/gems/factory_bot-4.8.2/lib/factory_bot/factory.rb:43:in `run'
     # /usr/local/bundle/gems/factory_bot-4.8.2/lib/factory_bot/factory_runner.rb:29:in `block in run'
     # /usr/local/bundle/gems/activesupport-5.2.2.1/lib/active_support/notifications.rb:170:in `instrument'
     # /usr/local/bundle/gems/factory_bot-4.8.2/lib/factory_bot/factory_runner.rb:28:in `run'
     # /usr/local/bundle/gems/factory_bot-4.8.2/lib/factory_bot/strategy_syntax_method_registrar.rb:20:in `block in define_singular_strategy_method'
     # ./spec/api/v1/restrooms_spec.rb:23:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # PG::UniqueViolation:
     #   ERROR:  duplicate key value violates unique constraint "restrooms_pkey"
     #   DETAIL:  Key (id)=(1) already exists.
     #   /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:611:in `async_exec_params'
Finished in 39.64 seconds (files took 2.57 seconds to load)
66 examples, 1 failure, 4 pending
Failed examples:
rspec ./spec/api/v1/restrooms_spec.rb:21 # Restrooms API does not list restroom edits
.

And there are also these not-actual-tests:

Fake tests (To expand, click/tap, or keyboard focus and press "Enter.")
Pending: (Failures listed here are expected and do not affect your suite's status)
  1) UserMailer add some examples to (or delete) /refugerestrooms/spec/mailers/user_mailer_spec.rb
     # Not yet implemented
     # ./spec/mailers/user_mailer_spec.rb:4
  2) BulkImportJob add some examples to (or delete) /refugerestrooms/spec/jobs/bulk_import_job_spec.rb
     # Not yet implemented
     # ./spec/jobs/bulk_import_job_spec.rb:4
  3) BulkUpload add some examples to (or delete) /refugerestrooms/spec/models/bulk_upload_spec.rb
     # Not yet implemented
     # ./spec/models/bulk_upload_spec.rb:4
  4) User add some examples to (or delete) /refugerestrooms/spec/models/user_spec.rb
     # Not yet implemented
     # ./spec/models/user_spec.rb:4
.

I also note that the review Heroku instance has NatureBridge Building (Fort Cronkite, Sausalito) in its db, from spec/fixtures/restrooms.csv, rather than the contents of db/seeds.rb.

... And there is a commit that says "REVERT AFTER DEMO", so maybe some of this can be changed now that we are past the hackathon?

P.S. Thanks everyone who participated! I hope it was a great time!

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Apr 9, 2019

Unrelatedly, Code Climate suggests that some of the new code is too complex, or too many lines per method. I'll leave it to the code-savvy people to consider whether we want to go in and simplify and/or refactor.

Copy link
Contributor

@DeeDeeG DeeDeeG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a plan to merge this?

Looks like it needs some cleanup to revert things now that the demo is over.

Also not sure if we need a login button from the home screen at all times, since most of the site can be operated without doing bulk uploads or admin tasks. But open to it.

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

Successfully merging this pull request may close these issues.

8 participants