Skip to content

Conversation

estroz
Copy link
Member

@estroz estroz commented May 18, 2020

Description of the change:

  • internal/scorecard/alpha,images/scorecard-test: use bundle labels in pod runner, from image or directory if no image is available
  • internal/util/registry: operator-registry utilities, mainly label
    helpers

Motivation for the change: the scorecard should not assume paths within a bundle image, instead it should rely on image labels if available. These changes also help implement the functionality discussed in operator-framework/enhancements#18.

/cc @jmccormick2001

/kind feature

@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label May 18, 2020
@estroz estroz force-pushed the feature/scorecard-use-labels branch from 43d1234 to bd607cc Compare May 18, 2020 18:53
@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 24, 2020
@estroz estroz force-pushed the feature/scorecard-use-labels branch from bd607cc to 01a9bac Compare June 10, 2020 19:32
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 10, 2020
@estroz estroz force-pushed the feature/scorecard-use-labels branch from 01a9bac to d34aedb Compare June 10, 2020 19:39
@estroz
Copy link
Member Author

estroz commented Jun 10, 2020

@jmccormick2001 once operator-framework/enhancements#18 is merged you can get the scorecard config path using image labels.

@estroz estroz force-pushed the feature/scorecard-use-labels branch from d34aedb to b3eb47d Compare June 10, 2020 20:10
@estroz estroz force-pushed the feature/scorecard-use-labels branch from b3eb47d to f40aa1b Compare July 6, 2020 22:53
@estroz estroz force-pushed the feature/scorecard-use-labels branch 2 times, most recently from ae9b976 to eb6b2ba Compare July 7, 2020 15:34
@estroz estroz added this to the v0.19.0 milestone Jul 7, 2020
Copy link
Member

@varshaprasad96 varshaprasad96 left a comment

Choose a reason for hiding this comment

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

/lgtm. Tested this out and works fine.

@jmccormick2001
Copy link
Contributor

needs labels/annotations.yaml fixed as discussed offline yesterday.

@estroz estroz force-pushed the feature/scorecard-use-labels branch from eb6b2ba to 70a7a2a Compare July 8, 2020 18:25
@estroz
Copy link
Member Author

estroz commented Jul 8, 2020

@jmccormick2001 @varshaprasad96 fixed. The error came from not using the correct YAML library and labels not being set in the test case.

@estroz estroz force-pushed the feature/scorecard-use-labels branch from 70a7a2a to a3ae768 Compare July 8, 2020 18:42
bundle directory if no image is available

internal/util/registry: operator-registry utilities, mainly label
helpers
@estroz estroz force-pushed the feature/scorecard-use-labels branch from a3ae768 to 3b6cdf0 Compare July 8, 2020 19:51
@estroz estroz merged commit bd8520c into operator-framework:master Jul 8, 2020
@estroz estroz deleted the feature/scorecard-use-labels branch July 8, 2020 21:18
estroz added a commit to estroz/operator-sdk that referenced this pull request Jul 16, 2020
…ch use image labels

as the source of truth for bundle metadata if a bundle image is supplied
to `scorecard`. The SDK should consider the metadata directory to contain
sources of truth for bundle metadata; image labels are informative only.

cmd/operator-sdk/scorecard: always use on-disk metadata

images/scorecard-test/cmd/test: look up metadata using FindBundleMetadata

internal/registry: remove metadata lookup functions in favor of api
library functions

internal/scorecard: remove 'labels' directory functionality, which is no
longer needed now that metadata is always looked up recursively
estroz added a commit to estroz/operator-sdk that referenced this pull request Jul 17, 2020
…ch use image labels

as the source of truth for bundle metadata if a bundle image is supplied
to `scorecard`. The SDK should consider the metadata directory to contain
sources of truth for bundle metadata; image labels are informative only.

cmd/operator-sdk/scorecard: always use on-disk metadata

images/scorecard-test/cmd/test: look up metadata using FindBundleMetadata

internal/registry: rewrite metadata lookup functions as FindBundleMetadata,
which recursively searches for a file matching the annotations.yaml spec
then returns that metadata and its path

internal/scorecard: remove 'labels' directory functionality, which is no
longer needed now that metadata is always looked up recursively
estroz added a commit to estroz/operator-sdk that referenced this pull request Jul 17, 2020
…ch use image labels

as the source of truth for bundle metadata if a bundle image is supplied
to `scorecard`. The SDK should consider the metadata directory to contain
sources of truth for bundle metadata; image labels are informative only.

cmd/operator-sdk/scorecard: always use on-disk metadata

images/scorecard-test/cmd/test: look up metadata using FindBundleMetadata

internal/registry: rewrite metadata lookup functions as FindBundleMetadata,
which recursively searches for a file matching the annotations.yaml spec
then returns that metadata and its path

internal/scorecard: remove 'labels' directory functionality, which is no
longer needed now that metadata is always looked up recursively
estroz added a commit to estroz/operator-sdk that referenced this pull request Jul 17, 2020
…ch use image labels

