Page MenuHomePhabricator

Simplify Docker instruction compilation
ClosedPublic

Authored by dduvall on Feb 28 2018, 12:46 AM.

Details

Reviewers
thcipriani
demon
hashar
mmodell
Group Reviewers
Release-Engineering-Team
Commits
rGBLBR8fa191f03d34: Simplify Docker instruction compilation
Patch without arc
git checkout -b D990 && curl -L https://phabricator.wikimedia.org/D990?download=true | git apply
Summary

After adding a number of new instructions, it seemed there was a lot of
redundant implementation between concrete types. This refactor uses just
one concrete unexported type and a few options for determining the
output format instead of one struct type per possible Docker
instruction.

The exported docker.Instruction interface and signature of
docker.NewInstruction is unchanged with this refactor. Unit tests for
Docker instruction compilation were simplified to not make type
assertions but were otherwise left to ensure no regression.

Depends on D984

Test Plan

Run go test ./....

Diff Detail

Repository
rGBLBR Blubber
Branch
refactor-docker-instructions
Lint
Lint OK
Unit
Unit Tests OK
Build Status
Buildable 2805
Build 4694: arc lint + arc unit