Git Product home page Git Product logo

Comments (10)

martin-mat avatar martin-mat commented on September 4, 2024

Good point. However identifying resources deployed by a helm chart is probably non-trivial task. It needs to be analyzed/explored if/how this would be possible.

from testsuite.

sysarch-repo avatar sysarch-repo commented on September 4, 2024

@martin-mat,
Below are additional insights that point to an issue with the label filtering on StatefulSets.

I am deploying two objects as AUT:

  • Deployment/release-dns-sig
  • StatefulSet/release-dns-prov
    The number of replicas is 1 pod for each AUT object.

There are also other Deployments / StatefulSets deployed in the same namespace (without those, the AUT would not become ready and work properly).

For the Deployment, the test correctly logs:
INFO -- cnf-testsuite-specialized_init_system: Pod count for resource Deployment/release-dns-sig in ns: 1

But for the StatefulSet,the test incorrectly determines:
INFO -- cnf-testsuite-specialized_init_system: Pod count for resource StatefulSet/release-dns-prov in ns: 8

So instead of identifying one replica of StatefulSet/release-dns-prov the test checks 8 objects including itself, the already checked object Deployment/release-dns-sig, and 6 other objects in the namespace.

I have updated the title and the bug description accordingly and am staying tuned for any follow-up thoughts or support.

from testsuite.

sysarch-repo avatar sysarch-repo commented on September 4, 2024

@martin-mat, is there anything else I can add to the ticket to move it forward? Currently, the issue is extremely extending the duration of the tests and I also believe that the sig_term_handled test fails because of the multiple involvement of the same pod in the test. Thanks a lot for your support.

from testsuite.

martin-mat avatar martin-mat commented on September 4, 2024

@sysarch-repo sure you can; this is open community project, you are free and welcome to figure out how to design a fix and and go ahead with implementation.
If you are not into digging into the code, you need to wait until someone has some time to work on it. The fix of this does not look to be trivial and needs some time.
Meanwhile you can think about a workaround - depending on your use case, for example splitting to 2 different namespaces.

Other than that that: can you get in contact with me via LFN slack?
https://github.com/cnti-testcatalog/testsuite?tab=readme-ov-file#communication-and-community-meetings

from testsuite.

martin-mat avatar martin-mat commented on September 4, 2024

the issue might point here
https://github.com/cnf-testsuite/kubectl_client/blob/v1.0.6/kubectl_client.cr#L1310

from testsuite.

sysarch-repo avatar sysarch-repo commented on September 4, 2024

@martin-mat thanks a lot. Very helpful and much appreciated. IMO the simple fix would be adding an if statement for statefulset to use the labels in the pod selector - exactly as done for the deployment type.

    def self.resource_spec_labels(kind : String, resource_name : String, namespace : String | Nil = nil) : JSON::Any
      Log.debug { "resource_labels kind: #{kind} resource_name: #{resource_name}" }
      if kind.downcase == "service"
        resp = resource(kind, resource_name, namespace: namespace).dig?("spec", "selector")
      elsif kind.downcase == "deployment" 
        resp = resource(kind, resource_name, namespace: namespace).dig?("spec", "selector", "matchLabels")
      elsif kind.downcase == "statefulset" 
        resp = resource(kind, resource_name, namespace: namespace).dig?("spec", "selector", "matchLabels")
      else
        resp = resource(kind, resource_name, namespace: namespace).dig?("spec", "template", "metadata", "labels")
      end
      Log.debug { "resource_labels: #{resp}" }
      if resp
        resp
      else
        JSON.parse(%({}))
      end
    end

I am not skilled wrt git merges (yet) and crystal but I am happy to join the team on Slack. Thanks again!

from testsuite.

martin-mat avatar martin-mat commented on September 4, 2024

@sysarch-repo can you please test this patch on your cnf?
cnf-testsuite/kubectl_client#14

from testsuite.

sysarch-repo avatar sysarch-repo commented on September 4, 2024

@martin-mat I can only test by downloading a new CNTI testsuite tar gz, i.e. here is how I install it on AWS EC2:
curl -sLO "https://github.com/cnti-testcatalog/testsuite/releases/download/v1.2.0/cnf-testsuite-v1.2.0.tar.gz"
I assume for the test you ask I need to master a different procedure but I have no skills / experience with that. Thoughts?

from testsuite.

martin-mat avatar martin-mat commented on September 4, 2024

Thoughts?

joining the lfn slack for a quicker support?

from testsuite.

martin-mat avatar martin-mat commented on September 4, 2024

The issue is addressed by cnf-testsuite/kubectl_client#14 and #2085 and released as a part of v1.3.0.

from testsuite.

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.