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

Feature/dockerfile #156

Merged
merged 41 commits into from
Feb 13, 2024
Merged

Feature/dockerfile #156

merged 41 commits into from
Feb 13, 2024

Conversation

salamonpavel
Copy link
Collaborator

@salamonpavel salamonpavel commented Feb 9, 2024

Introduced new Dockerfile for the Atum server. Upgraded to Java 11. Http4s server can also handle both http and https communication as SSL context was added to the application. Fixed problems with logging by introducing slf4j with logback logging backend.
Closes #151
Closes #154

Copy link

github-actions bot commented Feb 9, 2024

JaCoCo agent module code coverage report - spark:2 - scala 2.12.18

Overall Project NaN% NaN% 🍏

There is no coverage information present for the Files changed

@salamonpavel salamonpavel added work in progress Work on this item is not yet finished (mainly intended for PRs) Server Issues touching the server part of the project labels Feb 9, 2024
Copy link

github-actions bot commented Feb 10, 2024

JaCoCo server module code coverage report - scala 2.13.11

Overall Project 64.52% -47.1%
Files changed 15.36%

File Coverage
PartitioningForDB.scala 100% 🍏
WriteCheckpoint.scala 76.74% 🍏
CreatePartitioningIfNotExists.scala 69.26% 🍏
SslConfig.scala 0% -3293.75%
Server.scala 0% -30.11%
SSL.scala 0% -800%
Main.scala 0% -130%

Copy link

JaCoCo agent module code coverage report - scala 2.12.18

Overall Project NaN% NaN% 🍏

There is no coverage information present for the Files changed

@@ -23,9 +23,26 @@ on:
types: [ opened, synchronize, reopened ]

jobs:
test:
build-agent-and-model:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I really like the way you split it. However, I read, in https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#jobs, that

by default, jobs have no dependencies and run in parallel with each other

and I'm wondering how isolated it will be - i.e. if at the same time the runner would run build for scala 2.11 for the agent and also 2.13 for server - would there be a potential clash?

https://github.com/orgs/community/discussions/26769#discussioncomment-3253321

Copy link
Collaborator

Choose a reason for hiding this comment

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

My assumption is that this is the same runs-on: ubuntu-latest but probably it will be different instance of this OS. (But...I remember that there is some magic caching potentially happening...we'll see :D )

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Seems to work fine :).

docker run -d -p 8080:8080 absaoss/atum-service:latest
docker container ls
sleep 15 # Wait for the service to start
curl -Lf http://127.0.0.1:8080/docs
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess that if cURL fails, this step fails?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am going to remove this file entirely for now. It turns out that you can't establish a connection between a container running in one of the steps of your pipeline and the postgres service. Basically we would have to first deploy the image some place and then fetch it in the pipeline from registry in order to be able to start it alongside the postgres service in the same network.

server/Dockerfile Outdated Show resolved Hide resolved
# log filter
filter {
# rootLevel sets the minimum level of log messages that will be displayed
rootLevel = INFO
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this not used at all? I made an assumption that it's loaded thanks to this:

private val configProvider: ConfigProvider = TypesafeConfigProvider.fromResourcePath()

Copy link
Collaborator Author

@salamonpavel salamonpavel Feb 13, 2024

Choose a reason for hiding this comment

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

I have replaced this logging config section by logback.xml as I have noticed the mappings were not working so we could configure only log level of our own classes. Now there is SLF4J used with logback logging backend. We can talk more about it on a call if you want.

@@ -32,4 +33,7 @@ object PartitioningForDB {

PartitioningForDB(keys = allKeys, keysToValuesMap = mapOfKeysAndValues)
}

implicit val writes: Writes[PartitioningForDB] = Json.writes
Copy link
Collaborator

Choose a reason for hiding this comment

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

hmm potentially we might need reads as well, relatively soon?

Copy link
Collaborator Author

@salamonpavel salamonpavel Feb 13, 2024

Choose a reason for hiding this comment

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

We will always need both reads/writes for types used by endpoints. Here we need only writes as we don't receive this via rest call but rather construct ourselves.

@salamonpavel salamonpavel marked this pull request as ready for review February 13, 2024 14:14
@salamonpavel salamonpavel removed the work in progress Work on this item is not yet finished (mainly intended for PRs) label Feb 13, 2024
Copy link
Collaborator

@lsulak lsulak left a comment

Choose a reason for hiding this comment

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

LGTM, really good piece of work!! Reviewed, pulled, built, consulted, tested together, ... I think it can go :)

@salamonpavel salamonpavel merged commit a0257c6 into master Feb 13, 2024
9 of 10 checks passed
@salamonpavel salamonpavel deleted the feature/dockerfile branch February 13, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Server Issues touching the server part of the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Dockerfile Upgrade target Java verson for Atum server module
2 participants