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

[metrics] Dependency resolution metrics #1657

Conversation

anik120
Copy link
Contributor

@anik120 anik120 commented Jul 20, 2020

Description of the change:

This PR introduces two histrogram metrics to help in analysing the
time taken by dependency resolution requests.

Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 20, 2020
pkg/controller/registry/resolver/resolver.go Outdated Show resolved Hide resolved
pkg/metrics/metrics.go Outdated Show resolved Hide resolved
Copy link
Member

@awgreene awgreene left a comment

Choose a reason for hiding this comment

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

Nice work, a few nits.

pkg/metrics/metrics.go Outdated Show resolved Hide resolved
pkg/metrics/metrics.go Outdated Show resolved Hide resolved
pkg/controller/registry/resolver/resolver.go Outdated Show resolved Hide resolved
@anik120 anik120 force-pushed the dependency-resolution-metrics branch 2 times, most recently from 83de9b0 to f075a5d Compare July 23, 2020 01:46
@anik120 anik120 changed the title WIP: [metrics] Dependency resolution metrics [metrics] Dependency resolution metrics Jul 23, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 23, 2020
@Bowenislandsong
Copy link
Member

This PR failed tests for 1 times with 0 individual failed tests and 119 skipped tests. A test is considered flaky if failed on multiple commits.

totaltestcount: 1
flaketestcount: 0
skippedtestcount: 119
flaketests: []
skippedtests:

  • classname: End-to-end
    name: 'Garbage collection for dependent resources when a bundle with a new configmap
    is installed when the subscription is updated to a later CSV with a configmap
    with a new name should have removed the old configmap and put the new configmap
    in place
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Fails if webhook intercepts Admission Webhook resources
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create requirements met API service'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Fails to install a CSV if multiple Webhooks share the same name
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog delete gRPC registry pod triggers recreation'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscriptions create required objects from Catalogs Given a Namespace
    when a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should install the operator
    successfully
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Package Manifest API lists available Operators from Catalog Sources Given
    a CatalogSource created using gRPC catalog source type when the display name
    for catalog source is updated should successfully update the CatalogSource
    field
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CRD Versions creates v1 CRDs with a v1 schema successfully'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV status invalid CSV'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscriptions create required objects from Catalogs Given a Namespace
    when a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should have created the expected
    prometheus objects
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update different deployment name'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Package Manifest API lists available Operators from Catalog Sources Given
    a CatalogSource created using gRPC catalog source type lists the CatalogSource
    contents using the PackageManifest API
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan creation with pre existing CRD owners PreExistingCRDOwnerIsReplaced'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan update catalog for subscription UpdatePreexistingCRDFailed'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV multiple API services on a single pod'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'User defined service account with no permission'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription with starting CSV'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog image update'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Is updated when the CAs expire
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group install mode support'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan update catalog for subscription AmplifyPermissions'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Can be installed and upgraded successfully
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan with CRD schema change Test all existing versions are present,
    different (backwards incompatible) schema
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group e2e functionality'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation with dependencies required and provided in different
    versions of an operator in the same package
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Scoped Client Test ServiceAccountHasPermission'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation using existing CSV'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Garbage collection for dependent resources when a bundle with configmap
    and secret objects is installed when the CSV is deleted OLM should delete
    the associated configmap and secret
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook Allows multiple installs of the same webhook'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update multiple version CRD'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group insufficient permissions resolve via service account removal'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with unmet requirements API service'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Fails if the webhooks intercepts all resources
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan with CSVs across multiple catalog sources'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with unmet requirements CRD'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Fails if the webhook intercepts OLM resources
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CRD Versions creates v1beta1 crds with a v1beta1 schema successfully'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with unmet permissions API service'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog config map replace triggers registry pod rollout'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Garbage collection for dependent resources Given a ClusterRole owned
    by a APIService when APIService is deleted should delete the associated ClusterRole
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription puppeting CatalogSource health status when the target catalog''s
    sourceType is unknown should surface catalog health
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator when a subscription to a package exists should automatically
    adopt components
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan creation with permissions'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Installing bundles with new object types when a bundle with a pdb, priorityclass,
    and VPA object is installed should create the additional bundle objects
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation in case of transferring providedAPIs'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group role aggregation'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV emits CSV requirement events'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription updates existing install plan'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan without an operatorgroup'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with unmet requirements native API'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group cleanup csvs with bad owner operator groups'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog delete internal registry pod triggers recreation'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'User defined service account with permission'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog gRPC address catalog source'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group CSV copy watching all namespaces'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription puppeting CatalogSource health status when the target catalog''s
    sourceType is internal and its spec is missing the configmap reference should
    surface catalog health
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription puppeting CatalogSource health status when the target catalog''s
    sourceType is grpc and its spec is missing the address and image fields should
    surface catalog health
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan unpacks bundle image'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription puppeting CatalogSource health status when the target catalog''s
    sourceType is configmap and its spec is missing the configmap reference should
    surface catalog health
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create requirements met CRD'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation manual approval'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription skip range'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Garbage collection for dependent resources Given a dependent resource
    associated with multiple owners when removing one of the owner using ''Foreground''
    deletion policy should not have deleted the dependent since ownerB CSV is
    still present
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Succeeds if the webhook intercepts non Admission Webhook resources in admissionregistration
    group
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create same CSV with owned API service multi namespace'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription can reconcile InstallPlan status'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group Given a set of Namespaces Associating these Namespaces
    with a label when an OperatorGroup is created having matching label selector
    defined OLM applies labels to Namespaces that are associated with an OperatorGroup
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update with owned API service'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group intersection'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Garbage collection for dependent resources when a bundle with a configmap
    is installed when the subscription is updated to a later CSV with a configmap
    with the same name but new data OLM should have upgraded associated configmap
    in place
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group Given a set of Namespaces when an OperatorGroup is created
    having above Namespaces defined under targetNamespaces field OLM applies labels
    to Namespaces that are associated with an OperatorGroup
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Package Manifest API lists available Operators from Catalog Sources Given
    a CatalogSource created using the ConfigMap as catalog source type retrieves
    the PackageManifest by package name and validates its fields
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Creates Webhooks scoped to a single namespace
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update multiple intermediates'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Package Manifest API lists available Operators from Catalog Sources Given
    a CatalogSource created using the ConfigMap as catalog source type gets the
    icon from the default channel
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update in place'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan with CRD schema change Test all existing versions are present,
    different (backwards compatible) schema
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Scoped Client Test ServiceAccountDoesNotHaveAnyPermission'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'User defined service account with retry'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog global update triggers subscription sync'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan CRD validation'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan update catalog for subscription AttenuatePermissions'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation if not installed'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription updates multiple intermediates'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CRD Versions allows a CRD upgrade that could have caused data loss'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with unmet permissions CRD'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation with pod config'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan update catalog for subscription UpdateSingleExistingCRDOwner'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group static provider'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan with CRD schema change Test existing version is present
    in new CRD (deprecated field)
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group insufficient permissions resolve via RBAC'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Metrics are generated for OLM managed resources Given an OperatorGroup
    that supports all namespaces when a CSV spec does not include Install Mode
    generates csv_abnormal metric for OLM pod
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Garbage collection for dependent resources Given a ClusterRole owned
    by a CustomResourceDefinition when CustomResourceDefinition is deleted should
    delete the associated ClusterRole
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV orphaned API service clean up'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator should surface components in its status'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with owned API service'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV API service resource not migrated if not adoptable'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan update catalog for subscription StopOnCSVModifications'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan with CRD schema change Test missing existing versions in
    new CRD
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan creation with pre existing CRD owners OnePreExistingCRDOwner'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog config map update triggers registry pod rollout'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group CleanupDeletedOperatorGroupLabels'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription puppeting CatalogSource health status when missing target
    catalog should surface the missing catalog
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV api service resource migrated if adoptable'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Package Manifest API lists available Operators from Catalog Sources Given
    a CatalogSource created using the ConfigMap as catalog source type lists PackageManifest
    and ensures it has valid PackageManifest item
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with unmet requirements mini kube version'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Garbage collection for dependent resources Given a dependent resource
    associated with multiple owners when removing both the owners using ''Foreground''
    deletion policy should have deleted the dependent since both the owners were
    deleted
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan with deprecated version CRD Test upgrade CRD with deprecated
    version
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group OperatorGroupLabels'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog loading between restarts'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a Global OperatorGroup The webhook
    is scoped to all namespaces
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Metrics are generated for OLM managed resources Given an OperatorGroup
    that supports all namespaces when a CSV spec does not include Install Mode
    when the failed CSV is deleted deletes its associated CSV metrics
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in an OperatorGroup that defines a
    selector The webhook is scoped to the selector
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update same deployment name'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CRD Versions blocks a CRD upgrade that could cause data loss'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation with dependencies'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog Dependency has correct replaces field'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update modify deployment name'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan consistent generation'
    counts: 1
    details: []
    meandurationsec: 0

