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

Move to int for filehash.settings:dedupe config #877

Merged
merged 2 commits into from
Jun 8, 2022

Conversation

adam-vessey
Copy link

@adam-vessey adam-vessey commented Jun 3, 2022

GitHub Issue: This one.

  • Other Relevant Links (Google Groups discussion, related pull requests,
    Release pull requests, etc.)

What does this Pull Request do?

#862 moved to allow the newer version of filehash to be used; however, the newer version of filehash has updated the schema for the filehash.settings:dedupe property, meaning applying the configs from islandora_core_feature run into the warning(/error, when encountering in the context of a unit test):

Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for filehash.settings with the following errors: filehash.settings:dedupe variable type is boolean but applied schema class is Drupal\Core\TypedData\Plugin\DataType\IntegerData

/opt/drupal/web/core/lib/Drupal/Core/Config/Development/ConfigSchemaChecker.php:94
/opt/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php:142
/opt/drupal/web/core/lib/Drupal/Core/Config/Config.php:229
/opt/drupal/web/core/lib/Drupal/Core/Config/ConfigInstaller.php:399
/opt/drupal/web/modules/contrib/features/src/FeaturesConfigInstaller.php:99
/opt/drupal/web/core/lib/Drupal/Core/Config/ConfigInstaller.php:152
/opt/drupal/web/core/lib/Drupal/Core/Extension/ModuleInstaller.php:324
/opt/drupal/web/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php:83
/opt/drupal/web/core/lib/Drupal/Core/Test/FunctionalTestSetupTrait.php:474
/opt/drupal/web/core/tests/Drupal/Tests/BrowserTestBase.php:559
/opt/drupal/web/core/tests/Drupal/Tests/BrowserTestBase.php:378
[...]
/opt/drupal/vendor/phpunit/phpunit/src/Framework/TestResult.php:726

What's new?

Updated the value for filehash.settings:dedupe to follow the upstream schema change, to be an integer instead of a boolean.

  • Does this change add any new dependencies? No.
  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)? No.
  • Could this change impact execution of existing code? In and of itself, not really our concern (would be more of an issue of whatever downstream's binding to filehash). There's existing update hooks in filehash that would address this issue in the context of updating filehash in already-installed sites... that said, if one was to update and apply this config with an older version of filehash installed, presumably there were be warnings about the schema mismatching in the other direction.

How should this be tested?

Unsure. I'm encountering this in the context of unit testing a private module, which requires some of the fields defined in the islandora_core_feature. Could probably reproduce by similarly, in a Drupal site, install the bare minimum set of features, including:

  • islandora_core_feature and
  • filehash 2.x

Documentation Status

Doesn't seem like there should be anything documenting the specific data type of this config setting, in the context of Islandora.

  • Does this change existing behaviour that's currently documented?
  • Does this change require new pages or sections of documentation?
  • Who does this need to be documented for?
  • Associated documentation pull request(s): ___ or documentation issue ___

Additional Notes:

Any additional information that you think would be helpful when reviewing this
PR.

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora/8-x-committers

... was thinking it was the same kind of thing above, but I guess not.
@adam-vessey adam-vessey marked this pull request as ready for review June 3, 2022 18:49
@adam-vessey adam-vessey changed the title Move to int for config. Move to int for filehash.settings:dedupe config Jun 3, 2022
@alxp
Copy link

alxp commented Jun 8, 2022

Installed islandora_core_feature and filehash 2.0.5 on a clean site. Did not experience any strange behaviour when uploading files which I had seen before in pull request testing runs due to Filehash.

@alxp alxp merged commit 491631c into Islandora:2.x Jun 8, 2022
@adam-vessey adam-vessey deleted the fix/filehash-dedup branch July 18, 2022 14:36
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.

2 participants