Issues with upgrades from 0.5 thru 0.8.1
Created by: elrayle
General observations:
- no issues related moving from release 0.5 to 0.6
- multiple issues moving to 0.7
- critical issue moving to 0.8 (reciprocal relationships hang in an infinite loop)
Compatibility Tests
Compatibility tests have exposed changes in previously supported behaviors. The changes have entered at different releases and are summarized here.
Test Location: spec/compatibility_tests
reciprocal_spec.rb
Releases Effected: 0.8.1
Severity: Critical - Hangs in an infinite loop. Reciprocal relationships are common.
Description:
This is described in detail in issue https://github.com/ActiveTriples/ActiveTriples/issues/147
persist_resume_equality_spec.rb
Releases Effected: 0.7.1
Severity: High - is there a work around? Seems to work at 0.8.1, but not at 0.7.1. Is it possible to get the code that makes this work at 0.8.1 back ported to 0.7.1?
Description:
In releases through 0.6.1, if an object was persisted and then read back into a new variable, the two instances passed an equality test, i.e. r1 == r2 is true.
NOTE: The structure of the resources changed in 0.7.0.
persist_blank_nodes_spec.rb
Releases Effected: 0.7.1, 0.8.1
Severity: High - This gets a different error at 0.7 and 0.8.
0.7.1 - Error: failed when trying to persist to non-existant repository or parent resource 0.8.1 - Error: uninitialized constant ActiveTriples::RDFSource::NullURI
Description:
Used by the LD4L::OpenAnnotationRDF gem and Stanford's Triannon annotations to hold the annotation body (e.g. comment text) for the annotation.hasBody predicate with the body as a blank node.
inherited_configuration_spec.rb
Releases Effected: 0.7.1, 0.8.1
Severity: Low - I have a work around by copying the configuration from the parent class to the child.
Description:
To accommodate multiple types, changes were made to the configuration code in 0.7. These changes resulted in configurations no longer being inherited by child resources.
replace_property_value_spec.rb
Releases Effected: worse in 0.8.1; effects all releases (see description)
Severity: Moderate - I believe I could use the set_values method instead of using .property_name method. I haven't tested this to be sure the workaround would be sufficient.
Description:
Setting a property to another resource has inconsistent handling compared to properties set to non-resource values.
- resource.property_name = "foo" - replaces the current value of the property
- resource.property_name = resource2 - fails at all levels in some circumstances
- if resource2 does not have a repository configured, then resource2 is appended to the list of values for the property (effects all releases)
- if resource2 does have a repository configured, then resource2 correctly replaces the value for releases < 0.8.1, but appends for 0.8.1
Testing Summary
Test | 0.5 | 0.6.1 | 0.7.1 | 0.8.1 |
---|---|---|---|---|
reciprocal_spec.rb | pass | pass | pass | HANGS |
persist_resume_equality_spec.rb | pass | pass | FAIL | pass |
persist_blank_nodes_spec.rb | pass | pass | FAIL | FAIL |
inherited_configuration_spec.rb | pass | pass | FAIL | FAIL |
replace_property_value_spec.rb | FAIL | FAIL | FAIL | FAIL |
Effect on dependent GEMs
Common changes to all GEMs
>= 0.6.0
- no changes required
>= 0.7.0
- remove all tests referencing solrizer
- starting at 0.7, update subject.type comparisons to not put expected value in an array
- starting at 0.7, optionally include RDFSource instead of inheriting from Repository (NOTE: Inheriting is still supported for backward compatibility.)
>= 0.8.0
- One change to #persist! test to allow subject.persistence_strategy to receive repository instead of subject
ld4l-open_annotation_rdf
0.7.1 - FAIL
- Made common changes (see above)
- failures due to issue related to persist_resume_equality_spec - This compatibility test passes at 0.8.1, so perhaps there is a workaround or fix for this.
- failures due to issue related to persist_blank_nodes_spec - Is there a work around for this? It complains there is not parent.
- failures due to issue related to inherited_configuration_spec - I would prefer this to work for this gem and potential future gems, but there is a reasonable work around for now by copying configuration to child classes.
- failures due to resuming wrong type of annotation in Annotation.resume method - Fixed - need to push fix for all releases
- other failures
- "undefined local variable or method `to_ary'" - annotation_spec.rb:192 - may be related to persist_resume_equality_spec failures as the code at that location is similar
0.8.1 - FAIL (39 failing tests)
- Made common changes (see above)
- failures due to issue related to persist_blank_nodes_spec (accounts for 29 of the failing tests)
- still investigating 10 failures
- "undefined local variable or method `to_ary'" - annotation_spec.rb:103
- comment body when blank node is nil - annotation_spec.rb:381
- tag body when blank node is nil - annotation_spec.rb:418
- in some cases, body used to not get persisted and now it does (5 failing tests) - pre-0.8.1, adding a body to an annotation did not persist it until the body was persisted manually with persist! or the annotation was persisted
- in other cases, body used to get persisted and now it doesn't (2 failing tests) - expected non-blank nodes to persist with parent annotation (perhaps blank node bodies persisted too, but this is related to non-blank node bodies)
ld4l-ore_rdf
0.7.1 - OK to upgrade
- Made common changes (see above)
- Passes all tests
0.8.1 - FAIL
- Made common changes (see above)
- effected by reciprocal_spec failures preventing upgrade to 0.8.1
- critical failure with infinite loop
- There could be more errors that occur after the hang related to the infinite loop
ld4l-foaf_rdf
This is a very simple gem and can run at any release of ActiveTriples with common updates applied.
0.7.1 - OK to upgrade
- Made common changes (see above)
- Passes all tests
0.8.1 - OK to upgrade
- Made common changes (see above)
- Passes all tests
GEM Summary
Running tests for each GEM.
Test | 0.5 | 0.6.1 | 0.7.1 | 0.8.1 |
---|---|---|---|---|
ld4l-open_annotation_rdf | pass | pass | FAIL | FAIL |
ld4l-ore_rdf | pass | pass | pass | HANGS |
ld4l-foaf_rdf | pass | pass | pass | pass |