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

Updating lock files #56

Merged
merged 2 commits into from
Dec 6, 2018
Merged

Updating lock files #56

merged 2 commits into from
Dec 6, 2018

Conversation

dannylamb
Copy link
Contributor

GitHub Issue: Resolves Islandora/documentation#981

What does this Pull Request do?

Updates compser.lock files so we get the newest crayfish-commons code (and other dependencies). This should stop the auth errors we're experiencing in Islandora/documentation#981

How should this be tested?

  1. Pull this PR to your Crayfish installation
  2. Go into each microservice and run composer install to use the new lock file and get new dependencies
  3. Check and see if derivatives work again.

Interested parties

@Islandora-CLAW/committers

@codecov
Copy link

codecov bot commented Nov 30, 2018

Codecov Report

Merging #56 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #56   +/-   ##
=========================================
  Coverage     65.32%   65.32%           
  Complexity       86       86           
=========================================
  Files             5        5           
  Lines           421      421           
=========================================
  Hits            275      275           
  Misses          146      146

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6223e2f...32d68f1. Read the comment docs.

@Natkeeran
Copy link
Contributor

@dannylamb

Does not seem to help!

Apache error log:

[Fri Nov 30 20:35:57.057169 2018] [:error] [pid 10201] [client 127.0.0.1:40002] PHP Fatal error:  Uncaught InvalidArgumentException: File does not exist! in /var/www/html/Crayfish/Gemini/vendor/islandora/crayfish-commons/src/Provider/YamlConfigServiceProvider.php:56\nStack trace:\n#0 /var/www/html/Crayfish/Gemini/vendor/pimple/pimple/src/Pimple/Container.php(290): Islandora\\Crayfish\\Commons\\Provider\\YamlConfigServiceProvider->register(Object(Silex\\Application))\n#1 /var/www/html/Crayfish/Gemini/vendor/silex/silex/src/Silex/Application.php(90): Pimple\\Container->register(Object(Islandora\\Crayfish\\Commons\\Provider\\YamlConfigServiceProvider), Array)\n#2 /var/www/html/Crayfish/Gemini/src/app.php(15): Silex\\Application->register(Object(Islandora\\Crayfish\\Commons\\Provider\\YamlConfigServiceProvider))\n#3 /var/www/html/Crayfish/Gemini/src/index.php(3): require_once('/var/www/html/C...')\n#4 {main}\n  thrown in /var/www/html/Crayfish/Gemini/vendor/islandora/crayfish-commons/src/Provider/YamlConfigServiceProvider.php on line 56

@dannylamb
Copy link
Contributor Author

@Natkeeran That's the error you get when the config file can't be found. Can you confirm the files are there and named correctly? I'm wondering if the instructions I gave for testing somehow wiped them out?

@Natkeeran
Copy link
Contributor

@dannylamb

composer.lock files are there. And the files seems to be the correct ones.

@dannylamb
Copy link
Contributor Author

@Natkeeran Oh, no, I meant the yml config file for the microservice. It looks like it's blowing up because the configuration provider can't open https://github.com/Islandora-CLAW/Crayfish/blob/master/Houdini/cfg/config.example.yaml. Ansible should've renamed it to config.yaml.

@whikloj
Copy link
Member

whikloj commented Dec 5, 2018

vagrant up

@whikloj
Copy link
Member

whikloj commented Dec 5, 2018

Ok I was able to get this working, except for one thing.

First I brought up a fresh claw-playbook and created a new Repository Item it did not get synced to Fedora.

So I did the following

> vagrant ssh
vagrant@claw:~$ cd /var/www/html/Crayfish

vagrant@claw:/var/www/html/Crayfish$ ls

vagrant@claw:/var/www/html/Crayfish$ sudo git remote add danny https://github.com/dannylamb/Crayfish.git

vagrant@claw:/var/www/html/Crayfish$ sudo git fetch danny 
remote: Enumerating objects: 245, done.
remote: Counting objects: 100% (245/245), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 475 (delta 238), reused 244 (delta 238), pack-reused 230
Receiving objects: 100% (475/475), 110.74 KiB | 0 bytes/s, done.
Resolving deltas: 100% (272/272), completed with 69 local objects.
From https://github.com/dannylamb/Crayfish
 * [new branch]      add-gemini -> danny/add-gemini
 * [new branch]      add-hypercube -> danny/add-hypercube
 * [new branch]      content-modeling-overhaul -> danny/content-modeling-overhaul
 * [new branch]      flysystem  -> danny/flysystem
 * [new branch]      issue-611  -> danny/issue-611
 * [new branch]      issue-612  -> danny/issue-612
 * [new branch]      issue-640  -> danny/issue-640
 * [new branch]      issue-950  -> danny/issue-950
 * [new branch]      issue-981  -> danny/issue-981
 * [new branch]      master     -> danny/master
 * [new branch]      milliner   -> danny/milliner
 * [new branch]      milliner-binary -> danny/milliner-binary
 * [new branch]      path-mapper -> danny/path-mapper
 * [new branch]      use-crayfish-commons -> danny/use-crayfish-commons

vagrant@claw:/var/www/html/Crayfish$ sudo git checkout danny/issue-981
error: The following untracked working tree files would be overwritten by checkout:
	Homarus/composer.lock
Please move or remove them before you can switch branches.
Aborting

vagrant@claw:/var/www/html/Crayfish$ sudo rm Homarus/composer.lock 

vagrant@claw:/var/www/html/Crayfish$ sudo git checkout danny/issue-981
Previous HEAD position was edf356e... homarus (#52)
HEAD is now at 32d68f1... Merge branch 'master' into issue-981

vagrant@claw:/var/www/html/Crayfish$ for i in */; do cd $i; sudo rm -rf vendor/; sudo composer install; cd ..; done

It ended with a weird statement

No composer.json in current directory, do you want to use the one at /var/www/html/Crayfish? [Y,n]? n

but that was probably my bash script being flaky. Then derivatives, etc worked for me.

But not for Tiffs (read: files). I see them hitting Houdini and Milliner but not being PUT back into Drupal. But I don't see how that is related to this, I think it is probably related to Islandora/documentation#982

@whikloj
Copy link
Member

whikloj commented Dec 5, 2018

Hmmm something is going funny with events, I see this in the Drupal log.

 Symfony\Component\HttpKernel\Exception\BadRequestHttpException: Invalid file extension.  Valid types are txt rtf doc docx ppt pptx xls xlsx pdf odf odg odp ods odt fodt fods fodp fodg key numbers pages tiff tif jp2 in Drupal\islandora\MediaSource\MediaSourceService->putToNode() (line 290 of /var/www/html/drupal/web/modules/contrib/islandora/src/MediaSource/MediaSourceService.php

Multiple times. Not sure what.... ohhhhh wait.

There is no jpg extension in that list and this is putting a Jpeg service file from a Tiff. I'm guessing something funny happened in my islandora_demo PR.

@whikloj
Copy link
Member

whikloj commented Dec 5, 2018

Nope this is a bug, we are putting an image back but using the valid extensions from the source field. We are not putting the Jpeg in to a file field too are we?

https://github.com/Islandora-CLAW/islandora/blob/8.x-1.x/src/MediaSource/MediaSourceService.php#L285-L287

@whikloj
Copy link
Member

whikloj commented Dec 5, 2018

Am I wrong? Are we now using Image for Tiffs too?

@dannylamb
Copy link
Contributor Author

@whikloj Tiffs should be Files.

@Natkeeran
Copy link
Contributor

@whikloj @dannylamb
I am not able to follow this issue. However, I'm able to reproduce @whikloj steps (derivatives for images work, for tiff they do not work.)

@whikloj
Copy link
Member

whikloj commented Dec 6, 2018

Okay so I think this (meaning "this" PR) resolves the derivative issue, but for Tiffs we have a larger issue that we (for some reason) are trying to PUT the service file back as a File instead of an Image. This must be in Alpaca somewhere as I don't believe the endpoint is in the action configuration.

@Natkeeran
Copy link
Contributor

Natkeeran commented Dec 6, 2018

@whikloj

  • To my recollection, the tiff derivatives used to work.
  • When a media is uploaded, it takes us back to the general media list (http://localhost:8000/admin/content/media). Is there a separate ticket for that?

I am good with merging and then tracking those issues.

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.

👍

@whikloj whikloj merged commit b920087 into Islandora:master Dec 6, 2018
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.

3 participants