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

Use semantic versioning in islandora drupal modules. #202

Merged
merged 2 commits into from
Oct 7, 2021
Merged

Use semantic versioning in islandora drupal modules. #202

merged 2 commits into from
Oct 7, 2021

Conversation

rosiel
Copy link
Contributor

@rosiel rosiel commented Oct 6, 2021

GitHub Issue: Islandora/documentation#1907

What does this Pull Request do?

Switch composer requirements. Use the latest 2.x release (^2) instead of the 8.x-1.x branch.

How should this be tested?

If composer can find a good set of dependencies, it should be a-ok. If you run the playbook you should get the latest 2x releases of islandora defaults, openseadragon, and controlled access terms.

Interested parties

@bseeger @seth-shaw-unlv

@seth-shaw-unlv
Copy link
Contributor

My Virtual Box is still giving me problems, so I can't do this one. If @bseeger can't do it then I think either @whikloj or @alxp would be good testers.

Copy link
Member

@whikloj whikloj left a comment

Choose a reason for hiding this comment

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

I was able to stand this up and it seems to work. I created an image, audio and video. All created derivatives and got stored to Fedora.

@whikloj whikloj merged commit 6ebe1ca into dev Oct 7, 2021
@whikloj whikloj deleted the semver branch October 7, 2021 16:46
@alxp
Copy link
Contributor

alxp commented Oct 7, 2021

I tried to run a vagrant provision in-place on an image that had all of the all-in-one branch changes.

The composer require steps failed.

ok: [default] => (item=drupal/context:^4.0@beta)
failed: [default] (item=islandora/controlled_access_terms:^2) => {"ansible_loop_var": "item", "changed": false, "item": "islandora/controlled_access_terms:^2", "msg": "./composer.json has been updated Running composer update islandora/controlled_access_terms Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - islandora/islandora_defaults is locked to version dev-8.x-1.x and an update of this package was not requested. - islandora/islandora_defaults dev-8.x-1.x requires islandora/controlled_access_terms dev-8.x-1.x -> found islandora/controlled_access_terms[dev-8.x-1.x] but it conflicts with your root composer.json require (^2). Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Installation failed, reverting ./composer.json and ./composer.lock to their original content.", "stdout": "./composer.json has been updated\nRunning composer update islandora/controlled_access_terms\nLoading composer repositories with package information\nUpdating dependencies\nYour requirements could not be resolved to an installable set of packages.\n\n  Problem 1\n    - islandora/islandora_defaults is locked to version dev-8.x-1.x and an update of this package was not requested.\n    - islandora/islandora_defaults dev-8.x-1.x requires islandora/controlled_access_terms dev-8.x-1.x -> found islandora/controlled_access_terms[dev-8.x-1.x] but it conflicts with your root composer.json require (^2).\n\nUse the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.\n\nInstallation failed, reverting ./composer.json and ./composer.lock to their original content.\n", "stdout_lines": ["./composer.json has been updated", "Running composer update islandora/controlled_access_terms", "Loading composer repositories with package information", "Updating dependencies", "Your requirements could not be resolved to an installable set of packages.", "", "  Problem 1", "    - islandora/islandora_defaults is locked to version dev-8.x-1.x and an update of this package was not requested.", "    - islandora/islandora_defaults dev-8.x-1.x requires islandora/controlled_access_terms dev-8.x-1.x -> found islandora/controlled_access_terms[dev-8.x-1.x] but it conflicts with your root composer.json require (^2).", "", "Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.", "", "Installation failed, reverting ./composer.json and ./composer.lock to their original content."]}
failed: [default] (item=islandora/islandora_defaults:^2) => {"ansible_loop_var": "item", "changed": false, "item": "islandora/islandora_defaults:^2", "msg": "./composer.json has been updated Running composer update islandora/islandora_defaults Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - islandora/islandora_defaults 2.x-dev requires islandora/islandora ^2 -> found islandora/islandora[2.0.0, 2.0.1, 2.x-dev] but the package is fixed to 9999999-dev (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - islandora/islandora_defaults 2.0.0 requires islandora/islandora 2.0.0 -> found islandora/islandora[2.0.0] but the package is fixed to 9999999-dev (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - Root composer.json requires islandora/islandora_defaults ^2 -> satisfiable by islandora/islandora_defaults[2.0.0, 2.x-dev]. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Installation failed, reverting ./composer.json and ./composer.lock to their original content.", "stdout": "./composer.json has been updated\nRunning composer update islandora/islandora_defaults\nLoading composer repositories with package information\nUpdating dependencies\nYour requirements could not be resolved to an installable set of packages.\n\n  Problem 1\n    - islandora/islandora_defaults 2.x-dev requires islandora/islandora ^2 -> found islandora/islandora[2.0.0, 2.0.1, 2.x-dev] but the package is fixed to 9999999-dev (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.\n    - islandora/islandora_defaults 2.0.0 requires islandora/islandora 2.0.0 -> found islandora/islandora[2.0.0] but the package is fixed to 9999999-dev (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.\n    - Root composer.json requires islandora/islandora_defaults ^2 -> satisfiable by islandora/islandora_defaults[2.0.0, 2.x-dev].\n\nUse the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.\n\nInstallation failed, reverting ./composer.json and ./composer.lock to their original content.\n", "stdout_lines": ["./composer.json has been updated", "Running composer update islandora/islandora_defaults", "Loading composer repositories with package information", "Updating dependencies", "Your requirements could not be resolved to an installable set of packages.", "", "  Problem 1", "    - islandora/islandora_defaults 2.x-dev requires islandora/islandora ^2 -> found islandora/islandora[2.0.0, 2.0.1, 2.x-dev] but the package is fixed to 9999999-dev (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.", "    - islandora/islandora_defaults 2.0.0 requires islandora/islandora 2.0.0 -> found islandora/islandora[2.0.0] but the package is fixed to 9999999-dev (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.", "    - Root composer.json requires islandora/islandora_defaults ^2 -> satisfiable by islandora/islandora_defaults[2.0.0, 2.x-dev].", "", "Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.", "", "Installation failed, reverting ./composer.json and ./composer.lock to their original content."]}
ok: [default] => (item=islandora-rdm/islandora_fits:dev-8.x-1.x)


The problem looks like in how we have been using composer - run composer require one at a time with each module and version required. This means that composer does not yet know that we will be updating the modules it declares as incompatible.

This is an architectural limitation with this way of using composer. I was thinking about how to get past this. One would be to try again to have an 'islandora' composer project, which we could check in a composer.json file and - if we wanted to , a lock file.

Another may be to change how Ansible runs composer require - instead of invoking it multiple times, we could pass each required module as a command line parameter to composer require and it could handle them all at once.

@alxp
Copy link
Contributor

alxp commented Oct 7, 2021

As followup, the logic for running composer require many times with one package at a time is baked in to the Geerlingguy Drupal role.

This points in my mind again to the need to deploy Islandora as a composer project.

@seth-shaw-unlv
Copy link
Contributor

Question, why are we adding them to the base composer.json file in the first place? Shouldn't we simply add islandora_defaults and let the dependency chain take care of the rest?

@alxp
Copy link
Contributor

alxp commented Oct 8, 2021

I agree with @seth-shaw-unlv that the redundant packages that are already required by islandora or islandora_defaults should not be in there. I removed them and am getting a new error, that the lock file is pegged to 99999-dev.

I am not sure what the obvious correct way to force this update is. within the parameters of the Geerlingguy Drupal role.

ok: [default] => (item=drupal/context:^4.0@beta)
failed: [default] (item=islandora/islandora_defaults:^2) => {"ansible_loop_var": "item", "changed": false, "item": "islandora/islandora_defaults:^2", "msg": "./composer.json has been updated Running composer update islandora/islandora_defaults Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - islandora/islandora_defaults 2.x-dev requires islandora/islandora ^2 -> found islandora/islandora[2.0.0, 2.0.1, 2.x-dev] but the package is fixed to 9999999-dev (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - islandora/islandora_defaults 2.0.0 requires islandora/islandora 2.0.0 -> found islandora/islandora[2.0.0] but the package is fixed to 9999999-dev (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command. - Root composer.json requires islandora/islandora_defaults ^2 -> satisfiable by islandora/islandora_defaults[2.0.0, 2.x-dev]. Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions. Installation failed, reverting ./composer.json and ./composer.lock to their original content.", "stdout": "./composer.json has been updated\nRunning composer update islandora/islandora_defaults\nLoading composer repositories with package information\nUpdating dependencies\nYour requirements could not be resolved to an installable set of packages.\n\n  Problem 1\n    - islandora/islandora_defaults 2.x-dev requires islandora/islandora ^2 -> found islandora/islandora[2.0.0, 2.0.1, 2.x-dev] but the package is fixed to 9999999-dev (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.\n    - islandora/islandora_defaults 2.0.0 requires islandora/islandora 2.0.0 -> found islandora/islandora[2.0.0] but the package is fixed to 9999999-dev (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.\n    - Root composer.json requires islandora/islandora_defaults ^2 -> satisfiable by islandora/islandora_defaults[2.0.0, 2.x-dev].\n\nUse the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.\n\nInstallation failed, reverting ./composer.json and ./composer.lock to their original content.\n", "stdout_lines": ["./composer.json has been updated", "Running composer update islandora/islandora_defaults", "Loading composer repositories with package information", "Updating dependencies", "Your requirements could not be resolved to an installable set of packages.", "", "  Problem 1", "    - islandora/islandora_defaults 2.x-dev requires islandora/islandora ^2 -> found islandora/islandora[2.0.0, 2.0.1, 2.x-dev] but the package is fixed to 9999999-dev (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.", "    - islandora/islandora_defaults 2.0.0 requires islandora/islandora 2.0.0 -> found islandora/islandora[2.0.0] but the package is fixed to 9999999-dev (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.", "    - Root composer.json requires islandora/islandora_defaults ^2 -> satisfiable by islandora/islandora_defaults[2.0.0, 2.x-dev].", "", "Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.", "", "Installation failed, reverting ./composer.json and ./composer.lock to their original content."]}
ok: [default] => (item=islandora-rdm/islandora_fits:dev-8.x-1.x)

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.

4 participants