Code Monkey home page Code Monkey logo

Comments (9)

paulmey avatar paulmey commented on July 17, 2024

This may be because of the empty ResourceExtensionReferences element, I'll investigate...

from azure-sdk-for-go.

paulmey avatar paulmey commented on July 17, 2024

Yep... if I rename the XML element the test succeeds... This was introduced by https://github.com/Azure/azure-sdk-for-go/pull/120/files#diff-1fa4f35573c334c3564b4beebfd085eeL228

I'll see if I can fix it without introducing pointers... :-) @svanharmelen @ahmetalpbalkan

from azure-sdk-for-go.

svanharmelen avatar svanharmelen commented on July 17, 2024

@paulmey hmm... Nasty... So maybe we need a custom xml marshal func after all.

from azure-sdk-for-go.

paulmey avatar paulmey commented on July 17, 2024

That, or maybe just a second level there...
It's either that or a pointer. I can't get a custom marshaller for just wrapped collections to work...

from azure-sdk-for-go.

paulmey avatar paulmey commented on July 17, 2024

@svanharmelen in this particular case, I think it makes sense to distinguish between an empty array of 'resource extension references' and no array at all (nil). Especially in the case of an 'Update Role' operation.
An empty array means that you want to remove all extensions, whereas no array (nil) means that you do not wish to update this aspect of the Role.
Let me test out with some integration tests whether this is the way it works...

from azure-sdk-for-go.

paulmey avatar paulmey commented on July 17, 2024

After doing some hands on tests (paulmey/azure-sdk-for-go@c7b4d1d), it appears that for UpdateRole, nil and empty array are semantically equivalent (ie. I was wrong above). Extensions are deleted by updating the status to uninstall.

from azure-sdk-for-go.

ahmetb avatar ahmetb commented on July 17, 2024

@paulmey wow interesting.

from azure-sdk-for-go.

paulmey avatar paulmey commented on July 17, 2024

well... that's an upbeat reaction... 😉

from azure-sdk-for-go.

paulmey avatar paulmey commented on July 17, 2024

fixed by #165

from azure-sdk-for-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.