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

Add name detection to odo analyze #6682

Merged
merged 4 commits into from
Mar 28, 2023

Conversation

valaparthvi
Copy link
Contributor

@valaparthvi valaparthvi commented Mar 24, 2023

What type of PR is this:
/kind bug

What does this PR do / why we need it:
This PR adds missing name detection to odo analyze
Which issue(s) this PR fixes:

Fixes #6649

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

  1. mkdir /tmp/demo; cd /tmp/demo
  2. odo init --devfile go --name my-go-app --starter go-starter --devfile-version latest
  3. odo analyze -o json

@netlify
Copy link

netlify bot commented Mar 24, 2023

Deploy Preview for odo-docusaurus-preview ready!

Name Link
🔨 Latest commit 8483355
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/642297c304fa56000707ea32
😎 Deploy Preview https://deploy-preview-6682--odo-docusaurus-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Mar 24, 2023
@valaparthvi valaparthvi changed the title Add name detection to odo analyze WIP: Add name detection to odo analyze Mar 24, 2023
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Mar 24, 2023
@valaparthvi valaparthvi requested review from feloy and rm3l and removed request for anandrkskd and rnapoles-rh March 24, 2023 11:12
@odo-robot
Copy link

odo-robot bot commented Mar 24, 2023

Windows Tests (OCP) on commit 942a762 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 24, 2023

NoCluster Tests on commit 942a762 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 24, 2023

Unit Tests on commit 942a762 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 24, 2023

Validate Tests on commit 942a762 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 24, 2023

Kubernetes Tests on commit 942a762 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 24, 2023

OpenShift Tests on commit 942a762 finished with errors.
View logs: TXT HTML

@valaparthvi valaparthvi changed the title WIP: Add name detection to odo analyze Add name detection to odo analyze Mar 24, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. Required by Prow. label Mar 24, 2023
Signed-off-by: Parthvi Vala <pvala@redhat.com>
@odo-robot
Copy link

odo-robot bot commented Mar 26, 2023

OpenShift Unauthenticated Tests on commit 942a762 finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Mar 26, 2023

Kubernetes Docs Tests on commit d0edfb6 finished successfully.
View logs: TXT HTML

@valaparthvi
Copy link
Contributor Author

/override OpenShift-Integration-tests/OpenShift-Integration-tests

 [FAILED] Timed out after 180.001s.
  Expected
      <string>:  âš   Pod is Terminating
       ✗  Finished executing the application (command: devrun) [42s]
       âš   No pod exists
       âš   Pod is Pending
       ✓  Pod is Running
       •  Syncing files into the container  ...
      
 ✓  Syncing files into the container [729ms]
       •  Building your application in container (command: devbuild)  ...
      
 ✓  Building your application in container (command: devbuild) [4s]
       •  Executing the application (command: devrun)  ...
       -  Forwarding from 127.0.0.1:46755 -> 3000
      
      
      ↪ Dev mode
       Keyboard Commands:
      [Ctrl+c] - Exit and delete resources from the cluster
           [p] - Manually apply local changes to the application on the cluster
      
  To satisfy at least one of these matchers: [%!s(*matchers.ContainSubstringMatcher=&{Pushing files... []}) %!s(*matchers.ContainSubstringMatcher=&{Updating Component... []})]
  In [BeforeEach] at: /go/odo_1/tests/helper/helper_run.go:64 @ 03/26/23 09:31:00.809
  [FAIL] odo dev command tests port-forwarding for the component when devfile has single endpoint when running odo dev when modifying memoryLimit for container in Devfile [BeforeEach] should react on the Devfile modification

@openshift-ci
Copy link

openshift-ci bot commented Mar 27, 2023

@valaparthvi: Overrode contexts on behalf of valaparthvi: OpenShift-Integration-tests/OpenShift-Integration-tests

In response to this:

/override OpenShift-Integration-tests/OpenShift-Integration-tests

[FAILED] Timed out after 180.001s.
 Expected
     <string>:  âš   Pod is Terminating
      ✗  Finished executing the application (command: devrun) [42s]
      âš   No pod exists
      âš   Pod is Pending
      ✓  Pod is Running
      •  Syncing files into the container  ...
     