@anik120 anik120 force-pushed the dependency-resolution-metrics branch from f075a5d to d87bd37 Compare July 23, 2020 02:29
@Bowenislandsong
Copy link
Member

This PR failed tests for 1 times with 0 individual failed tests and 119 skipped tests. A test is considered flaky if failed on multiple commits.

totaltestcount: 1
flaketestcount: 0
skippedtestcount: 119
flaketests: []
skippedtests:

  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Fails if the webhook intercepts OLM resources
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Garbage collection for dependent resources when a bundle with configmap
    and secret objects is installed when the CSV is deleted OLM should delete
    the associated configmap and secret
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription puppeting CatalogSource health status when the target catalog''s
    sourceType is internal and its spec is missing the configmap reference should
    surface catalog health
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription puppeting CatalogSource health status when the target catalog''s
    sourceType is unknown should surface catalog health
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription updates multiple intermediates'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with unmet requirements CRD'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group CSV copy watching all namespaces'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription can reconcile InstallPlan status'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog global update triggers subscription sync'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan update catalog for subscription StopOnCSVModifications'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscriptions create required objects from Catalogs Given a Namespace
    when a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should have created the expected
    prometheus objects
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Is updated when the CAs expire
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group insufficient permissions resolve via service account removal'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Metrics are generated for OLM managed resources Given an OperatorGroup
    that supports all namespaces when a CSV spec does not include Install Mode
    when the failed CSV is deleted deletes its associated CSV metrics
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan CRD validation'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator should surface components in its status'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update in place'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create requirements met CRD'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog loading between restarts'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV orphaned API service clean up'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog image update'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update with owned API service'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan creation with permissions'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscriptions create required objects from Catalogs Given a Namespace
    when a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should install the operator
    successfully
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Installing bundles with new object types when a bundle with a pdb, priorityclass,
    and VPA object is installed should create the additional bundle objects
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CRD Versions creates v1beta1 crds with a v1beta1 schema successfully'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation with dependencies'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan update catalog for subscription AmplifyPermissions'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Garbage collection for dependent resources when a bundle with a configmap
    is installed when the subscription is updated to a later CSV with a configmap
    with the same name but new data OLM should have upgraded associated configmap
    in place
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan with CRD schema change Test all existing versions are present,
    different (backwards incompatible) schema
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with unmet requirements native API'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Package Manifest API lists available Operators from Catalog Sources Given
    a CatalogSource created using the ConfigMap as catalog source type lists PackageManifest
    and ensures it has valid PackageManifest item
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with unmet permissions CRD'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group Given a set of Namespaces when an OperatorGroup is created
    having above Namespaces defined under targetNamespaces field OLM applies labels
    to Namespaces that are associated with an OperatorGroup
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group insufficient permissions resolve via RBAC'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation with dependencies required and provided in different
    versions of an operator in the same package
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription puppeting CatalogSource health status when missing target
    catalog should surface the missing catalog
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan with deprecated version CRD Test upgrade CRD with deprecated
    version
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group static provider'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator when a subscription to a package exists should automatically
    adopt components
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription puppeting CatalogSource health status when the target catalog''s
    sourceType is grpc and its spec is missing the address and image fields should
    surface catalog health
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group Given a set of Namespaces Associating these Namespaces
    with a label when an OperatorGroup is created having matching label selector
    defined OLM applies labels to Namespaces that are associated with an OperatorGroup
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Garbage collection for dependent resources Given a dependent resource
    associated with multiple owners when removing both the owners using ''Foreground''
    deletion policy should have deleted the dependent since both the owners were
    deleted
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan creation with pre existing CRD owners PreExistingCRDOwnerIsReplaced'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog config map update triggers registry pod rollout'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group CleanupDeletedOperatorGroupLabels'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Creates Webhooks scoped to a single namespace
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Package Manifest API lists available Operators from Catalog Sources Given
    a CatalogSource created using the ConfigMap as catalog source type retrieves
    the PackageManifest by package name and validates its fields
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV emits CSV requirement events'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with unmet permissions API service'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in an OperatorGroup that defines a
    selector The webhook is scoped to the selector
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group e2e functionality'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create same CSV with owned API service multi namespace'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook Allows multiple installs of the same webhook'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV API service resource not migrated if not adoptable'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'User defined service account with retry'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan with CRD schema change Test missing existing versions in
    new CRD
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV status invalid CSV'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan consistent generation'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan creation with pre existing CRD owners OnePreExistingCRDOwner'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group intersection'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription with starting CSV'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Scoped Client Test ServiceAccountDoesNotHaveAnyPermission'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog delete internal registry pod triggers recreation'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan with CRD schema change Test existing version is present
    in new CRD (deprecated field)
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group role aggregation'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group OperatorGroupLabels'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CRD Versions creates v1 CRDs with a v1 schema successfully'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog config map replace triggers registry pod rollout'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Package Manifest API lists available Operators from Catalog Sources Given
    a CatalogSource created using gRPC catalog source type lists the CatalogSource
    contents using the PackageManifest API
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update modify deployment name'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Garbage collection for dependent resources Given a ClusterRole owned
    by a APIService when APIService is deleted should delete the associated ClusterRole
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan update catalog for subscription AttenuatePermissions'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Fails to install a CSV if multiple Webhooks share the same name
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation using existing CSV'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'User defined service account with no permission'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Package Manifest API lists available Operators from Catalog Sources Given
    a CatalogSource created using gRPC catalog source type when the display name
    for catalog source is updated should successfully update the CatalogSource
    field
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription skip range'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription puppeting CatalogSource health status when the target catalog''s
    sourceType is configmap and its spec is missing the configmap reference should
    surface catalog health
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Fails if webhook intercepts Admission Webhook resources
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update different deployment name'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CRD Versions allows a CRD upgrade that could have caused data loss'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with unmet requirements mini kube version'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update multiple intermediates'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan update catalog for subscription UpdateSingleExistingCRDOwner'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Fails if the webhooks intercepts all resources
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a Global OperatorGroup The webhook
    is scoped to all namespaces
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update same deployment name'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Succeeds if the webhook intercepts non Admission Webhook resources in admissionregistration
    group
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with owned API service'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Package Manifest API lists available Operators from Catalog Sources Given
    a CatalogSource created using the ConfigMap as catalog source type gets the
    icon from the default channel
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group install mode support'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation manual approval'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'User defined service account with permission'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation if not installed'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan without an operatorgroup'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan update catalog for subscription UpdatePreexistingCRDFailed'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog Dependency has correct replaces field'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CRD Versions blocks a CRD upgrade that could cause data loss'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Operator Group cleanup csvs with bad owner operator groups'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription updates existing install plan'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation with pod config'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan with CRD schema change Test all existing versions are present,
    different (backwards compatible) schema
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Garbage collection for dependent resources when a bundle with a new configmap
    is installed when the subscription is updated to a later CSV with a configmap
    with a new name should have removed the old configmap and put the new configmap
    in place
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV multiple API services on a single pod'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Subscription creation in case of transferring providedAPIs'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Scoped Client Test ServiceAccountHasPermission'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog gRPC address catalog source'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV update multiple version CRD'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Garbage collection for dependent resources Given a dependent resource
    associated with multiple owners when removing one of the owner using ''Foreground''
    deletion policy should not have deleted the dependent since ownerB CSV is
    still present
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSVs with a Webhook when Installed in a SingleNamespace OperatorGroup
    Can be installed and upgraded successfully
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Metrics are generated for OLM managed resources Given an OperatorGroup
    that supports all namespaces when a CSV spec does not include Install Mode
    generates csv_abnormal metric for OLM pod
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create requirements met API service'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Catalog delete gRPC registry pod triggers recreation'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Garbage collection for dependent resources Given a ClusterRole owned
    by a CustomResourceDefinition when CustomResourceDefinition is deleted should
    delete the associated ClusterRole
    '
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan unpacks bundle image'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'Install Plan with CSVs across multiple catalog sources'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV create with unmet requirements API service'
    counts: 1
    details: []
    meandurationsec: 0
  • classname: End-to-end
    name: 'CSV api service resource migrated if adoptable'
    counts: 1
    details: []
    meandurationsec: 0

@anik120 anik120 force-pushed the dependency-resolution-metrics branch from d87bd37 to 8952043 Compare July 23, 2020 03:46
@Bowenislandsong
Copy link
Member

This PR failed tests for 1 times with 1 individual failed tests and 4 skipped tests. A test is considered flaky if failed on multiple commits.

totaltestcount: 1
flaketestcount: 1
skippedtestcount: 4
flaketests:

  • classname: End-to-end
    name: 'CSV multiple API services on a single pod'
    counts: 1
    details:
    • count: 1
      error: |4-

      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/test/e2e/csv_e2e_test.go:3035
      
      	Error Trace:	csv_e2e_test.go:3145
      	            				runner.go:113
      	            				runner.go:64
      	            				it_node.go:26
      	            				spec.go:215
      	            				spec.go:138
      	            				spec_runner.go:200
      	            				spec_runner.go:170
      	            				spec_runner.go:66
      	            				suite.go:62
      	            				ginkgo_dsl.go:226
      	            				ginkgo_dsl.go:214
      	            				e2e_test.go:54
      	Error:      	Received unexpected error:
      	            	etcdserver: request timed out
      
      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/vendor/github.com/stretchr/testify/require/require.go:1005
      
    meandurationsec: 19.782122
    skippedtests:
  • classname: End-to-end
    name: 'Catalog image update'
    counts: 1
    details: []
    meandurationsec: 0.023263
  • classname: End-to-end
    name: 'Subscription updates existing install plan'
    counts: 1
    details: []
    meandurationsec: 0.031612
  • classname: End-to-end
    name: 'Subscriptions create required objects from Catalogs Given a Namespace
    when a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should have created the expected
    prometheus objects
    '
    counts: 1
    details: []
    meandurationsec: 2.146465
  • classname: End-to-end
    name: 'Subscriptions create required objects from Catalogs Given a Namespace
    when a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should install the operator
    successfully
    '
    counts: 1
    details: []
    meandurationsec: 2.519704

