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

Write new pluging for NOVU (Add subscriber) #836

Open
atompie opened this issue Oct 22, 2023 · 16 comments
Open

Write new pluging for NOVU (Add subscriber) #836

atompie opened this issue Oct 22, 2023 · 16 comments
Assignees
Labels
hacktoberfest Issues good for hacktoberfest

Comments

@atompie
Copy link
Collaborator

atompie commented Oct 22, 2023

Integrate a fresh NOVU plugin into Tracardi, focusing solely on adding subscribers. This can be achieved by leveraging an existing plugin that already possesses the "Add subscriber" functionality.

For the specific code related to adding subscribers, you can refer to the example code available at this link: Tracardi NOVU Connector Plugin. Extract the relevant logic from this source to create the new plugin.

To understand how to create this plugin, you can refer to the following resources:

NOVU's documentation on creating subscribers via their API: NOVU Create Subscriber API
An existing plugin within Tracardi that connects to NOVU and adds subscribers: Tracardi NOVU Connector Plugin
Tracardi's documentation on plugin development: Tracardi Plugin Development

@atompie atompie added the hacktoberfest Issues good for hacktoberfest label Oct 22, 2023
@AnuraagReddy123
Copy link

Hey @atompie I would love to try out this issue! But before I start, is it ok if I take some time completing the issue or do you need it to be done urgently? Because I have to give priority to my university work so I might take some time

@atompie
Copy link
Collaborator Author

atompie commented Oct 24, 2023

@AnuraagReddy123 there is no hurry with this issue. Could you please give me some time-frame when you are able to start working on this?

@AnuraagReddy123
Copy link

AnuraagReddy123 commented Oct 25, 2023

After 26th October, mostly and I work on open source projects during the night

@AnuraagReddy123
Copy link

AnuraagReddy123 commented Oct 26, 2023

@atompie I have to follow this link to set up my environement right? The setup doc asks me to clone the tracardi-api repository too, will that be necessary?

@atompie
Copy link
Collaborator Author

atompie commented Oct 26, 2023

Yes if you would like to write a plug-in and test it.

@AnuraagReddy123
Copy link

image
What is the current development version?

@atompie
Copy link
Collaborator Author

atompie commented Oct 30, 2023

@AnuraagReddy123 0.8.2-dev

@AnuraagReddy123
Copy link

Hey so I got everything up and running, and I am able to check out the http://localhost:8686/docs. But when I tried to execute some APIs I get the "Unauthorized" error
image
Do I need to create an account somewhere?
Also I keep getting this error when I try to install missing components in the tracardi gui

image

@atompie
Copy link
Collaborator Author

atompie commented Nov 1, 2023

@AnuraagReddy123 Could you please check if when you type http://localhost:8686 you get a response like {details: "no found"}

@atompie
Copy link
Collaborator Author

atompie commented Nov 1, 2023

@AnuraagReddy123 An Unauthorized error is because there is no installation and no user to autothorize.

@atompie
Copy link
Collaborator Author

atompie commented Nov 1, 2023

@AnuraagReddy123 By the way, did you start the GUI from the container? If so, then http://localhost:8686/ refers to the container, not your localhost. Please find your laptop's IP and then check in the browser using http://your-laptop-ip:8686/, and then use this URL in the GUI. This is the most probable issue, as Docker must access your API installation on your laptop, and localhost is a Docker IP, not your laptop's

@AnuraagReddy123
Copy link

@AnuraagReddy123 Could you please check if when you type http://localhost:8686 you get a response like {details: "no found"}

Yes that is the response I get
image

@AnuraagReddy123 By the way, did you start the GUI from the container? If so, then http://localhost:8686/ refers to the container, not your localhost. Please find your laptop's IP and then check in the browser using http://your-laptop-ip:8686/, and then use this URL in the GUI. This is the most probable issue, as Docker must access your API installation on your laptop, and localhost is a Docker IP, not your laptop's

Yes I was starting the gui in the container, (I am new to docker so not really sure about the right way to start containers)
image
But even when I try going to http://my-laptop-ip:8686/ I still get the details: not found error. (I found my ip by following this Link

@atompie
Copy link
Collaborator Author

atompie commented Nov 1, 2023

If gui is working that means it is all ok. Docker has its own network so when you type localhost it means the localhost of docker. Could you please check if you type into browser http://your-laptop-ip:8686 will you get the details not found.

@atompie
Copy link
Collaborator Author

atompie commented Nov 1, 2023

Not found is not an error it is correct behavior. If you have this in a browser please go to gui click reload icon near the tracardi api and type the url with your laptop ip.

@AnuraagReddy123
Copy link

Ok so the http://your-laptop-ip:8686/docs link is loading but when I try to execute any of the apis provided there, I still get the unauthorized error. This is the output at the output window of main.py

INFO:     <my_ip_address>:58944 - "GET /test/redis HTTP/1.1" 401 Unauthorized

image
Even the tracardi GUI at http://your-laptop-ip:8787/login gives a timeout when trying to register with http://your-laptop-ip:8686. The output at main.py is

INFO:     <my_ip_address>:58974 - "OPTIONS /install HTTP/1.1" 200 OK
WARNING:app.api.install_endpoint:Elasticsearch replicas decreased to 0 due to only one data node in the cluster.
ERROR:tracardi.service.plugin.plugin_install:Module `tracardi.process_engine.action.v1.time.time_difference.plugin` was NOT INSTALLED as it raised an error `No module named 'parser'`.
WARNING:app.api.install_endpoint:There is at least one admin account. New admin account not created.

@atompie
Copy link
Collaborator Author

atompie commented Nov 2, 2023

@AnuraagReddy123 Have you managed to install the system through GUI? Can you paste what happens when you type http://your-laptop-ip:8787 in the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues good for hacktoberfest
Projects
None yet
Development

No branches or pull requests

2 participants