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

adding fixity events #765

Closed
wants to merge 3 commits into from
Closed

adding fixity events #765

wants to merge 3 commits into from

Conversation

yulgit1
Copy link
Contributor

@yulgit1 yulgit1 commented Apr 6, 2015

No description provided.

@@ -99,6 +117,13 @@ public RdfStream getDatastreamFixity() {
}

LOGGER.info("Get fixity for '{}'", externalPath);

final RdfStream rs = ((FedoraBinary)resource()).getFixity(translator())
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this doing the fixity check twice? Wouldn't it be better to move the createFixityEvent() call into the kernel anyway, so if there was a non-REST API fixity check (e.g., from a sequencer) it would work too?

Copy link

Choose a reason for hiding this comment

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

+1 @escowles.
...maybe in FedoraBinaryImpl?

Copy link
Contributor

Choose a reason for hiding this comment

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

If we ever have any intention of carrying through the API partitioning as designed in the fall, we should place this in such a position that it will be easy to extract into a separate module later, along with FedoraFixity and associated gear.

@yulgit1
Copy link
Contributor Author

yulgit1 commented Apr 7, 2015

@ajs6f
@awoods
@escowles
@acoburn
Seeking review, I think I covered all the comments from the first commit.

@escowles
Copy link
Contributor

escowles commented Apr 8, 2015

This moves the createFixityEvent method into FedoraBinaryImpl, but it's still called from the REST API. I think it's important to move the call into FedoraBinaryImpl so any fixity check will trigger an event, even if it's from a sequencer or other non-REST API source.

I tried to do this as a demo, but had to pass the EventBus from the REST API down into FedoraBinaryImpl because injection wasn't working for some reason (you had this issue earlier, so I hope you know how to fix that):

master...escowles:escfixity

@yulgit1
Copy link
Contributor Author

yulgit1 commented Apr 8, 2015

No I had to pass down the eventBus too.

@yulgit1
Copy link
Contributor Author

yulgit1 commented Apr 8, 2015

@escowles Question, In your branch's fedoraFixity's call to getFixity, you're passing 2 nulls rather than baseURL and agent. Are these getting populated some other place?

@escowles
Copy link
Contributor

escowles commented Apr 8, 2015

@yulgit1 No, that's a mistake -- those should be references to the baseURL and userAgent that are populated in postConstruct()

@yulgit1
Copy link
Contributor Author

yulgit1 commented Apr 8, 2015

@escowles ok i'll run your changes and fix these and anything else if necessary

@yulgit1
Copy link
Contributor Author

yulgit1 commented Apr 8, 2015

@escowles: I now have a new branch w/ the consolidated changes, should I create a new pull request?

@escowles
Copy link
Contributor

escowles commented Apr 8, 2015

@yulgit1 sure -- go ahead and close this one and open a new PR

@yulgit1 yulgit1 closed this Apr 8, 2015
@yulgit1
Copy link
Contributor Author

yulgit1 commented Apr 8, 2015

resolving instead with
#766

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.

None yet

5 participants