Rewrite AddSubnetsWithTemplate to work around gccgo bug #4106

Merged
merged 1 commit into from Jan 14, 2016

Conversation

Projects
None yet
3 participants
Contributor

davecheney commented Jan 14, 2016

Fixes LP 1533792

gccgo-4.9 as shipped in Trusty has a number of issues when interfaces
and reflection are combined. In an ideal world these bugs would not
happen, but they do, so the most expedient course of action is to
work around them in our code.

This change replaces the reflection driven construction of a state.SubnetInfo
structure with a more straight forward method which permutes the string
fields known to the structure today. This isn't as future proof as the
previous method, but avoiding the Faustian combination of interfaces and
reflection should make this code more reliable on buggy compilers.

(Review request: http://reviews.vapour.ws/r/3527/)

Contributor

davecheney commented Jan 14, 2016

$$merge$$

Contributor

jujubot commented Jan 14, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

cherylj commented Jan 14, 2016

$$JFDI$$

Contributor

jujubot commented Jan 14, 2016

Build failed: Generating tarball failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/5945

Contributor

davecheney commented Jan 14, 2016

$$JFDI$$

Contributor

davecheney commented Jan 14, 2016

$$JFDI$$

Contributor

jujubot commented Jan 14, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Jan 14, 2016

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/5946

Rewrite AddSubnetsWithTemplate to work around gccgo bug
Fixes LP 1533792

gccgo-4.9 as shipped in Trusty has a number of issues when interfaces
and reflection are combined. In an ideal world these bugs would not
happen, but they do, so the most expedient course of action is to
work around them in our code.

This change replaces the reflection driven construction of a state.SubnetInfo
structure with a more straight forward method which permutes the string
fields known to the structure today. This isn't as future proof as the
previous method, but avoiding the faustian combinaton of interfaces and
reflection should make this code more reliable on buggy compilers.
Contributor

davecheney commented Jan 14, 2016

$$JFDI$$

Contributor

jujubot commented Jan 14, 2016

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Jan 14, 2016

Merge pull request #4106 from davecheney/fixedbugs/1533792
Rewrite AddSubnetsWithTemplate to work around gccgo bug

Fixes LP 1533792

gccgo-4.9 as shipped in Trusty has a number of issues when interfaces
and reflection are combined. In an ideal world these bugs would not
happen, but they do, so the most expedient course of action is to
work around them in our code.

This change replaces the reflection driven construction of a state.SubnetInfo
structure with a more straight forward method which permutes the string
fields known to the structure today. This isn't as future proof as the
previous method, but avoiding the Faustian combination of interfaces and
reflection should make this code more reliable on buggy compilers.

(Review request: http://reviews.vapour.ws/r/3527/)

@jujubot jujubot merged commit 36b2604 into juju:master Jan 14, 2016

@davecheney davecheney deleted the davecheney:fixedbugs/1533792 branch Jan 14, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment