-
Notifications
You must be signed in to change notification settings - Fork 125
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
Green sirenia or bust! #6976
base: main
Are you sure you want to change the base?
Green sirenia or bust! #6976
Conversation
Test Results 13 files - 4 13 suites - 4 2h 49m 15s ⏱️ + 30m 26s Results for commit b555c49. ± Comparison against base commit dd6f355. This pull request removes 266 and adds 357 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
ddf1637
to
2f30836
Compare
Ldp::Gone is the error raised by the fedora adapter when the resource is a tombstone after being deleted.
The valkyrie fedora adapter does not convert RDF Date causing comparison failures. In real use the embargo transaction converts to a datetime, but this factory sets the value directly, so let's make it match real use.
This fixes file_set_indexer_spec which has a bunch of odd setup and mocking, likely from before our factories were equipped to handle building work/file_set/file_metadata stacks. However, it feels right to include here and be treated as an ObjectNotFoundError.
- All 3 test apps use the same container image. - dassie stays in hyrax-webapp, koppie/sirenia live in hyrax-koppie. - db_migrate service moved to dev-entrypoint in web service. - Worker waits to start until rails app is up, should reduce bundle install racing. - hyrax-engine-dev target now based on hyrax-worker-base. - Chrome is still a pain and randomly stops responding.
Add worker to depends_on to avoid volume copy race. Fix Dockerfile style issues Align chrome service config Corrected container names for log capture
Now that this spec uses the real valkyrie adapter, the object coming out of wings is really an anonymous descendant of the valkyrie model class.
2f30836
to
b555c49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great over all, I have a few questions but nothing that needs to stop the show
end_range = end_datetime.blank? ? '*' : end_datetime.utc.xmlschema | ||
args = "system_create_dtsi:[#{start_datetime.utc.xmlschema} TO #{end_range}]" | ||
args += " AND has_model_ssim: (#{models.map { |m| "\"#{m}\"" }.join(' OR ')})" unless models.empty? | ||
Hyrax::SolrService.query(args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this change the flavor of thing returned? instead of models [Array]
is it now SolrHit [Array]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this should be changed to return a model.
set -e | ||
|
||
# Wait for web app to avoid racing during bundle install | ||
db-wait.sh web:3000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be time to rename db-wait.sh
@@ -33,82 +32,67 @@ services: | |||
- 1049:1048 | |||
volumes: | |||
- ./bin:/app/samvera | |||
- .koppie:/app/samvera/hyrax-webapp | |||
- .koppie:/app/samvera/hyrax-koppie |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can I ask what we accomplish by making this different? its extra mental overhead to remember which is which unless it serves some purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was done to better support having both .dassie and .koppie available in the hyrax-engine-dev container image, but in the end it might not be necessary. My thinking was it is easier to know which test app you're in by the directory name, but you make a good point too. I'll look into undoing the hyrax-koppie dir.
publish_changes(resource: resource, user: user) | ||
@persister.delete(resource: resource) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? isn't it better to do the thing then publish that you did it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but fedora was complaining about tombstones. I'll double check this is still needed since there was another tombstone related fix in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still needed unless an alternative is found. Without the backwards order find_parents
in MemberCleanupListener
fails during rspec spec/hyrax/transactions/work_destroy_spec.rb
:
Ldp::Gone:
Discovered tombstone resource at /test/a1/38/5d/b3/a1385db3-8fbc-4330-b57d-7ffb972a5591, departed at: 2024-12-18T16:22:50.848357Z
# /app/bundle/ruby/3.2.0/gems/ldp-1.2.1/lib/ldp/client/methods.rb:119:in `block in check_for_errors'
# /app/bundle/ruby/3.2.0/gems/ldp-1.2.1/lib/ldp/client/methods.rb:117:in `check_for_errors'
# /app/bundle/ruby/3.2.0/gems/ldp-1.2.1/lib/ldp/client/methods.rb:53:in `block in get'
# /app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.10/lib/active_support/notifications.rb:205:in `instrument'
# /app/bundle/ruby/3.2.0/gems/ldp-1.2.1/lib/ldp.rb:43:in `instrument'
# /app/bundle/ruby/3.2.0/gems/ldp-1.2.1/lib/ldp/client/methods.rb:33:in `get'
# /app/bundle/ruby/3.2.0/gems/valkyrie-3.5.0/lib/valkyrie/persistence/fedora/query_service.rb:108:in `content_with_inbound'
# /app/bundle/ruby/3.2.0/gems/valkyrie-3.5.0/lib/valkyrie/persistence/fedora/query_service.rb:42:in `find_parents'
# ./app/services/hyrax/listeners/member_cleanup_listener.rb:19:in `on_object_deleted'
# /app/bundle/ruby/3.2.0/gems/dry-events-1.0.1/lib/dry/events/bus.rb:46:in `call'
# /app/bundle/ruby/3.2.0/gems/dry-events-1.0.1/lib/dry/events/bus.rb:46:in `block in publish'
# /app/bundle/ruby/3.2.0/gems/dry-events-1.0.1/lib/dry/events/bus.rb:38:in `block in process'
# /app/bundle/ruby/3.2.0/gems/dry-events-1.0.1/lib/dry/events/bus.rb:34:in `each'
# /app/bundle/ruby/3.2.0/gems/dry-events-1.0.1/lib/dry/events/bus.rb:34:in `process'
# /app/bundle/ruby/3.2.0/gems/dry-events-1.0.1/lib/dry/events/bus.rb:45:in `publish'
# /app/bundle/ruby/3.2.0/gems/dry-events-1.0.1/lib/dry/events/publisher.rb:207:in `publish'
# ./lib/hyrax/transactions/steps/delete_resource.rb:45:in `publish_changes'
@@ -4,6 +4,10 @@ | |||
# Run the jasmine tests by running the karma javascript test framework | |||
# The spec will fail if any jasmine tests fails. | |||
RSpec.describe "Jasmine" do | |||
before do | |||
`cd $RAILS_ROOT && bundle exec rake assets:precompile` if ENV['RAILS_ROOT'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is really expensive to do on every spec run... is there anything we can do to mitigate that cost?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find a way to make the JS tests work without compiling. This used to occur during the image build, so it's not a new time sink.
Fixes #6894
Summary
Get Sirenia specs passing and add to test matrix
Detailed Description
Many fixes for specs broken in sirenia (fedora 6/valkyrie). See individual commmit messages.
Docker compose files have been reworked to use the same image.
The custom queries added in support of valkyrie statistics support have been converted from SQL to Solr.