Page MenuHomePhabricator

Escape docker output
ClosedPublic

Authored by thcipriani on Jul 6 2017, 9:27 PM.
Referenced Files
Unknown Object (File)
Thu, Nov 23, 2:54 PM
Unknown Object (File)
Wed, Nov 15, 7:36 PM
Unknown Object (File)
Thu, Nov 9, 2:27 PM
Unknown Object (File)
Nov 4 2023, 11:45 AM
Unknown Object (File)
Oct 30 2023, 2:54 PM
Unknown Object (File)
Oct 30 2023, 9:26 AM
Unknown Object (File)
Oct 30 2023, 12:24 AM
Unknown Object (File)
Oct 27 2023, 2:55 PM
Subscribers
None

Details

Maniphest Tasks
T167999: Escape Blubber config values when compiling to Dockerfile
Reviewers
dduvall
mmodell
Group Reviewers
Release-Engineering-Team
Commits
rGBLBR3ad2c475d963: Escape docker output
Patch without arc
git checkout -b D705 && curl -L https://phabricator.wikimedia.org/D705?download=true | git apply
Summary

This adds a new DockerInstruction interface that can be implmented by
different docker instructions. DockerInstruction implements a compile
method that returns escaped output for use in a dockerfile.

Fixes T167999

Diff Detail

Repository
rGBLBR Blubber
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Restricted Application added a reviewer: Release-Engineering-Team. · View Herald Transcript
Restricted Application added a project: Release-Engineering-Team. · View Herald Transcript
Harbormaster completed remote builds in Restricted Buildable.Jul 6 2017, 9:27 PM

The pattern you've implemented looks legit. I've commented on mostly nit things.

docker/compiler.go
91

This will blowup if there's an error in NewDockerInstruction as dockerInstruction will be nil, but I guess that's cool for now since there's no real error handling in Compile. :)

docker/instructions.go
33

From what I've seen so far in the Go sphere, it's idiomatic to drop the Get from getters.

https://golang.org/doc/effective_go.html#Getters

Here I think it makes more sense to simply drop the getter altogether since Arguments is an exported field.

44

Whitespace nit.

52

Whitespace nit.

61

Whitespace nit.

dduvall requested changes to this revision.Jul 10 2017, 4:58 PM
This revision now requires changes to proceed.Jul 10 2017, 4:58 PM
thcipriani edited edge metadata.

Idiomatic getter

Changes look good and you already mentioned that gofmt enforces that single-line struct format and upstream confirms that's just the way it is.

This revision is now accepted and ready to land.Jul 10 2017, 7:52 PM
This revision was automatically updated to reflect the committed changes.