Copy link
Member

@awgreene awgreene left a comment

Choose a reason for hiding this comment

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

Awesome work @anik120 - a few nits and design suggestions.

pkg/controller/registry/resolver/instrumented_resolver.go Outdated Show resolved Hide resolved
pkg/controller/registry/resolver/resolver.go Outdated Show resolved Hide resolved
pkg/controller/registry/resolver/instrumented_resolver.go Outdated Show resolved Hide resolved
Comment on lines 131 to 133
res := resolver.NewOperatorsV1alpha1Resolver(lister, crClient, opClient.KubernetesInterface())
success := metrics.RegisterDependencyResolutionSuccess
failure := metrics.RegisterDependencyResolutionFailure
Copy link
Contributor

Choose a reason for hiding this comment

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

My preference would be to inline these on L144 so that readers don't need to jump around to find out what these parameters are, but that's a nit and I can agree to disagree.

Copy link
Member

Choose a reason for hiding this comment

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

I think Ben's suggestion would make this clearer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@benluddy @awgreene the reason I chose not to go inline was coz then that line reads as
resolver: resolver.NewInstrumentedResolver(resolver: resolver.NewInstrumentedResolver(operatorV1alpha1Resolver, successMetricsEmitter, failureMetricsEmitter),, metrics.RegisterDependencyResolutionSuccess, metrics.RegisterDependencyResolutionFailure),

which goes way beyond the 120 character vertical ruler I keep for myself.

I am changing the variable names to operatorsV1alpha1Resolver successMetricsEmitter and failureMetricsEmitter to have the reader hopefully not jump around too much. Let me know if that looks good once I've pushed those changes.

@@ -269,3 +286,11 @@ func UpdateSubsSyncCounterStorage(sub *olmv1alpha1.Subscription) {
counterValues.channel = sub.Spec.Channel
}
}

