Skip to content

Conversation

@tcnichol
Copy link
Contributor

I'm leaving this one as draft. I have moved the extractor heartbeat stuff to its own folder alongside backend and frontend, with the idea that it will run as a separate service.

This means that inside of that folder I am copying some of the code from backend. I have also added this in the docker-compose.dev.yml file, but so far it does not appear that it connects to rabbitmq from inside there. It does connect to rabbitmq when it is run outside of docker.

Could use some feedback on this.

tcnichol added 30 commits August 3, 2022 13:15
some extractors use a.b.c etc to denote version
version parse replaced the float comparison
better logging - log if new extractor registered or updated
pipenv = "*"
install = "*"
rocrate = "*"
packaging= "*"
Copy link
Member

Choose a reason for hiding this comment

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

Are these required? For example black should not be included in the build, just in [dev-packages. What are packaging and app?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think these are used, and am not sure how they got in. Removing them now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added the packaging module since it parses versions - I am adding it back in since I do use it.

@@ -0,0 +1,74 @@
import logging
Copy link
Member

Choose a reason for hiding this comment

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

Can you add some comments throughout the file. At a minimum a doc string for each function, but also about some of the specific of some of the more complex code blocks. We need to start being more strict about requiring comments. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ill get these added this afternoon.

Copy link
Member

Choose a reason for hiding this comment

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

Did you get a chance to work on this?

Copy link
Member

@lmarini lmarini left a comment

Choose a reason for hiding this comment

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

Getting a runtime error when running the container after building it with docker compose up --build.

2023-01-12 11:19:08   File "/code/app/heartbeat_listener_sync.py", line 7, in <module>
2023-01-12 11:19:08     from app.config import settings
2023-01-12 11:19:08 ModuleNotFoundError: No module named 'app.config'```

@tcnichol
Copy link
Contributor Author

I fixed the runtime error. Added PYTHONPATH to the heartbeat.Dockerfile and now the imports are working.

There seem to be new build errors now, looks like when doing the pytest it can't connect to keycloak.

@lmarini lmarini merged commit 115b95c into main Jan 18, 2023
@lmarini lmarini deleted the dockerize-heartbeat branch January 18, 2023 15:07
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.

4 participants