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

pyff should stop processing if one input MD is missing #47

Closed
salaun-urennes1 opened this issue Jul 8, 2014 · 3 comments
Closed

pyff should stop processing if one input MD is missing #47

salaun-urennes1 opened this issue Jul 8, 2014 · 3 comments

Comments

@salaun-urennes1
Copy link

We are using pyFF to agrgegate our federation metadata with eduGAIN metadata. We had an issue that made us publish the aggregate metadata with eduGAIN metadata only.

After some investigation I found out that pyff does not raise an exception if an input MD cannot be loaded. I suggest this not only adds an error log but raise an exception to prevent an uncomplete output file from being generated.

Here is a sample pipeline where one input metadata file is missing:

  • load:
    • /var/www/html/edugain/sps-edugain-metadata.xml
    • /tmp/unknown-metadata.xml
    • select
    • finalize:
      Name: https://federation.renater.fr/
      cacheDuration: PT1H
      validUntil: P6D
    • publish: /tmp/test-metadata.xml
    • stats

Here is pyff output:
None
None
ERROR:root:Don't know how to load '/tmp/unknown-metadata.xml' as None verify None via None
[('file:///var/www/html/edugain/sps-edugain-metadata.xml', None, None, None)]
[('file:///var/www/html/edugain/sps-edugain-metadata.xml', None, None, 0, None)]

ERROR:root:[Errno 1] Operation not permitted

total size: 2
selected: 123
idps: 0
sps: 123

It seems that this part of builtins.py should be changed:

    else:
        log.error("Don't know how to load '%s' as %s verify %s via %s" %
                  (url, params['as'], params['verify'], params['via']))
@leifj
Copy link
Contributor

leifj commented Jul 8, 2014

This is verified in HEAD?

@salaun-urennes1
Copy link
Author

Le 08/07/14 15:24, Leif Johansson a écrit :

This is verified in HEAD?


Reply to this email directly or view it on GitHub
#47 (comment).

I ran a "git pull" yesterday.

$ ./pyff --version
pyff version 0.10.0dev

Olivier Salaün

GIP RENATER
Etudes et Projets Applicatifs (EPA)
Tél : +33 2 23 23 71 27
Logo RENATER
http://www.renater.fr

@leifj
Copy link
Contributor

leifj commented Jul 2, 2015

This is now a feature-request in #62

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

No branches or pull requests

2 participants