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

Create acceptance tests to go through all devfile samples and all editors using API #21514

Closed
dmytro-ndp opened this issue Jun 28, 2022 · 9 comments
Assignees
Labels
area/qe area/quality-tiers kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system. status/in-progress This issue has been taken by an engineer and is under active development.

Comments

@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Jun 28, 2022

Is your task related to a problem? Please describe

There are tens of devfile samples and several supported editors which are not covered by automated acceptance tests.

Describe the solution you'd like

Samples in upstream and with supported editors have to be covered by automated tests:

  • open workspaces in certain editor;
  • execute each available command described in devfile from within workspace.

The goal is to run devfile API tests instead of GUI tests with complex scenario, a.k.a Happy Path tests.

Describe alternatives you've considered

No response

Additional context

No response

@dmytro-ndp dmytro-ndp added kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system. team/che-qe area/qe labels Jun 28, 2022
@dmytro-ndp dmytro-ndp changed the title Create tests to go throw all samples and all editors using API Create tests to go through all samples and all editors using API Jun 28, 2022
@dmytro-ndp dmytro-ndp changed the title Create tests to go through all samples and all editors using API Create acceptance tests to go through all samples and all editors using API Jul 5, 2022
@dmytro-ndp dmytro-ndp changed the title Create acceptance tests to go through all samples and all editors using API Create acceptance tests to go through all devfile samples and all editors using API Jul 5, 2022
@l0rd l0rd mentioned this issue Mar 6, 2023
7 tasks
@nichjones1 nichjones1 moved this to 📋 Backlog in Eclipse Che Team B Backlog Mar 24, 2023
@nallikaea
Copy link
Contributor

nallikaea commented Mar 28, 2023

@dmytro-ndp @l0rd @musienko-maxim colleagues, could you, please, update this description?

@dmytro-ndp
Copy link
Contributor Author

@nallikaea : done.

@l0rd l0rd moved this from 📋 Backlog to 📅 Planned in Eclipse Che Team B Backlog Mar 28, 2023
@l0rd
Copy link
Contributor

l0rd commented Mar 28, 2023

  • Should be used as a PR check for UDI
  • The list of samples should be grabbed automatically from the devfile registry main branch
  • The PR Check should be reusable for other repos such as the che devfile registry and cncf devfile registry
  • The core test should be:
    1. Take in input a git repository URL or a devfile raw URL
    2. Transform the devfile in a DevWorkspace + VS Code DevWorkspaceTemplate
    3. Apply the DevWorkspace and wait until it's started
    4. Verify that the project has been cloned successfully
    5. Execute build commands and verify that they complete successfully
    6. Execute run/debug commands and verify the lifeness probe
    
  • Build commands are commands with group.kind: build:
    commands:
      - id: build-project
        exec:
          commandLine: JAVA_HOME=$JAVA_HOME_8 mvn clean install
          component: tools
          workingDir: "${PROJECT_SOURCE}"
          group:
            kind: build
  • Run/debug commands are commands that and require a livenessProbe attribute such as:
      commands:
        - id: run-services
          attributes:
            livenessProbe:
              httpGet:
                path: /healthz
                port: 8080
                httpHeaders:
                - name: Custom-Header
                  value: Awesome
              initialDelaySeconds: 3
              periodSeconds: 3
          exec:
            commandLine: JAVA_HOME=$JAVA_HOME_8 mvn spring-boot:run -DskipTests
            component: tools
            workingDir: "${PROJECT_SOURCE}"
  • Commands that do not have group.kind: build and do not have attributs.livenessProbe should be skipped

@nallikaea
Copy link
Contributor

nallikaea commented May 18, 2023

Subtask: #22212

@nallikaea
Copy link
Contributor

Subtask: #22229

@dmytro-ndp dmytro-ndp added the status/in-progress This issue has been taken by an engineer and is under active development. label May 29, 2023
@nallikaea
Copy link
Contributor

  1. Execute build commands and verify that they complete successfully
  • Build commands are commands with group.kind: build:
    commands:
      - id: build-project
        exec:
          commandLine: JAVA_HOME=$JAVA_HOME_8 mvn clean install
          component: tools
          workingDir: "${PROJECT_SOURCE}"
          group:
            kind: build
  • Commands that do not have group.kind: build and do not have attributs.livenessProbe should be skipped

@l0rd in Apache Camel based on Spring Boot sample devfile we have build command without properties group: kind: build. Should we update it?
image

@l0rd
Copy link
Contributor

l0rd commented Jun 1, 2023

Should we update it?

Yes, I have created a PR

@ibuziuk
Copy link
Member

ibuziuk commented Aug 31, 2023

Create acceptance tests to go through all devfile samples and all editors using API

whereas testing all editors using API makes sense, not sure if we should cover all the devfiles from the internal registry given that in the short run, we are going to switch to the devfile.io. IMO, it would be progmatic to have the skeleton with an empty workspace test for the time being, and start adding to it devfiles from devfile.io e.g. UDI - https://registry.devfile.io/viewer/devfiles/community/udi

@l0rd wdyt?

@musienko-maxim
Copy link
Contributor

So, I brought up the test code to the actual state. Locally, the test ran successfully. But on the GitHub infra, I got problems with the limitations of VM, which is provided on the GitHub side. I think we can close this issue and make decisions for alternative solutions:
The example of the job here: https://github.com/devfile/developer-images/actions/runs/6981551741/job/18998924174?pr=114
Potential solutions:

  • Extend the GitHub workflow instance
  • Run tests on alternative infrastructures (OpenShift CI, PSI, other)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qe area/quality-tiers kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P1 Has a major impact to usage or development of the system. status/in-progress This issue has been taken by an engineer and is under active development.
Projects
None yet
Development

No branches or pull requests

6 participants