Git Product home page Git Product logo

Comments (22)

stripecodahale avatar stripecodahale commented on July 17, 2024

Yeah, it looks like a bug.

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on July 17, 2024

I don't have a good Route53 use case or much time to work on this, but I'd absolutely accept a PR for this. It looks, in general, like the input shape for ChangeResourceRecordSets doesn't have payload set, which means the current template skips it. Not all requests should be serialized into request entities, so I'm not sure how to disambiguate. Perhaps you can.

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on July 17, 2024

Let's track the debugging over here, @dgouldin. That last change should do it?

from aws-sdk-go.

dgouldin avatar dgouldin commented on July 17, 2024

Almost, except now you're emitting container elements for empty slices:

<ResourceRecords></ResourceRecords>

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on July 17, 2024

How about now?

from aws-sdk-go.

dgouldin avatar dgouldin commented on July 17, 2024

Um, looks like I lost <EvaluateTargetHealth>false</EvaluateTargetHealth> with that commit.

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on July 17, 2024

Did you set that using aws.False or aws.Boolean? It should only skip that if the value is nil.

from aws-sdk-go.

dgouldin avatar dgouldin commented on July 17, 2024

aws.Boolean(false). It was there before that last commit. Let me try using aws.False instead ...

from aws-sdk-go.

dgouldin avatar dgouldin commented on July 17, 2024

Yeah, same. It's still missing with aws.False.

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on July 17, 2024

This looks like an inconsistency w/ encoding/xml: http://play.golang.org/p/4pOo8Knh8c

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on July 17, 2024

Yep: golang/go#5452

Not sure what to do w/ this.

from aws-sdk-go.

dgouldin avatar dgouldin commented on July 17, 2024

There's no way to explicitly specify that EvaluateTargetHealth has to always be included is there?

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on July 17, 2024

Ideally, the pointer serves as that sigil, but that doesn't work with encoding/json.

We can either encode everything or skip all zero values.

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on July 17, 2024

d3f7b74 should restore manual control, at least, but it won't be satisfactory until the underlying bug in encoding/json is fixed.

from aws-sdk-go.

dgouldin avatar dgouldin commented on July 17, 2024

Sorry if I'm being dense. <EvaluateTargetHealth>false</EvaluateTargetHealth> is back but so is <ResourceRecords></ResourceRecords>. Is there something I need to do to get this working?

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on July 17, 2024

ResourceRecords has omitempty set, so it shouldn't be marshaling empty slices.

I'm tracking the XML zero value issue over at #32, but it's mostly awkward staring at stdlib bugs.

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on July 17, 2024

I might have a fix: https://github.com/stripe/aws-go/tree/xml-zero-value-kludge

Would you give that a try? I think it should line up with expectations.

from aws-sdk-go.

dgouldin avatar dgouldin commented on July 17, 2024

Looks like both EvaluateTargetHealth and ResourceRecords render as I would expect when using that branch. Oddly, though, now we have a mystery element <->...</-> whose contents are the HostedZoneID used in the uri path:

<ChangeResourceRecordSetsRequest xmlns="https://route53.amazonaws.com/doc/2013-04-01/">
    <ChangeBatch>
        <Change>
            <Action>CREATE</Action>
            <ResourceRecordSet>
                <AliasTarget>
                    <DNSName>{elb.DNSName}</DNSName>
                    <EvaluateTargetHealth>false</EvaluateTargetHealth>
                    <HostedZoneId>{elb.HostedZoneID}</HostedZoneId>
                </AliasTarget>
                <Name>{hostname}</Name>
                <Type>A</Type>
            </ResourceRecordSet>
        </Change>
    </ChangeBatch>
    <->{hostedZoneID}</->
</ChangeResourceRecordSetsRequest>

This wasn't happening in previous commits.

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on July 17, 2024

Pushed a fix for thatβ€”I hadn't re-implented the bit where it skips elements named -. Try again?

from aws-sdk-go.

dgouldin avatar dgouldin commented on July 17, 2024

Ah, noticed one more regression: good ole <Changes> between <ChangeBatch> and <Change>. 😦

from aws-sdk-go.

stripecodahale avatar stripecodahale commented on July 17, 2024

Fixed. Maybe now?


Coda Hale
[email protected]

On Dec 20, 2014, at 2:12 PM, David Gouldin [email protected] wrote:

Ah, noticed one more regression: good ole between and .

β€”
Reply to this email directly or view it on GitHub #30 (comment).

from aws-sdk-go.

dgouldin avatar dgouldin commented on July 17, 2024

πŸ”” πŸ”” πŸ”” we have a winner!

from aws-sdk-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.