-
Notifications
You must be signed in to change notification settings - Fork 132
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
change 2 if statements #189
change 2 if statements #189
Conversation
Signed-off-by: Patrick St-Louis <[email protected]>
That was small! Now to get it merged and released so we can use it! @dlongley — what do you think? We know it’s been awhile since this has been touched. |
@PatStLouis @swcurran There is a JSON-LD test suite that pyld runs against, so we can use that for testing/regressions. @davidlehn or @dlongley Might know what the current state of releases are (but both are swamped currently, so we might need someone else to take over maintenance of this package). /cc @BigBlueHat so he knows about the release situation -- looks like we need to some some release management here. Looking at the PRs, we have quite the backlog. |
Thanks @msporny. Given that we are hitting a roadblock in integrating with the Traceability Test Suite, we’d really appreciate if this small change could be handled before getting into some of the larger questions like the backlog. We do understand that getting the release pipeline going might be a bit tricky and necessary for to push a release out. Any help we can get so we can complete our work would be appreciated! If there are things we can do — please let us know. |
@PatStLouis so, the test suite failures and errors jumps significantly once this PR is in place, so those will need to be addressed before we can confirm this is working for all scenarios. Checkout #182 to simplify test running a bit and moves to |
Some more details. Many of the new test failures are failing with errors like...
or
So...definitely related to this PR. |
Signed-off-by: pstlouis <[email protected]>
@BigBlueHat thanks for reviewing this and thanks for pointing me towards the test documentation. I've run the tests and made some changes and I believe I have the same results as the original code. This issue has to do with how python treats empty dictionary as The traceability context currently has 80 empty context which was causing this behavior. Please let me know if any further modifications are needed here! |
@BigBlueHat were you able to get a review on these changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That did the trick! Thanks!
Good stuff! Now the next step — how do we get a new release created. @BigBlueHat — do you have The Power? Someone else listening in? Thanks! |
|
Agreed. I'll rework the milestone(s). |
@BigBlueHat do you have an ETA for this change to be released? Is end of week a reasonable expectation? Thank you |
@davidlehn could I get your help cutting this release? @PatStLouis can you confirm that the tests @davidlehn wrote in w3c/json-ld-framing#158 are sufficient to test your use case (the one which uncovered this bug)? I'm fine to ship the release with all the tests still passing at the rate they were and with @davidlehn's new one passing as well. |
@BigBlueHat these test cases do cover what triggered this bug and I confirm they are sufficient. |
@BigBlueHat @davidlehn any updates on a release ETA? |
2.0.4 should be available now. |
Great stuff — thanks all! |
@davidlehn @BigBlueHat thanks a lot for working with us on this! |
This is to address #188
I believe there were 2 erroneous checks in the code.
The first one was checking the statement
if not value
. In python logic, an empty object would count as a non-value, therefore we need to specifically check for None. This should be raised only if the value is explicitly declared asnull
, not if its an empty object, as described in the json-ld-api expansion algorythm.The second wrong check has to do with the value False being returned and the code checking if the value is not None. False won't fall into this category, therefore we should check if there is a value instead.
Are any test-suites available to validate these changes? It has resolved my issue and I was able to successfully expand the traceability context.
Special thanks to @dbluhm for helping to narrow down this issue.
@dlongley @msporny we would like to request a new release of the
pyld
package with these bug fixes since aca-py currently relies on it for credential verification.