as the source of truth for bundle metadata if a bundle image is supplied
to `scorecard`. The SDK should consider the metadata directory to contain
sources of truth for bundle metadata; image labels are informative only.

cmd/operator-sdk/scorecard: always use on-disk metadata

images/scorecard-test/cmd/test: look up metadata using FindBundleMetadata

internal/registry: rewrite metadata lookup functions as FindBundleMetadata,
which recursively searches for a file matching the annotations.yaml spec
then returns that metadata and its path

internal/scorecard: remove 'labels' directory functionality, which is no
longer needed now that metadata is always looked up recursively
estroz added a commit to estroz/operator-sdk that referenced this pull request Jul 17, 2020
…ch use image labels

as the source of truth for bundle metadata if a bundle image is supplied
to `scorecard`. The SDK should consider the metadata directory to contain
sources of truth for bundle metadata; image labels are informative only.

cmd/operator-sdk/scorecard: always use on-disk metadata

images/scorecard-test/cmd/test: look up metadata using FindBundleMetadata

internal/registry: rewrite metadata lookup functions as FindBundleMetadata,
which recursively searches for a file matching the annotations.yaml spec
then returns that metadata and its path

internal/scorecard: remove 'labels' directory functionality, which is no
longer needed now that metadata is always looked up recursively
estroz added a commit to estroz/operator-sdk that referenced this pull request Jul 17, 2020
…ch use image labels

as the source of truth for bundle metadata if a bundle image is supplied
to `scorecard`. The SDK should consider the metadata directory to contain
sources of truth for bundle metadata; image labels are informative only.

cmd/operator-sdk/scorecard: always use on-disk metadata

images/scorecard-test/cmd/test: look up metadata using FindBundleMetadata

internal/registry: rewrite metadata lookup functions as FindBundleMetadata,
which recursively searches for a file matching the annotations.yaml spec
then returns that metadata and its path

internal/scorecard: remove 'labels' directory functionality, which is no
longer needed now that metadata is always looked up recursively
estroz added a commit to estroz/operator-sdk that referenced this pull request Jul 17, 2020
…ch use image labels

as the source of truth for bundle metadata if a bundle image is supplied
to `scorecard`. The SDK should consider the metadata directory to contain
sources of truth for bundle metadata; image labels are informative only.

cmd/operator-sdk/scorecard: always use on-disk metadata

images/scorecard-test/cmd/test: look up metadata using FindBundleMetadata

internal/registry: rewrite metadata lookup functions as FindBundleMetadata,
which recursively searches for a file matching the annotations.yaml spec
then returns that metadata and its path

internal/scorecard: remove 'labels' directory functionality, which is no
longer needed now that metadata is always looked up recursively
estroz added a commit to estroz/operator-sdk that referenced this pull request Jul 20, 2020
…ch use image labels

as the source of truth for bundle metadata if a bundle image is supplied
to `scorecard`. The SDK should consider the metadata directory to contain
sources of truth for bundle metadata; image labels are informative only.

cmd/operator-sdk/scorecard: always use on-disk metadata

images/scorecard-test/cmd/test: look up metadata using FindBundleMetadata

internal/registry: rewrite metadata lookup functions as FindBundleMetadata,
which recursively searches for a file matching the annotations.yaml spec
then returns that metadata and its path

internal/scorecard: remove 'labels' directory functionality, which is no
longer needed now that metadata is always looked up recursively
estroz added a commit to estroz/operator-sdk that referenced this pull request Jul 20, 2020
…ch use image labels

as the source of truth for bundle metadata if a bundle image is supplied
to `scorecard`. The SDK should consider the metadata directory to contain
sources of truth for bundle metadata; image labels are informative only.

cmd/operator-sdk/scorecard: always use on-disk metadata

images/scorecard-test/cmd/test: look up metadata using FindBundleMetadata

internal/registry: rewrite metadata lookup functions as FindBundleMetadata,
which recursively searches for a file matching the annotations.yaml spec
then returns that metadata and its path

internal/scorecard: remove 'labels' directory functionality, which is no
longer needed now that metadata is always looked up recursively
estroz pushed a commit that referenced this pull request Jul 20, 2020
#3450)

This commit reverts some changes made in #3062, which use image labels 
as the source of truth for bundle metadata if a bundle image is supplied
to `scorecard`. The SDK should consider the metadata directory to contain
sources of truth for bundle metadata; image labels are informative only.

cmd/operator-sdk/scorecard: always use on-disk metadata

images/scorecard-test/cmd/test: look up metadata using FindBundleMetadata

internal/registry: rewrite metadata lookup functions as FindBundleMetadata,
which recursively searches for a file matching the annotations.yaml spec
then returns that metadata and its path

internal/scorecard: remove 'labels' directory functionality, which is no
longer needed now that metadata is always looked up recursively
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/feature Categorizes issue or PR as related to a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants