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

Refac/integrate monitoring pkg #464

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

khalifaa55
Copy link
Contributor

@khalifaa55 khalifaa55 commented Oct 28, 2024

Changes:

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Other (please describe):

Testing

Requires testing

  • Yes
  • No

In case you checked yes, did you write tests?

  • Yes
  • No

@khalifaa55 khalifaa55 self-assigned this Oct 28, 2024
@khalifaa55 khalifaa55 marked this pull request as ready for review October 28, 2024 17:13
Copy link
Member

@AntiD2ta AntiD2ta left a comment

Choose a reason for hiding this comment

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

On the one hand, the docker compose manager refactor is neat and very appreciated.

On the other hand, changing the default data directory is a breaking change, which triggers a major version change in the code (v2.0.0) because it breaks existing functionality and user workflows, meaning that this new release is not compatible with other releases.

Users who assume the previous default data directory, when they run their sedge commands with the release that contains this PR's changes, will find that sedge is be throwing errors or assuming a different data directory for their setups.

I recommend you to raise a new PR with the data directory changes, and we can merge it when we have enough features to justify a major version change.

CHANGELOG.md Outdated
Comment on lines 12 to 14
### Changed
- Update "sedge-data" default directory.

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be under unreleased?

Copy link
Member

Choose a reason for hiding this comment

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

Also, please share more details about the change, like what to expect from the new default data directory.

Copy link
Contributor Author

@khalifaa55 khalifaa55 Oct 29, 2024

Choose a reason for hiding this comment

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

Removed it from here since we will be adding these changes in a new PR. and updated changelog here.

@@ -31,24 +30,21 @@ type RunContainersOptions struct {
}

func (s *sedgeActions) RunContainers(options RunContainersOptions) error {
upCmd := s.commandRunner.BuildDockerComposeUpCMD(commands.DockerComposeUpOptions{
err := s.composeManager.Up(commands.DockerComposeUpOptions{
Copy link
Member

Choose a reason for hiding this comment

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

It looks like the DockerCompose*Options should fall under the compose package rather than under the commands (after this refactor). WDYT

Copy link
Contributor Author

@khalifaa55 khalifaa55 Oct 29, 2024

Choose a reason for hiding this comment

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

The ComposeManager uses the CommandRunner interface (in commands pkg) to build the docker compose commands (which use these options). I think it would be better if we keep the DockerCompose*Options in the commands pkg to also prevent an "import cycle" issue.

@khalifaa55 khalifaa55 force-pushed the refac/integrate-monitoring-pkg branch from 15d3b7d to 4f2340d Compare October 29, 2024 16:46
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 61.36364% with 17 lines in your changes missing coverage. Please review.

Project coverage is 24.60%. Comparing base (6d8c249) to head (4f2340d).

Files with missing lines Patch % Lines
cli/actions/setup.go 33.33% 3 Missing and 3 partials ⚠️
cli/actions/run.go 40.00% 2 Missing and 1 partial ⚠️
cmd/sedge/main.go 0.00% 3 Missing ⚠️
internal/compose/compose.go 72.72% 2 Missing and 1 partial ⚠️
cli/down.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #464      +/-   ##
===========================================
- Coverage    24.61%   24.60%   -0.02%     
===========================================
  Files          119      119              
  Lines        22000    22002       +2     
===========================================
- Hits          5416     5414       -2     
- Misses       16058    16060       +2     
- Partials       526      528       +2     
Flag Coverage Δ
unittests 24.60% <61.36%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@khalifaa55
Copy link
Contributor Author

Created a separate PR for updating "sedge-data" default directory #468

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.

3 participants