Git Product home page Git Product logo

Comments (10)

michael-valdron avatar michael-valdron commented on August 17, 2024 1

I've been looking around this and I think it might make sense to remove the prefix from the test?

https://github.com/devfile/library/blob/main/pkg/devfile/parser/parse_test.go#L4857

I found this answer too and I've tried this, it produces a different error as the function from net needs the prefix to determine which protocol to use.

from api.

michael-valdron avatar michael-valdron commented on August 17, 2024

blocking devfile/library#212 from merging

from api.

michael-valdron avatar michael-valdron commented on August 17, 2024

Was able to reproduce within a Ubuntu 22.04 LTS VM:
image

From here can debug what is happening.

from api.

michael-valdron avatar michael-valdron commented on August 17, 2024

Was able to reproduce within a Ubuntu 22.04 LTS VM: image

From here can debug what is happening.

Running same make test on Fedora 39 with same Go version 1.21.10 all cases pass, issue seems isolated to Ubuntu.

from api.

michael-valdron avatar michael-valdron commented on August 17, 2024

Was able to trace error back to here: https://github.com/golang/go/blob/752b009010df021c45f620e683ec062d22b552bf/src/net/dnsclient_unix.go#L230

Expected error should be traced here: https://github.com/golang/go/blob/752b009010df021c45f620e683ec062d22b552bf/src/net/dnsclient_unix.go#L209

The problem seems to be in how systemd-resolved is resolving the given hostname.

from api.

michael-valdron avatar michael-valdron commented on August 17, 2024

Testing later Ubuntu version in workflows: devfile/library#214

from api.

michael-valdron avatar michael-valdron commented on August 17, 2024

Testing later Ubuntu version in workflows: devfile/library#214

No good, still produces:

=== RUN   Test_parseFromRegistry/should_fail_if_registryUrl_is_invalid
    parse_test.go:4879: 
        	Error Trace:	/home/runner/work/library/library/pkg/devfile/parser/parse_test.go:4879
        	Error:      	Expect "Get "http://http//invalid.com/devfiles/notexist/": dial tcp: lookup http on 127.0.0.53:53: server misbehaving" to match "Get .* dial tcp: lookup http: .*"
        	Test:       	Test_parseFromRegistry/should_fail_if_registryUrl_is_invalid
        	Messages:   	Test_parseFromRegistry(): Error message should match

from api.

thepetk avatar thepetk commented on August 17, 2024

I've been looking around this and I think it might make sense to remove the prefix from the test?

https://github.com/devfile/library/blob/main/pkg/devfile/parser/parse_test.go#L4857

from api.

michael-valdron avatar michael-valdron commented on August 17, 2024

Was able to reproduce within a Ubuntu 22.04 LTS VM: image
From here can debug what is happening.

Running same make test on Fedora 39 with same Go version 1.21.10 all cases pass, issue seems isolated to Ubuntu.

Isolated problem down to it only effecting Ubuntu Server on Go 1.21, all other instances including Ubuntu Desktop should be unaffected to my knowledge.

from api.

michael-valdron avatar michael-valdron commented on August 17, 2024

Using a bypass error pattern to expect server misbehaving if Ubuntu Server: devfile/library#217

Tried these changes with changes in devfile/library#212 under a Ubuntu Server 22.04 LTS and got:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy
$ make test
...
=== RUN   Test_parseFromRegistry
=== RUN   Test_parseFromRegistry/should_fail_if_provided_registryUrl_does_not_have_protocol_prefix
=== RUN   Test_parseFromRegistry/should_be_able_to_parse_from_provided_registryUrl
=== RUN   Test_parseFromRegistry/should_be_able_to_parse_from_registry_URL_defined_in_tool
=== RUN   Test_parseFromRegistry/should_be_able_to_parse_from_provided_registryUrl_with_latest_version_specified
=== RUN   Test_parseFromRegistry/should_be_able_to_parse_from_provided_registryUrl_with_version_specified
=== RUN   Test_parseFromRegistry/should_fail_if_provided_registryUrl_cannot_download_resources
=== RUN   Test_parseFromRegistry/should_fail_if_version_does_not_exist
=== RUN   Test_parseFromRegistry/should_fail_if_registryId_does_not_exist
=== RUN   Test_parseFromRegistry/should_fail_if_registryUrl_is_not_provided,_and_no_registry_URLs_has_been_set_in_tool
=== RUN   Test_parseFromRegistry/should_fail_if_registryUrl_is_invalid
=== RUN   Test_parseFromRegistry/should_fail_if_registry_returns_a_bad_devfile_content
--- PASS: Test_parseFromRegistry (2.73s)
...

from api.

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.