sefe / sefe/dorc

Consolidate dual build validation paths (DeployableBuildFactory vs RequestsManager)

Open
#588 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement shaping future
Dominant language
C#
Stars
5
Forks
3
Avg merge
1d 22h
Merged PRs (30d)
14

Description

Background

PR #584 introduced IBuildServerClientFactory used by both DeployableBuildFactory and RequestsManager. These two paths both independently resolve the project, create build clients, and validate builds with divergent error handling.

Problem

  • DeployableBuildFactory.CreateInstance()IDeployableBuild.IsValid() validates synchronously
  • RequestsManager.BuildServerDetailAsync() → validates asynchronously via ValidateBuildAsync()

Both call GetProject() independently and create separate client instances. Error handling differs.

Impact

Parallel paths will diverge in behaviour over time, creating subtle bugs where one accepts a build the other rejects.

Recommended Approach

Create a BuildValidationService that encapsulates project lookup + client creation + validation. Both DeployableBuildFactory and RequestsManager delegate to this service with consistent error handling.

Identified in multi-model review of PR #584 (Finding #10)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading DeployableBuildFactory.CreateInstance(), IDeployableBuild.IsValid(), RequestsManager.BuildServerDetailAsync(), and ValidateBuildAsync(), along with the IBuildServerClientFactory usage introduced in PR #584. Trace how each path resolves projects, creates clients, and handles errors. Done means both paths delegate project lookup, client creation, and validation to one service with consistent behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devops
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.