✓  Syncing files into the container [729ms]
      •  Building your application in container (command: devbuild)  ...
     
✓  Building your application in container (command: devbuild) [4s]
      •  Executing the application (command: devrun)  ...
      -  Forwarding from 127.0.0.1:46755 -> 3000
     
     
     ↪ Dev mode
      Keyboard Commands:
     [Ctrl+c] - Exit and delete resources from the cluster
          [p] - Manually apply local changes to the application on the cluster
     
 To satisfy at least one of these matchers: [%!s(*matchers.ContainSubstringMatcher=&{Pushing files... []}) %!s(*matchers.ContainSubstringMatcher=&{Updating Component... []})]
 In [BeforeEach] at: /go/odo_1/tests/helper/helper_run.go:64 @ 03/26/23 09:31:00.809
 [FAIL] odo dev command tests port-forwarding for the component when devfile has single endpoint when running odo dev when modifying memoryLimit for container in Devfile [BeforeEach] should react on the Devfile modification

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@valaparthvi
Copy link
Contributor Author

/override windows-integration-test/Windows-test

  Deleting dir: C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375
  Unable to delete C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375 on attempt #10, trying again...
  [odo] I0326 04:35:14.791379    9708 watch.go:449] Copying files [] to pod
  [odo] I0326 04:35:14.791570    9708 util.go:198] path devfile.yaml doesn't exist, skipping it
  [odo] I0326 04:35:14.791570    9708 util.go:198] path .devfile.yaml doesn't exist, skipping it
  [odo] I0326 04:35:14.791570    9708 context.go:159] absolute devfile path: 'C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375\devfile.yaml'
  [odo] I0326 04:35:14.791570    9708 context.go:110] absolute devfile path: 'C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375\devfile.yaml'
  [odo] I0326 04:35:14.791570    9708 watch.go:470] Error from Push: unable to generate component from watch parameters: failed to populateAndParseDevfile: failed to read devfile from path 'C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375\devfile.yaml': open C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375\devfile.yaml: The system cannot find the file specified.
  [odo] I0326 04:35:14.791570    9708 backo.go:23] wait for 10s
  [odo] Error occurred on Push - unable to generate component from watch parameters: failed to populateAndParseDevfile: failed to read devfile from path 'C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375\devfile.yaml': open C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375\devfile.yaml: The system cannot find the file specified.
  [odo] 
  Deleting dir: C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375
  Unable to delete C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375 on attempt #11, trying again...
  [FAILED] in [AfterEach] - C:/Users/Administrator.ANSIBLE-TEST-VS/3483/tests/helper/helper_filesystem.go:48 @ 03/26/23 04:35:23.957
  << Timeline

  [FAILED] Expected
      <*url.Error | 0xc0000b9020>: {
          Op: "Post",
          URL: "http://127.0.0.1:61069/api/newuser",
          Err: <*errors.errorString | 0xc000088130>{s: "EOF"},
      }
  to be nil
  In [It] at: C:/Users/Administrator.ANSIBLE-TEST-VS/3483/tests/e2escenarios/e2e_test.go:306 @ 03/26/23 04:33:17.6

  There were additional failures detected.  To view them in detail run ginkgo -vv
------------------------------

Summarizing 1 Failure:
  [FAIL] E2E Test starting with non-empty Directory add Binding [It] should verify developer workflow of using binding as env in innerloop

@openshift-ci
Copy link

openshift-ci bot commented Mar 27, 2023

@valaparthvi: Overrode contexts on behalf of valaparthvi: windows-integration-test/Windows-test

In response to this:

