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

updates and refactoring #19

Merged
merged 23 commits into from
Oct 8, 2024
Merged

updates and refactoring #19

merged 23 commits into from
Oct 8, 2024

Conversation

ncode
Copy link
Owner

@ncode ncode commented Sep 26, 2024

  • This pull request includes several significant changes to the project, focusing on refactoring, configuration updates, and error handling improvements. Key changes include updating context imports, enhancing error handling, and renaming and restructuring configuration files.

Refactoring and Error Handling:

  • cmd/run.go: Replaced the deprecated golang.org/x/net/context with the standard library context package. Added an os.Exit(1) call to handle errors more gracefully.
  • internal/ballot/ballot.go: Refactored the Command method to CommandContext to support context cancellation. Improved error handling and added validation checks for required fields in the Ballot

Configuration Updates:

  • configs/consul_with_3_nodes/: Removed old JSON configuration files for Consul agents and replaced them with new HCL configuration files.
  • configs/development/: Renamed and updated Dockerfile and Makefile to reflect the new development environment structure.
  • configs/development/docker-compose.yaml: Updated the Docker Compose file to enable script checks and client settings for Consul agents. Removed the custom network configuration.

Consistency Improvements:

  • configs/development/ballot-1/ballot.yaml, configs/development/ballot-2/ballot.yaml, configs/development/ballot-3/ballot.yaml: Standardized service IDs and names to use hyphens instead of underscores.

These changes enhance the project's maintainability, error handling, and configuration consistency.

Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 51.32275% with 92 lines in your changes missing coverage. Please review.

Project coverage is 60.53%. Comparing base (0777361) to head (b22e2bc).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
internal/ballot/ballot.go 51.32% 83 Missing and 9 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #19       +/-   ##
===========================================
+ Coverage   22.16%   60.53%   +38.37%     
===========================================
  Files           1        1               
  Lines         379      484      +105     
===========================================
+ Hits           84      293      +209     
+ Misses        292      159      -133     
- Partials        3       32       +29     

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

@ncode ncode merged commit 15ced93 into main Oct 8, 2024
5 checks passed
@ncode ncode deleted the juliano/refactoring branch October 8, 2024 19:44
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.

1 participant