func RegisterDependencyResolutionSuccess(time *float64) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is the argument a pointer? Can it be a time.Duration value instead? Converting to float64 and throwing away type information at the measurement site seems premature.

Copy link
Contributor Author

@anik120 anik120 Jul 23, 2020

Choose a reason for hiding this comment

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

@benluddy I had this argument as just float64 to begin with, but switched over to a pointer when I realized implementing a fake metricEmitter func will be easier if I can modify a value in place.

Converting to float64 and throwing away type information at the measurement site seems premature.

My argument against that is that for this particular function, RegisterDependencyResolutionSuccess that registers a value for a summary, we will only ever need a float64 coz the function Observe only takes a float64

Copy link
Contributor

Choose a reason for hiding this comment

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

The contract of the function is to record a metric corresponding to the duration of a dependency resolution success. Why does the caller of this function need to adapt the input to the Prometheus client? If the underlying metrics reporter were to be swapped out with a client that expects a different value type, this function's signature should not need to change.

@@ -170,6 +170,21 @@ var (
[]string{NAMESPACE_LABEL, NAME_LABEL, VERSION_LABEL, PHASE_LABEL, REASON_LABEL},
)

dependencyResolutionSucceeded = prometheus.NewSummary(
prometheus.SummaryOpts{
Name: "dependency_resolution_succeeded",
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be good to at least include the unit suffix in the name (https://prometheus.io/docs/practices/naming/#metric-names).

Copy link
Member

@awgreene awgreene Jul 23, 2020

Choose a reason for hiding this comment

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

We may also want to consider that these metrics will be available on telemeter - it's somewhat difficult to know if this metric is an "OLM Metric" based on this name. We had questions on slack regarding if OLM has any operator metrics because the existing metrics didn't make it clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we were to incorporate both points, olm_dependency_metrics_succeeded_summary is the name coming to my mind. Isn't that a tad bit long?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would pick something like olm_resolution_duration_seconds.

@@ -194,6 +209,8 @@ func RegisterCatalog() {
prometheus.MustRegister(subscriptionCount)
prometheus.MustRegister(catalogSourceCount)
prometheus.MustRegister(SubscriptionSyncCount)
prometheus.MustRegister(dependencyResolutionSucceeded)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can success/failure be two values for a single label instead of having two completely separate metrics?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@benluddy if we want two separate percentile brackets for the two scenarios, I think have two separate metrics is cleaner.
At the server side we can register values into individual metrics cleanly, and at the client side (whatever visualization tool we use) we can separately query for the metrics without jumping too many hoops.

Copy link
Contributor

Choose a reason for hiding this comment

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

Each combination of label values gets its own time series. They're designed to be queried this way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@benluddy changed it to SummaryVec that allows labels.

pkg/controller/registry/resolver/instrumented_resolver.go Outdated Show resolved Hide resolved
@Bowenislandsong
Copy link
Member

This PR failed tests for 1 times with 1 individual failed tests and 4 skipped tests. A test is considered flaky if failed on multiple commits.

totaltestcount: 1
flaketestcount: 1
skippedtestcount: 4
flaketests:

  • classname: End-to-end
    name: 'Subscription creation using existing CSV'
    counts: 1
    details:
    • count: 1
      error: |4-

      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/test/e2e/subscription_e2e_test.go:70
      
      	Error Trace:	subscription_e2e_test.go:77
      	            				runner.go:113
      	            				runner.go:64
      	            				it_node.go:26
      	            				spec.go:215
      	            				spec.go:138
      	            				spec_runner.go:200
      	            				spec_runner.go:170
      	            				spec_runner.go:66
      	            				suite.go:62
      	            				ginkgo_dsl.go:226
      	            				ginkgo_dsl.go:214
      	            				e2e_test.go:54
      	Error:      	Received unexpected error:
      	            	E2E bug detected: configmaps "mock-ocs" already exists
      
      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/vendor/github.com/stretchr/testify/require/require.go:1005
      
    meandurationsec: 0.041819
    skippedtests:
  • classname: End-to-end
    name: 'Subscription updates existing install plan'
    counts: 1
    details: []
    meandurationsec: 0.017674
  • classname: End-to-end
    name: 'Subscriptions create required objects from Catalogs Given a Namespace
    when a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should have created the expected
    prometheus objects
    '
    counts: 1
    details: []
    meandurationsec: 2.211309
  • classname: End-to-end
    name: 'Subscriptions create required objects from Catalogs Given a Namespace
    when a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should install the operator
    successfully
    '
    counts: 1
    details: []
    meandurationsec: 2.220867
  • classname: End-to-end
    name: 'Catalog image update'
    counts: 1
    details: []
    meandurationsec: 0.031973

@dinhxuanvu dinhxuanvu added the area/dependency Issues or PRs related to dependency changes label Jul 23, 2020
@anik120 anik120 force-pushed the dependency-resolution-metrics branch from 8952043 to cc35135 Compare July 23, 2020 20:59
@Bowenislandsong
Copy link
Member

This PR failed tests for 1 times with 2 individual failed tests and 4 skipped tests. A test is considered flaky if failed on multiple commits.

totaltestcount: 1
flaketestcount: 2
skippedtestcount: 4
flaketests:

  • classname: End-to-end
    name: 'Catalog Dependency has correct replaces field'
    counts: 1
    details:
    • count: 1
      error: |4-

      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/test/e2e/catalog_e2e_test.go:950
      
      	Error Trace:	catalog_e2e_test.go:1037
      	            				runner.go:113
      	            				runner.go:64
      	            				it_node.go:26
      	            				spec.go:215
      	            				spec.go:138
      	            				spec_runner.go:200
      	            				spec_runner.go:170
      	            				spec_runner.go:66
      	            				suite.go:62
      	            				ginkgo_dsl.go:226
      	            				ginkgo_dsl.go:214
      	            				e2e_test.go:54
      	Error:      	Received unexpected error:
      	            	etcdserver: request timed out
      
      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/vendor/github.com/stretchr/testify/require/require.go:1005
      
    meandurationsec: 112.103157
  • classname: End-to-end
    name: 'Install Plan creation with pre existing CRD owners PreExistingCRDOwnerIsReplaced'
    counts: 1
    details:
    • count: 1
      error: |4-

      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/test/e2e/installplan_e2e_test.go:335
      
      	Error Trace:	installplan_e2e_test.go:458
      	            				runner.go:113
      	            				runner.go:64
      	            				it_node.go:26
      	            				spec.go:215
      	            				spec.go:138
      	            				spec_runner.go:200
      	            				spec_runner.go:170
      	            				spec_runner.go:66
      	            				suite.go:62
      	            				ginkgo_dsl.go:226
      	            				ginkgo_dsl.go:214
      	            				e2e_test.go:54
      	Error:      	Received unexpected error:
      	            	installplans.operators.coreos.com "install-sknsw" not found
      
      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/vendor/github.com/stretchr/testify/require/require.go:1005
      
    meandurationsec: 57.391658
    skippedtests:
  • classname: End-to-end
    name: 'Subscription updates existing install plan'
    counts: 1
    details: []
    meandurationsec: 0.018959
  • classname: End-to-end
    name: 'Subscriptions create required objects from Catalogs Given a Namespace
    when a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should install the operator
    successfully
    '
    counts: 1
    details: []
    meandurationsec: 1.496486
  • classname: End-to-end
    name: 'Catalog image update'
    counts: 1
    details: []
    meandurationsec: 0.029796
  • classname: End-to-end
    name: 'Subscriptions create required objects from Catalogs Given a Namespace
    when a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should have created the expected
    prometheus objects
    '
    counts: 1
    details: []
    meandurationsec: 2.268787

@anik120
Copy link
Contributor Author

anik120 commented Jul 24, 2020

/test e2e-aws-console-olm

@anik120 anik120 force-pushed the dependency-resolution-metrics branch from cc35135 to f8fda06 Compare July 24, 2020 01:02
@Bowenislandsong
Copy link
Member

This PR failed tests for 1 times with 2 individual failed tests and 4 skipped tests. A test is considered flaky if failed on multiple commits.

totaltestcount: 1
flaketestcount: 2
skippedtestcount: 4
flaketests:

  • classname: End-to-end
    name: 'Subscription creation manual approval'
    counts: 1
    details:
    • count: 1
      error: |4-

      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/test/e2e/subscription_e2e_test.go:178
      
      	Error Trace:	subscription_e2e_test.go:185
      	            				runner.go:113
      	            				runner.go:64
      	            				it_node.go:26
      	            				spec.go:215
      	            				spec.go:138
      	            				spec_runner.go:200
      	            				spec_runner.go:170
      	            				spec_runner.go:66
      	            				suite.go:62
      	            				ginkgo_dsl.go:226
      	            				ginkgo_dsl.go:214
      	            				e2e_test.go:54
      	Error:      	Received unexpected error:
      	            	E2E bug detected: configmaps "mock-ocs" already exists
      
      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/vendor/github.com/stretchr/testify/require/require.go:1005
      
    meandurationsec: 0.052528
  • classname: End-to-end
    name: 'CSV create requirements met API service'
    counts: 1
    details:
    • count: 1
      error: |4-

      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/test/e2e/csv_e2e_test.go:718
      
      	Error Trace:	csv_e2e_test.go:872
      	            				runner.go:113
      	            				runner.go:64
      	            				it_node.go:26
      	            				spec.go:215
      	            				spec.go:138
      	            				spec_runner.go:200
      	            				spec_runner.go:170
      	            				spec_runner.go:66
      	            				suite.go:62
      	            				ginkgo_dsl.go:226
      	            				ginkgo_dsl.go:214
      	            				e2e_test.go:54
      	Error:      	Received unexpected error:
      	            	timed out waiting for the condition
      
      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/vendor/github.com/stretchr/testify/require/require.go:1005
      
    meandurationsec: 301.106535
    skippedtests:
  • classname: End-to-end
    name: 'Subscriptions create required objects from Catalogs Given a Namespace
    when a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should have created the expected
    prometheus objects
    '
    counts: 1
    details: []
    meandurationsec: 1.122406
  • classname: End-to-end
    name: 'Catalog image update'
    counts: 1
    details: []
    meandurationsec: 0.022009
  • classname: End-to-end
    name: 'Subscription updates existing install plan'
    counts: 1
    details: []
    meandurationsec: 0.021967
  • classname: End-to-end
    name: 'Subscriptions create required objects from Catalogs Given a Namespace
    when a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should install the operator
    successfully
    '
    counts: 1
    details: []
    meandurationsec: 2.072566

@anik120 anik120 force-pushed the dependency-resolution-metrics branch from f8fda06 to 47e52d4 Compare July 24, 2020 20:09
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 24, 2020
@anik120 anik120 force-pushed the dependency-resolution-metrics branch from 47e52d4 to 9b025fa Compare July 24, 2020 20:20
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 24, 2020
@anik120
Copy link
Contributor Author

anik120 commented Jul 24, 2020

@benluddy updated the PR, PTAL. Thanks!

@anik120
Copy link
Contributor Author

anik120 commented Jul 27, 2020

/test e2e-gcp-upgrade

Copy link
Member

@awgreene awgreene left a comment

Choose a reason for hiding this comment

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

Only had super minor nits, nice work.

}

func TestInstrumentedResolver(t *testing.T) {

Copy link
Member

Choose a reason for hiding this comment

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

nit: Please remove the newline

pkg/metrics/metrics.go Outdated Show resolved Hide resolved
Copy link
Contributor

@benluddy benluddy left a comment

Choose a reason for hiding this comment

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

Looking good. I only had a few minor comments.

pkg/metrics/metrics.go Outdated Show resolved Hide resolved
pkg/metrics/metrics.go Outdated Show resolved Hide resolved
This PR introduces two histogram metrics to help in analysing the
time taken by dependency resolution requests.
@anik120 anik120 force-pushed the dependency-resolution-metrics branch from 9b025fa to 1db2017 Compare July 27, 2020 20:31
@benluddy
Copy link
Contributor

/approve

👍

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 27, 2020
Copy link
Member

@awgreene awgreene left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 27, 2020
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: anik120, awgreene, benluddy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

7 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 6405f0e into operator-framework:master Jul 28, 2020
@awgreene
Copy link
Member

awgreene commented Jul 29, 2020

Tagging @openshift/openshift-team-monitoring to review the new metric we plan to expose. If you have any complains, please let us know and we will update the metric.

@awgreene
Copy link
Member

@smarterclayton OLM would like to add this metric to Telemeter, can you please review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/dependency Issues or PRs related to dependency changes lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants