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

Fix/broken term #21

Merged
merged 3 commits into from
Jun 20, 2023
Merged

Fix/broken term #21

merged 3 commits into from
Jun 20, 2023

Conversation

adam-vessey
Copy link
Contributor

What does this Pull Request do?

Avoids creating a broken taxonomy term on installation during site installation proper.

What's new?

A in-depth description of the changes made by this PR. Technical details and
possible side effects.

  • Changes x feature to such that y
  • Added x
  • Removed y
  • Does this change add any new dependencies?
  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)?
  • Could this change impact execution of existing code?

How should this be tested?

A description of what steps someone could take to:

  • Reproduce the problem you are fixing (if applicable)
  • Test that the Pull Request does what is intended.
  • Please be as detailed as possible.
  • Good testing instructions help get your PR completed faster.

Documentation Status

  • 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/committers

Pointing at the appropriate term-existence check helps. :P
@rosiel
Copy link
Member

rosiel commented May 30, 2023

Maybe I jumped the gun on this... but I confirmed the problem that a term was being created without a URI. However with this branch in my starter-site, using commit 3aca206, no Mirador term was created at all.

@adam-vessey
Copy link
Contributor Author

@rosiel : Would be up to adding/ensuring the new islandora_mirador_tags migration is included in the set of whatever migrations run during site installation... "traditionally", this was done with the --group=islandora bit, but it seems like things might've moved to target specific migrations?:

@rosiel
Copy link
Member

rosiel commented May 31, 2023

Dang, of course.

I don't think there was a desire to go for specific migrations rather than calling as a group, but the migrations currently aren't all tagged 'islandora'. Secondly, there's a when clause in the Playbook that insinuates that sometimes the FITS migration shouldn't run. I'm hesitant to take that out because I don't want to get burned.

So in short I think we were lazy and listed migrations, rather than it being a deliberate choice. But now that we've brought it up, there's a lot of work we should do to harmonize the READMEs and the code.

@adam-vessey
Copy link
Contributor Author

@rosiel : For FITS in the playbook, it was more that the starter site was the first thing using it in the play, so other environments had to default to not doing it (as they would've not had the migration present), and it was following the pattern of explicitly referencing the migrations... thinking, could similarly do something like Islandora-Devops/islandora-playbook#264 to allow the starter site to start using --tag=islandora to run the migrations, while leaving any other environments alone, by default.

Is somewhat more difficult in isle-dc... Islandora-Devops/isle-dc#342 should do the trick for starter site stuff; however technically, it would try to run the islandora_defaults_tags and islandora_tags twice. Not the end of the world, as it shouldn't do anything the second time it tries to run them, but it's one of those things that just seems kind of... less-than ideal? That said, unsure how to do things nice and generally there, as it's somewhat dependent whatever site's configuration that is installed, and with a single project trying to support multiple configurations, is somewhat rather unwieldly.

@adam-vessey adam-vessey marked this pull request as ready for review June 19, 2023 13:33
@jordandukart
Copy link
Member

This looks fine to me, tested in the following scenarios:

On a box that had islandora_mirador installed I removed the URI of the term to facilitate a "broken" scenario.

Navigating to admin/reports/status#warning yields: Screenshot 2023-06-20 at 9 53 56 AM.

Similarly, deleting the term and re-enabling the module shows the following: Screenshot 2023-06-20 at 10 05 48 AM.

After running the migration the term exists as we expect:

 [notice] Processed 1 item (1 created, 0 updated, 0 failed, 0 ignored) - done with 'islandora_mirador_tags'```

@jordandukart jordandukart merged commit 844d6d7 into Islandora:2.x Jun 20, 2023
@adam-vessey adam-vessey deleted the fix/broken-term branch June 20, 2023 13:48
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.

[BUG] hook_install() term creation failures during site installation from --existing-config
3 participants