devfile / api

Kube-native API for cloud development workspaces specification
Apache License 2.0
235 stars 58 forks source link

odo v2 check failing with `java-quarkus` stack #1514

Open michael-valdron opened 1 month ago

michael-valdron commented 1 month ago

Which area this feature is related to?

/kind bug

Which area this bug is related to?

/area registry

What versions of software are you using?

Go project

Operating System and version: N/A

Go Pkg Version: 1.19

Bug Summary

Describe the bug:

The java-quarkus v1.3.0 stack is currently failing on the odo v2 check due to the redirect status code 302 FOUND which is not expected by this check. An investigation as to why this is happening and if this should be expected or not.

To Reproduce:

Run bash tests/check_odov2.sh under devfile/registry.

Expected behavior

Running this check on java-quarkus v1.3.0 should pass with status code 200 OK.

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable

Failure output for java-quarkus v1.3.0:

'
+ sleep 10
+ for i in $(seq 1 10)
try: 10
+ echo 'try: 10'
++ curl -i http://http-quarkus.192.168.49.2.nip.io/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
+ content='HTTP/1.1 302 Found
Checking if http://http-quarkus.192.168.49.2.nip.io/ is returning HTTP 200
Date: Wed, 03 Apr 2024 14:18:57 GMT
Content-Length: 0
Connection: keep-alive
Location: /q/dev-ui/welcome

'
+ echo 'Checking if http://http-quarkus.192.168.49.2.nip.io/ is returning HTTP 200'
+ echo 'HTTP/1.1 302 Found
Date: Wed, 03 Apr 2024 14:18:57 GMT
Content-Length: 0
Connection: keep-alive
Location: /q/dev-ui/welcome

'
+ grep -q -E 'HTTP/[0-9.]+ 200'
+ ret_val=1
ERROR: not HTTP 200
+ '[' 1 -ne 0 ']'
+ echo 'ERROR: not HTTP 200'
+ echo 'HTTP/1.1 302 Found
Date: Wed, 03 Apr 2024 14:18:57 GMT
Content-Length: 0
Connection: keep-alive
Location: /q/dev-ui/welcome

'
+ sleep 10
HTTP/1.1 302 Found
Date: Wed, 03 Apr 2024 14:18:57 GMT
Content-Length: 0
Connection: keep-alive
Location: /q/dev-ui/welcome

+ return 1
+ '[' 1 -ne 0 ']'
+ echo 'ERROR: unable to get working url'
+ odo project delete -f java-quarkus-130
ERROR: unable to get working url
 ⚠  Warning! Projects are asynchronously deleted from the cluster. odo does its best to delete the project. Due to multi-tenant clusters, the project may still exist on a different node.
 ✓  Deleted project : java-quarkus-130
+ FAILED_TESTS+=("name: $devfile_name version: $devfile_version error: unable to get working url")
+ error=true
+ return 1
+ for stack in $STACKS
+ devfile_path=/home/runner/work/registry/registry/stacks/java-quarkus/1.4.0/devfile.yaml
+ '[' '!' -f /home/runner/work/registry/registry/stacks/java-quarkus/1.4.0/devfile.yaml ']'
++ yq eval .schemaVersion /home/runner/work/registry/registry/stacks/java-quarkus/1.4.0/devfile.yaml
+ devfile_schema_version=2.2.0
+ [[ 2.2.0 == \2\.\2\.* ]]
+ continue
+ '[' '!' 1 -eq 0 ']'
+ echo 'The following tests failed:'
+ for test in "${FAILED_TESTS[@]}"
+ echo 'name: java-quarkus version: 1.3.0 error: unable to get working url'
+ exit 1
The following tests failed:
name: java-quarkus version: 1.3.0 error: unable to get working url
Error: Process completed with exit code 1.

Additional context

Any workaround?

None found yet, needs investigation.

Suggestion on how to fix the bug

None found yet, needs investigation.

michael-valdron commented 1 month ago

Discovered in https://github.com/devfile/registry/pull/341#issuecomment-2035388706, ran into failing check on existing java-quarkus v1.3.0 when reviewing new java-quarkus v1.4.0 stack version.