Skip to content

Conversation

@vimscientist69
Copy link
Contributor

@vimscientist69 vimscientist69 commented Sep 26, 2025

Reason

PrometheusController, MetricsService and MessageService will be used in packages and repositories other than Backend package and AutomaInfraCore repository. Moving these structs to AutomaUtilities will allow other repositories and Swift packages to use them as well.

Tech Details List

  1. Move MetricsService, PrometheusController, PrometheusControllerErrors and PrometheusControllerIntegrationTests from AutomaInfracore to AutomaUtilities.
  2. Refactor MessageService into MessageService and SNSService (message service just for discord messages, sns service for SMS's), and move MessageService along with all of its imported code from AutomaInfracore to AutomaUtilities.
  3. Update AutomaUtilities package after refactor PR has been merged.
  4. Import AutomaUtilities package where MetricsService, PrometheusController, MessageService and their dependencies are used

Tasks:

  • Move MetricsService, PrometheusController, PrometheusControllerErrors and PrometheusControllerIntegrationTests from AutomaInfracore to AutomaUtilities.
  • Refactor MessageService into MessageService and SNSService (message service just for discord messages, sns service for SMS's), and move MessageService along with all of its imported code from AutomaInfracore to AutomaUtilities.
  • Update AutomaUtilities package after refactor PR has been merged.
  • Import AutomaUtilities package where MetricsService, PrometheusController, MessageService and their dependencies are used

Un-important tasks:

Links:

AutomaUtilities Refactor Pull Request (already merged)

Testing

Steps:

  1. Run required commands to test all the code modified by this PR
# unit tests
swift test # tests whether refactoring code led to any issues
# integration tests
# procs / testing logic
  1. Further testing can be done by following the notes in TESTING-QA

Output:

Testing QA

automa utilities package

Need to merge automa utilities refactor branch to master, update packages in this repository, and build package and fix any small errors that might arise
MessageService is in AutomaUtilities package now. Metric removed in this commit is added in AutomaUtilities.
…controller from automa utilities

This removes the need of an authentication token to prevent leaking metrics. It works, because `PrometheusService` starts up a separate HTTP server on a different port that is not exposed publicly.
…so that automa utilities package can be cloned
This is needed to clone AutomaUtilities, a private Github repository. This commit also exposes the metrics port in both dockerfiles
… core api

Made method to get website html. Updated AutomaUtilities to have the web core api endpoint payload type.
…urce action can clone private repo - automautilities
… opensource action can clone private repo - automautilities
@vimscientist69 vimscientist69 merged commit 05af6d5 into develop Oct 14, 2025
4 checks passed
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