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

Add extractor key and owner email param support #39

Closed
wants to merge 13 commits into from

Conversation

max-zilla
Copy link
Contributor

Related to clowder-framework/clowder#300

add -e EXTRACTOR_KEY and -e CLOWDER_EMAIL to pyclowder extractors to register an initial user and unique key.

@CLAassistant
Copy link

CLAassistant commented Feb 15, 2022

CLA assistant check
All committers have signed the CLA.

@max-zilla max-zilla marked this pull request as ready for review June 10, 2022 14:38
Copy link
Member

@robkooper robkooper left a comment

Choose a reason for hiding this comment

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

can you add a changelog entry as well.

connector.connect()
connector.register_extractor(self.args.registration_endpoints)

# TODO: register extractor initially without _process_message?
Copy link
Member

Choose a reason for hiding this comment

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

how is this different from the register_extractor also I like to move away from this in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

register_extractor registers with arg-specified endpoints, while this is a generic registration with the clowder instance in clowder_url (if not already registered there). this would allow extractor_info to not have registration_urls, but auto-register with Clowder. i was having trouble registering with just RMQ heartbeats in my test environment, but maybe this is unnecessary...

pyclowder/connectors.py Outdated Show resolved Hide resolved
pyclowder/connectors.py Outdated Show resolved Hide resolved
pyclowder/connectors.py Outdated Show resolved Hide resolved
pyclowder/connectors.py Outdated Show resolved Hide resolved
Copy link
Member

@robkooper robkooper left a comment

Choose a reason for hiding this comment

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

can you update changelog

pyclowder/connectors.py Outdated Show resolved Hide resolved
@@ -519,8 +519,12 @@ def register_extractor(self, endpoints):

for url in endpoints.split(','):
if "unique_key" in data:
if url.find("?") > -1: url += "&user=%s" % self.clowder_email
else: url += "?user=%s" % self.clowder_email # TODO: This will not work, need an auth key matching email
if url.find("?") > -1:
Copy link
Member

Choose a reason for hiding this comment

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

what if this is the first parameter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if the config has specified a registration URL without an API key, registering privately with just an email address won't be accepted. so it doesn't send the request.

@max-zilla max-zilla closed this Jul 20, 2023
@max-zilla max-zilla deleted the extractor-key-support branch July 20, 2023 19:44
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

4 participants