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

StreamPipes Connect: Ease deletion of adapters #1936

Closed
3 tasks done
dominikriemer opened this issue Sep 14, 2023 · 15 comments · Fixed by #2139 or #2070
Closed
3 tasks done

StreamPipes Connect: Ease deletion of adapters #1936

dominikriemer opened this issue Sep 14, 2023 · 15 comments · Fixed by #2139 or #2070
Assignees
Labels
connect Related to the `connect` module (adapters) enhancement New feature or request
Milestone

Comments

@dominikriemer
Copy link
Member

dominikriemer commented Sep 14, 2023

Body

Users should not be able to delete adapters which are used by an existing pipeline.
The current dialog prevents deletion of such adapters, but has some drawbacks:

StreamPipes Committer

I acknowledge that I am a maintainer/committer of the Apache StreamPipes project.

@dominikriemer dominikriemer added enhancement New feature or request connect Related to the `connect` module (adapters) labels Sep 14, 2023
@bossenti bossenti added this to the 0.93.0 milestone Sep 22, 2023
@muyangye
Copy link
Member

Hi @dominikriemer @bossenti may I work on this issue? I have traced through the code a bit and I am confident I can do the first 2 improvements (hint the names and ask users if related pipelines should be deleted as well). I have not looked into the 3rd improvement yet but anyway I think it can only be done after the 2nd improvement is done. Thanks!

@bossenti
Copy link
Contributor

Hi @muyangye,

yes, that would be awesome! I agree with you that an iterative approach probably works best here. Please be aware of @dominikriemer PR which is currently still WIP but has some implications for this issue: #1979. So please have a look there before starting on this issue.

Please feel free to ask for advice in case you don't know how to proceed or you are facing any errors. We are happy to help 🙂

@dominikriemer
Copy link
Member Author

Hi @muyangye that would be awesome!
Please ask if you need any help.

@muyangye
Copy link
Member

Thanks for reminding me the WIP PR, that is indeed very relevant to this issue. One quick question, how can I see my log messages in module streampipes-rest and module streampipes-storage-couchdb? I used to do "System.out.println()" but this time no message is shown on the consoles of all-pipeline-elements-jvm or connect-adapters probably because they are not the correct consoles that have my log. I also tried using the log4j Logger but I still don't know where to locate my log message. Can you please tell me where can I find the log for these 2 modules as this information is valuable for me to proceed? Thank you very much!

@bossenti
Copy link
Contributor

Just to be sure we guide you in the right direction: Do you run the backend (StreamPipes Core) locally in your IDE and not in docker?

@muyangye
Copy link
Member

I think I run it in Docker. The way I run Streampipes now is this:

  1. streampipes up -d
  2. In Intellij, manually click the debug/run button of configurations connect-adapters, all-pipeline-elements, and ui, so all consoles are of these 3 configurations

As a result I am pretty sure I run the backend in Docker. Do I have to run the backend locally? I just tried to do that but it says couchdb port 5984 refused and I think it is because locally I didn't install couchdb. Is there a way to see the log in Docker or do you recommend running it locally?

@bossenti
Copy link
Contributor

Yes, if you want to change aspects in the backend it is required to run it locally to see your changes in action.

You should be able to do so by following these steps:

  1. streampipes down
  2. streampipes env --set basic: This setup only runs the prerequisites of StreamPipes, e.g., the message broker
  3. streampipes up -d
  4. Run StreamPipesCoreApplication in streampipes-service-core in your IDE. Ideally, the IDE detects the required environment variables from the .env file in streampipes-service-core/development. In case not, please ensure their availability manually.

With this setup, you should also be able to see your log statements in your IDE's output 🙂

@bossenti
Copy link
Contributor

You can also have a look at our documentation in Confluence, but I think I mentioned all required steps

@muyangye
Copy link
Member

muyangye commented Oct 18, 2023

Thank you very much for your reply! This time I can indeed see the log locally🙂! However, whenever I start any pipelines (e.g. run connect-adapters or all-pipeline-elements-jvm), core/backend is doing a migration which fails every time due to a connection time out:
7b58d3cb4b2097d167322f9da0a218d
d9302849b2c4fd353ed36d88dea00f2
I then tried to reset Streampipes' environment to pipeline-element by streampipes env --set pipeline-element. Unfortunately this error is reproduced in Docker too:
181272df5c0b460d403c74b2a8b6b47
Have you encountered this before or have any ideas? And I am sorry to bug you once again for my environment's question but I really couldn't find a solution myself🙏.

@dominikriemer
Copy link
Member Author

Hi @muyangye you can try to start with a clean system when switching to the basic environment.
So just stop all containers, remove the spnet docker network and all volumes and start with the basic environment again.
This should give you a clean system. When you start the core and extensions locally, do not forget to add environment variables to allow these locally running services to communicate with the other services running in docker (the variables in the development/.env folder of the service)

@bossenti
Copy link
Contributor

There is even a convenience command for cleaning the existing system: streampipes clean -v ( to be run after streampipes down)

@muyangye
Copy link
Member

I really appreciate both of your help! After cleaning the system I can finally start implementing this important improvement🙂.

@bossenti bossenti modified the milestones: 0.93.0, 1.0.0 Oct 19, 2023
dominikriemer pushed a commit that referenced this issue Oct 28, 2023
…dapter and Allow One Click Deletion (#2070)

* implement new round processor

* add English locale, icon, and documentation

* fix checkstyle

* support different rounding modes

* add rounding mode in documentation

* fix time display

* let NaryMapping selection account for property scope

* implement boolean filter unit tests

* add common StoreEventCollector class and refactor TestChangedValueDetectionProcessor

* add new class

* show associated pipelines' names and allow one click deletion

* center text

* fix minor error

* replace magic number

* add timeout

* restore newline

* changeb baseurl

* revert port

* revert timeout

---------

Co-authored-by: bossenti <bossenti@posteo.de>
tenthe pushed a commit that referenced this issue Nov 9, 2023
…r but Not Owned by User (#2139)

* implement new round processor

* add English locale, icon, and documentation

* fix checkstyle

* support different rounding modes

* add rounding mode in documentation

* fix time display

* let NaryMapping selection account for property scope

* implement boolean filter unit tests

* add common StoreEventCollector class and refactor TestChangedValueDetectionProcessor

* add new class

* show associated pipelines' names and allow one click deletion

* center text

* fix minor error

* replace magic number

* add timeout

* restore newline

* changeb baseurl

* revert port

* revert timeout

* implement pipelines owner check

* undo automatic changes

* enable admin to delete pipelines no matter ownership

---------

Co-authored-by: bossenti <bossenti@posteo.de>
@muyangye
Copy link
Member

Should we close this issue as E2E tests that cover all possible scenarios are implemented? If there are problems reported we can reopen it.

@bossenti
Copy link
Contributor

Is the last point of the bullet list also fulfilled?

If so, I fully agree with you

Thank you a lot for your dedicated support for this feature 🙏🏼

@muyangye
Copy link
Member

Is the last point of the bullet list also fulfilled?

If so, I fully agree with you

Thank you a lot for your dedicated support for this feature 🙏🏼

Yes the last point is also done. So let's close it.

And you are welcome! Thank you for your guidance throughout the setup 🙏🏼!

@tenthe tenthe closed this as completed Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment