Giter Site home page Giter Site logo

Comments (3)

ikbenale avatar ikbenale commented on July 4, 2024 1

This used to work for us in previous versions. We've established that it breaks from v3.1.0 to v3.2.0, though we're not sure what change made it stop working https://github.com/sous-chefs/consul/compare/v3.1.0..v3.2.0.

We also tried with the latest version (v4.0.3) and we had the same issue. We can make our chef-client runs pass with the following patch, though we're not sure if it's optimal:

diff --git a/libraries/consul_definition.rb b/libraries/consul_definition.rb
index 2eefec6..bb406a7 100644
--- a/libraries/consul_definition.rb
+++ b/libraries/consul_definition.rb
@@ -37,7 +37,7 @@ module ConsulCookbook

       def params_to_json
         final_parameters = parameters
-        final_parameters = final_parameters.merge(name: name) if final_parameters[:name].nil?
+        final_parameters = final_parameters.merge(name: name) if %w(check service).include?(type) && final_parameters[:name].nil?
         JSON.pretty_generate(type => final_parameters)
       end

More details on this thread https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/9343#note_400279286 /cc @ahanselka

from consul.

ikbenale avatar ikbenale commented on July 4, 2024 1

@ramereth sure, created #569

from consul.

ramereth avatar ramereth commented on July 4, 2024

@eReGeBe could you please make a PR which includes this fix so we can see how this goes with tests?

from consul.

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.