Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests might fail if update notification message is displayed in output #6618

Closed
rm3l opened this issue Feb 22, 2023 · 3 comments · Fixed by #6625
Closed

Tests might fail if update notification message is displayed in output #6618

rm3l opened this issue Feb 22, 2023 · 3 comments · Fixed by #6625
Assignees
Labels
area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering kind/bug Categorizes issue or PR as related to a bug.
Milestone

Comments

@rm3l
Copy link
Member

rm3l commented Feb 22, 2023

/kind bug
/area testing

Noticed this while investigating failures on #6500:

cmd_add_binding_test
Expected
      <string>: apiVersion: binding.operators.coreos.com/v1alpha1
      kind: ServiceBinding
      metadata:
        creationTimestamp: null
        name: aname
      spec:
        application:
          group: apps
          kind: Deployment
          name: app
          version: v1
        bindAsFiles: true
        detectBindingResources: true
        services:
        - group: postgresql.k8s.enterprisedb.io
          id: aname
          kind: Cluster
          name: cluster-sample
          resource: clusters
          version: v1
      status:
        secret: ""
      
      ---
      A newer version of odo (v3.7.0) is available,
      visit https://github.com/redhat-developer/odo/releases to update.
      If you wish to disable this notification, run:
      odo preference set UpdateNotification false
      ---
      
  to be equivalent to
      <string>: apiVersion: binding.operators.coreos.com/v1alpha1
      kind: ServiceBinding
      metadata:
        creationTimestamp: null
        name: aname
      spec:
        application:
          group: apps
          kind: Deployment
          name: app
          version: v1
        bindAsFiles: true
        detectBindingResources: true
        services:
        - group: postgresql.k8s.enterprisedb.io
          id: aname
          kind: Cluster
          name: cluster-sample
          resource: clusters
          version: v1
      status:
        secret: ""
      
  In [It] at: /go/odo_1/tests/integration/cmd_add_binding_test.go:53

...
Summarizing 2 Failures:
  [FAIL] odo add binding command tests [It] should create a binding using the workload parameter and naming strategy
  /go/odo_1/tests/integration/cmd_add_binding_test.go:86
  [FAIL] odo add binding command tests [It] should create a binding using the workload parameter
  /go/odo_1/tests/integration/cmd_add_binding_test.go:53

Ran 343 of 611 Specs in 1188.567 seconds
FAIL! -- 341 Passed | 2 Failed | 0 Pending | 268 Skipped
cmd_devfile_build_images_test
    [odo] build -t localhost:5000/devfile-nodejs-deploy:0.1.0 -f /tmp/221699204/Dockerfile /tmp/221699204
    [odo] 
 ✓  Building image locally [5ms]
    [odo] 
    [odo] ---
    [odo] A newer version of odo (v3.7.0) is available,
    [odo] visit https://github.com/redhat-developer/odo/releases to update.
    [odo] If you wish to disable this notification, run:
    [odo] odo preference set UpdateNotification false
    [odo] ---
    Setting current dir to: /go/odo_1/tests/integration
    Deleting dir: /tmp/221699204
    Deleting dir: /tmp/3623255060
  << End Captured GinkgoWriter Output

  Expected
      <string>: odo preference set UpdateNotification false
  to be equivalent to
      <string>: build -t localhost:5000/devfile-nodejs-deploy:0.1.0 -f /tmp/221699204/Dockerfile /tmp/221699204
  In [It] at: /go/odo_1/tests/integration/cmd_devfile_build_images_test.go:125
...
Summarizing 4 Failures:
  [FAIL] odo devfile build-images command tests label nocluster when using a devfile.yaml containing an Image component with a build context [It] should build image via Docker if build context references PROJECT_SOURCE env var [nocluster]
  /go/odo_1/tests/integration/cmd_devfile_build_images_test.go:125
  [FAIL] odo devfile build-images command tests label nocluster when using a devfile.yaml containing an Image component with a build context [It] should build image via Podman if build context references PROJECT_SOURCE env var [nocluster]
  /go/odo_1/tests/integration/cmd_devfile_build_images_test.go:125
  [FAIL] odo devfile build-images command tests label nocluster when using a devfile.yaml containing an Image component with no build context [It] should build image via Podman by defaulting build context to devfile path [nocluster]
  /go/odo_1/tests/integration/cmd_devfile_build_images_test.go:169
  [FAIL] odo devfile build-images command tests label nocluster when using a devfile.yaml containing an Image component with no build context [It] should build image via Docker by defaulting build context to devfile path [nocluster]
  /go/odo_1/tests/integration/cmd_devfile_build_images_test.go:169

Ran 113 of 611 Specs in 79.630 seconds
FAIL! -- 109 Passed | 4 Failed | 0 Pending | 498 Skipped

Any logs, error output, etc?

All the tests below seem to have failed for the same reason:

@openshift-ci openshift-ci bot added kind/bug Categorizes issue or PR as related to a bug. area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering labels Feb 22, 2023
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Feb 22, 2023
@rm3l rm3l added this to odo Project Feb 22, 2023
@feloy
Copy link
Contributor

feloy commented Feb 22, 2023

As I understand, this is because the PR's branch was based on a commit before the bump to 3.7.0.
This should not happen with a branch based on the same version

@rm3l
Copy link
Member Author

rm3l commented Feb 22, 2023

As I understand, this is because the PR's branch was based on a commit before the bump to 3.7.0. This should not happen with a branch based on the same version

Yes, indeed. We should not have the issue with an up-to-date branch. But it is interesting that it highlighted the issue, I think, as it is not clear (from the contributor's perspective) that the PR branch is outdated.
For better resilience, I was thinking of either disabling the UpdateNotifiction preference for the tests where it is not useful, or making the checks on the output less strict.

@feloy
Copy link
Contributor

feloy commented Feb 22, 2023

Yes, I agree that making the checks on the output less strict would help.

@anandrkskd anandrkskd moved this to To Do 📝 in odo Project Feb 27, 2023
@ritudes ritudes moved this from To Do 📝 to In Progress 🚧 in odo Project Feb 28, 2023
@ritudes ritudes moved this from In Progress 🚧 to In Review 👀 in odo Project Feb 28, 2023
@rm3l rm3l removed the needs-triage Indicates an issue or PR lacks a `triage/*` and requires one. label Feb 28, 2023
@rm3l rm3l added this to the v3.8.0 🚀 milestone Mar 1, 2023
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done ✅ in odo Project Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Issues or PRs related to testing, Quality Assurance or Quality Engineering kind/bug Categorizes issue or PR as related to a bug.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants