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

astarte_dev_tool: setup and features #978

Merged

Conversation

shinnokdisengir
Copy link
Contributor

@shinnokdisengir shinnokdisengir commented Jul 17, 2024

astarte_dev_tool first commit

The branch is based on #956, which is necessary to start
docker compose in development mode

Addition of astarte_dev_tool functionalities: the functionalities are stateless
and based on the mix task mechanism

  • mix astarte_dev_tool.system.up: start docker compose in dev mode
  • mix astarte_dev_tool.system.down: stop docker compose in dev mode
  • mix astarte_dev_tool.system.watch: watch mode to enable hot-code-reloading

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.49%. Comparing base (1a9c203) to head (7230a50).
Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #978      +/-   ##
==========================================
+ Coverage   67.99%   69.49%   +1.50%     
==========================================
  Files         281      267      -14     
  Lines        7420     6613     -807     
==========================================
- Hits         5045     4596     -449     
+ Misses       2375     2017     -358     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shinnokdisengir shinnokdisengir marked this pull request as ready for review July 17, 2024 15:51
@shinnokdisengir shinnokdisengir force-pushed the feature/astarte-dev-tool branch 2 times, most recently from 006ecc8 to 7230a50 Compare July 18, 2024 09:24
@shinnokdisengir shinnokdisengir changed the title [WIP] astarte_dev_tool: setup and features astarte_dev_tool: setup and features Jul 18, 2024
@shinnokdisengir shinnokdisengir force-pushed the feature/astarte-dev-tool branch 2 times, most recently from 4330f4c to c2ee6f9 Compare July 18, 2024 10:01
tools/astarte_dev_tool/README.md Outdated Show resolved Hide resolved
tools/astarte_dev_tool/lib/application.ex Outdated Show resolved Hide resolved
Copy link
Collaborator

@Annopaolo Annopaolo left a comment

Choose a reason for hiding this comment

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

I suggest using a different commit structure:

  • First, a "new" commit, containing the command used to generate the folder, and the generated files
  • If needed, a "cleanup" commit, very briefly stating what's been removed and why
  • A commit to add the different functionalities, explaining with some more detail what's the goal of these

tools/astarte_dev_tool/lib/commands/system/watch.ex Outdated Show resolved Hide resolved
tools/astarte_dev_tool/lib/utilities/process.ex Outdated Show resolved Hide resolved
tools/astarte_dev_tool/lib/utilities/process.ex Outdated Show resolved Hide resolved
tools/astarte_dev_tool/lib/commands/system/up.ex Outdated Show resolved Hide resolved
tools/astarte_dev_tool/lib/utilities/process.ex Outdated Show resolved Hide resolved
tools/astarte_dev_tool/mix.exs Outdated Show resolved Hide resolved
@shinnokdisengir shinnokdisengir force-pushed the feature/astarte-dev-tool branch 2 times, most recently from cbec7f0 to b3890e4 Compare July 18, 2024 12:41
@shinnokdisengir shinnokdisengir force-pushed the feature/astarte-dev-tool branch 4 times, most recently from eea6086 to a9aad2e Compare July 18, 2024 15:27
The branch is based on astarte-platform#956, which is necessary to start
`docker compose` in development mode

Signed-off-by: Gabriele Ghio <gabriele.ghio@secomind.com>
Copy link
Collaborator

@Annopaolo Annopaolo left a comment

Choose a reason for hiding this comment

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

We're almost there!

tools/astarte_dev_tool/lib/astarte_dev_tool.ex Outdated Show resolved Hide resolved
tools/astarte_dev_tool/lib/constants/system.ex Outdated Show resolved Hide resolved
tools/astarte_dev_tool/lib/utilities/process.ex Outdated Show resolved Hide resolved
Addition of `astarte_dev_tool` functionalities: the functionalities are stateless
and based on the `mix task` mechanism

- [X] `mix astarte_dev_tool.system.up`: start `docker compose` in dev mode
- [x] `mix astarte_dev_tool.system.down`: stop `docker compose` in dev mode
- [X] `mix astarte_dev_tool.system.watch`: watch mode to enable hot-code-reloading

Signed-off-by: Gabriele Ghio <gabriele.ghio@secomind.com>
@Annopaolo Annopaolo merged commit 003479a into astarte-platform:master Jul 19, 2024
1 check passed
Annopaolo added a commit that referenced this pull request Aug 12, 2024
shinnokdisengir added a commit to shinnokdisengir/astarte that referenced this pull request Oct 10, 2024
In order to _local_ develop astarte via `dev mode`, using [`astarte-dev-tool up`](astarte-platform#978)  or using `docker compose watch`, cassandra/scylla needs to expose the port used to connection. Otherwise, the connection are only available via cluster.

With this PR scylla/cassandra is exposed on `localhost:9042`

Signed-off-by: Gabriele Ghio <gabriele.ghio@secomind.com>
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.

5 participants