/override windows-integration-test/Windows-test

 Deleting dir: C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375
 Unable to delete C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375 on attempt #10, trying again...
 [odo] I0326 04:35:14.791379    9708 watch.go:449] Copying files [] to pod
 [odo] I0326 04:35:14.791570    9708 util.go:198] path devfile.yaml doesn't exist, skipping it
 [odo] I0326 04:35:14.791570    9708 util.go:198] path .devfile.yaml doesn't exist, skipping it
 [odo] I0326 04:35:14.791570    9708 context.go:159] absolute devfile path: 'C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375\devfile.yaml'
 [odo] I0326 04:35:14.791570    9708 context.go:110] absolute devfile path: 'C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375\devfile.yaml'
 [odo] I0326 04:35:14.791570    9708 watch.go:470] Error from Push: unable to generate component from watch parameters: failed to populateAndParseDevfile: failed to read devfile from path 'C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375\devfile.yaml': open C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375\devfile.yaml: The system cannot find the file specified.
 [odo] I0326 04:35:14.791570    9708 backo.go:23] wait for 10s
 [odo] Error occurred on Push - unable to generate component from watch parameters: failed to populateAndParseDevfile: failed to read devfile from path 'C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375\devfile.yaml': open C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375\devfile.yaml: The system cannot find the file specified.
 [odo] 
 Deleting dir: C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375
 Unable to delete C:\Users\Administrator.ANSIBLE-TEST-VS\AppData\Local\Temp\2606349375 on attempt #11, trying again...
 [FAILED] in [AfterEach] - C:/Users/Administrator.ANSIBLE-TEST-VS/3483/tests/helper/helper_filesystem.go:48 @ 03/26/23 04:35:23.957
 << Timeline

 [FAILED] Expected
     <*url.Error | 0xc0000b9020>: {
         Op: "Post",
         URL: "http://127.0.0.1:61069/api/newuser",
         Err: <*errors.errorString | 0xc000088130>{s: "EOF"},
     }
 to be nil
 In [It] at: C:/Users/Administrator.ANSIBLE-TEST-VS/3483/tests/e2escenarios/e2e_test.go:306 @ 03/26/23 04:33:17.6

 There were additional failures detected.  To view them in detail run ginkgo -vv
------------------------------

Summarizing 1 Failure:
 [FAIL] E2E Test starting with non-empty Directory add Binding [It] should verify developer workflow of using binding as env in innerloop

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also update the odo analyze documentation and sample output?
https://odo.dev/docs/command-reference/json-output#odo-analyze--o-json

tests/helper/helper_generic.go Outdated Show resolved Hide resolved
tests/integration/cmd_analyze_test.go Outdated Show resolved Hide resolved
@rm3l
Copy link
Member

rm3l commented Mar 27, 2023

What type of PR is this: /kind bug

What does this PR do / why we need it: This PR adds missing name detection to odo analyze Which issue(s) this PR fixes:

Fixes #

This PR should fix #6649, no?

valaparthvi and others added 3 commits March 28, 2023 12:56
Co-authored-by: Armel Soro <armel@rm3l.org>
Co-authored-by: Armel Soro <armel@rm3l.org>
Signed-off-by: Parthvi Vala <pvala@redhat.com>
@sonarcloud
Copy link

sonarcloud bot commented Mar 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.3% 0.3% Duplication

Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! Tested and approved! ;-)

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Mar 28, 2023
@feloy
Copy link
Contributor

feloy commented Mar 28, 2023

/override OpenShift-Integration-tests/OpenShift-Integration-tests
Flaky test

[FAILED] [72.627 seconds]
odo logs command tests when component is created and odo logs is executed when running in both Dev and Deploy mode [It] should successfully show logs of the running component
/go/odo_1/tests/integration/cmd_logs_test.go:247

@feloy
Copy link
Contributor

feloy commented Mar 28, 2023

/override OpenShift-Integration-tests/OpenShift-Integration-tests

@openshift-ci
Copy link

openshift-ci bot commented Mar 28, 2023

@feloy: Overrode contexts on behalf of feloy: OpenShift-Integration-tests/OpenShift-Integration-tests

In response to this:

/override OpenShift-Integration-tests/OpenShift-Integration-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@valaparthvi
Copy link
Contributor Author

/test ci/prow/v4.12-images

@openshift-ci
Copy link

openshift-ci bot commented Mar 28, 2023

@valaparthvi: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test v4.10-images
  • /test v4.11-images
  • /test v4.12-images
  • /test v4.13-images

Use /test all to run all jobs.

In response to this:

/test ci/prow/v4.12-images

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@valaparthvi
Copy link
Contributor Author

/test v4.12-images

@openshift-merge-robot openshift-merge-robot merged commit 61d53dc into redhat-developer:main Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing name detection to odo analyze
4 participants