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

Write ControllerRevision Lifecycle Test +7 #107939

Closed
1 of 6 tasks
Riaankl opened this issue Feb 3, 2022 · 3 comments
Closed
1 of 6 tasks

Write ControllerRevision Lifecycle Test +7 #107939

Riaankl opened this issue Feb 3, 2022 · 3 comments
Labels
area/conformance Issues or PRs related to kubernetes conformance tests lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/testing Categorizes an issue or PR as relevant to SIG Testing. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@Riaankl
Copy link
Contributor

Riaankl commented Feb 3, 2022

Progress [1/6]

Identifying an untested feature Using APISnoop

According to this APIsnoop query, there are still some remaining Controller Revision endpoints which are untested.

    SELECT
      endpoint,
      path,
      kind
      FROM testing.untested_stable_endpoint
      where eligible is true
      and endpoint ilike '%ControllerRevision%'
      order by kind, endpoint desc
      limit 10;
                        endpoint                      |                              path                               |        kind
  ----------------------------------------------------+-----------------------------------------------------------------+--------------------
   replaceAppsV1NamespacedControllerRevision          | /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name} | ControllerRevision
   readAppsV1NamespacedControllerRevision             | /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name} | ControllerRevision
   patchAppsV1NamespacedControllerRevision            | /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name} | ControllerRevision
   listAppsV1ControllerRevisionForAllNamespaces       | /apis/apps/v1/controllerrevisions                               | ControllerRevision
   deleteAppsV1NamespacedControllerRevision           | /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name} | ControllerRevision
   deleteAppsV1CollectionNamespacedControllerRevision | /apis/apps/v1/namespaces/{namespace}/controllerrevisions        | ControllerRevision
   createAppsV1NamespacedControllerRevision           | /apis/apps/v1/namespaces/{namespace}/controllerrevisions        | ControllerRevision
  (7 rows)

API Reference and feature documentation

Research

Diary notes: Conformance testing Controller Revision endpoints

The mock test

Test outline (WIP)

Note: The outline covers the following endpoints only; listAppsV1ControllerRevisionForAllNamespaces, readAppsV1NamespacedControllerRevision

Feature: Test all current untested Controller Revision endpoints

Scenario: the test lists controller revisions in all namespaces
  Given the e2e test has as a running daemonset
  When the test requests all controller revisions by a label selector in all namespaces
  Then the test must receive a list controller revisions that is not nil

Scenario: the test reads a controller revision
  Given the e2e test has a list of controller revisions
  When the test reads a controller revision
  Then the test must return a controller revision that matches the controller revision for the running daemonset which is not nil

Test the functionality in Go

Exploratory e2e test code: ii/kubernetes…/apps/controllerrevision.go

Verifying increase in coverage with APISnoop

Listing endpoints hit by the new e2e test

This query shows the following endpoints are hit within a short period of running this e2e test

select distinct  endpoint, right(useragent,58) AS useragent
from testing.audit_event
where endpoint ilike '%ControllerRevision%'
and release_date::BIGINT > round(((EXTRACT(EPOCH FROM NOW()))::numeric)*1000,0) - 60000
and useragent like 'e2e%should%'
order by endpoint
limit 10;
                   endpoint                   |                         useragent
----------------------------------------------+------------------------------------------------------------
 listAppsV1ControllerRevisionForAllNamespaces | [Serial] should test the lifecycle of a ControllerRevision
 readAppsV1NamespacedControllerRevision       | [Serial] should test the lifecycle of a ControllerRevision
(2 rows)

Final notes

If a test with these calls gets merged, test coverage will go up by x points

This test is also created with the goal of conformance promotion.


/sig testing
/sig architecture
/area conformance

@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. area/conformance Issues or PRs related to kubernetes conformance tests needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 3, 2022
@Riaankl
Copy link
Contributor Author

Riaankl commented Feb 3, 2022

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Feb 3, 2022
@Riaankl Riaankl added this to In Progress /Active Issues in conformance-definition Feb 3, 2022
@Riaankl Riaankl moved this from In Progress /Active Issues to Sorted Backlog / On hold Issues in conformance-definition Apr 26, 2022
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 4, 2022
@Riaankl
Copy link
Contributor Author

Riaankl commented May 19, 2022

/close
Replaced by #110121

@Riaankl Riaankl closed this as completed May 19, 2022
conformance-definition automation moved this from Sorted Backlog / On hold Issues to Done May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/conformance Issues or PRs related to kubernetes conformance tests lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/testing Categorizes an issue or PR as relevant to SIG Testing. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Development

No branches or pull requests

3 participants