Skip to content

Refactor golang package builder to options #859

@gerimate

Description

@gerimate

We would like to refactor the existing code to follow a more idiomatic builder pattern for our present Docker container builder (golang/pkg/builder/container) in go. This will involve creating a new package named golang/pkg/builder/decker and implementing unit and integration tests to ensure the functionality remains intact. This is a reusable library for spawning docker containers with an interface for runtime independent extensibility.

Proposed Changes

  • Create a new Golang package named golang/pkg/builder/decker.
  • Implement unit and integration tests to validate the functionality.
  • Migrate the Docker client, image, and container name parameters to this new builder pattern.
  • Maintain the original feature set without introducing new functionality.
  • Ensure code coverage remains the same or improves during the refactor.

Additional Details

This refactor aims to make the codebase more idiomatic and maintainable. Other components of the stack shouldn't be modified. This is a fairly large task, but it doesn't involve the whole builder, so it's expected that new issues will be introduced regarding this refactor.

Definition of Done

  • The code is reviewed and approved.
  • All tests pass successfully.
  • Documentation is updated if necessary.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions