Skip to content

Added factory for config-backed Atum-Agent#439

Merged
lsulak merged 11 commits into
masterfrom
feature/438-add-factory-for-config-backed-agent
Jun 1, 2026
Merged

Added factory for config-backed Atum-Agent#439
lsulak merged 11 commits into
masterfrom
feature/438-add-factory-for-config-backed-agent

Conversation

@ABLL526

@ABLL526 ABLL526 commented May 12, 2026

Copy link
Copy Markdown
Contributor

Task:

Adds a factory method to create an AtumAgent instance backed by an explicitly provided Typesafe Config, enabling multiple agents with different dispatcher setups within the same JVM.

Context:

The above PRs updates the deployment pipeline to extract, package, and publish the external TypeSafe config for the data-measurement Spark plugin and ensure it is shipped to Spark via --files:

This supports the “external first, classpath fallback” strategy within AUL: the plugin first attempts to load application.conf distributed through Spark --files, and falls back to the classpath config if no external file is available.

Essentially, we want to externalize all configuration files. So, it is easier for the Ops teams and Dev teams to make changes to the configuration files without a need to always release a new version of Atum-Services or Unify. But since Atum-Services is in the codebase of Unify, a small change is needed on Atum-Services to be able to externalize these config files.

Closes:

#438

Release Notes:

  • Added factory for config-backed agent
    • Added function fromConfig to AtumAgent
    • Added Unit Tests
    • Updated README to include Option 3

@ABLL526 ABLL526 linked an issue May 12, 2026 that may be closed by this pull request
Copilot AI review requested due to automatic review settings May 12, 2026 11:51
@ABLL526 ABLL526 self-assigned this May 12, 2026
@ABLL526 ABLL526 added enhancement New feature or request Agent Issues touching the agent part of the project infrastructure Project setup and deployment dependent The item depends on some other open item (Issue or PR) labels May 12, 2026
@github-actions

github-actions Bot commented May 12, 2026

Copy link
Copy Markdown

Report: Report: server - scala:2.13.13

Metric (instruction) Coverage Threshold Status
Overall 78.06% 71.0%
Changed Files 0.0% 80.0%
File Path Coverage Threshold Status

No changed file in reports.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a factory method to create an AtumAgent instance backed by an explicitly provided Typesafe Config, enabling multiple agents with different dispatcher setups within the same JVM.

Changes:

  • Added AtumAgent.fromConfig(config: Config) to build a dedicated agent using dispatcherFromConfig(config).
  • Added a unit test validating fromConfig constructs an agent with the expected dispatcher.
  • Updated agent/README.md with a new “Option 3” showing how to create a config-backed agent.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
agent/src/main/scala/za/co/absa/atum/agent/AtumAgent.scala Adds fromConfig factory for creating a config-backed agent instance.
agent/src/test/scala/za/co/absa/atum/agent/AtumAgentUnitTests.scala Adds unit test coverage for the new fromConfig factory.
agent/README.md Documents the new config-backed agent creation option.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agent/README.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

This comment was marked as resolved.

This comment was marked as resolved.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread agent/src/main/scala/za/co/absa/atum/agent/AtumAgent.scala
Comment thread agent/src/test/scala/za/co/absa/atum/agent/AtumAgentUnitTests.scala Outdated
Comment thread agent/src/test/scala/za/co/absa/atum/agent/AtumAgentUnitTests.scala Outdated
ABLL526 and others added 2 commits May 13, 2026 16:17
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@ABLL526 ABLL526 changed the title Added factory for config-backed agent Added factory for config-backed Atum-Agent May 13, 2026
Comment thread agent/src/main/scala/za/co/absa/atum/agent/AtumAgent.scala Outdated
Comment thread agent/src/main/scala/za/co/absa/atum/agent/AtumAgent.scala Outdated
Comment thread agent/src/main/scala/za/co/absa/atum/agent/AtumAgent.scala Outdated

@lsulak lsulak left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like this, thank you for your contribution!!

One thing, since you fundamentally changed this: before we had only 1 singleton Atum Agent, now a user can create his own instance. This is not covered with tests, so there is no verification that the returned agent is independent (own context store, own currentUser resolution). Worth adding at least a test showing two agents with different configs coexist.

@ABLL526

ABLL526 commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

I like this, thank you for your contribution!!

One thing, since you fundamentally changed this: before we had only 1 singleton Atum Agent, now a user can create his own instance. This is not covered with tests, so there is no verification that the returned agent is independent (own context store, own currentUser resolution). Worth adding at least a test showing two agents with different configs coexist.

Thank you, I have amended the test to ensure this was covered as well.

@lsulak lsulak left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approving, thanks! With your prior permissions (on a chat), I'm gonna merge this now.

@lsulak lsulak merged commit 1000e51 into master Jun 1, 2026
6 of 8 checks passed
@lsulak lsulak deleted the feature/438-add-factory-for-config-backed-agent branch June 1, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Agent Issues touching the agent part of the project dependent The item depends on some other open item (Issue or PR) enhancement New feature or request infrastructure Project setup and deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add factory for config-backed AtumAgent

3 participants