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

MGMT-10197: Adds ENABLE_ORG_BASED_FEATURE_GATES #3727

Conversation

nmagnezi
Copy link
Contributor

@nmagnezi nmagnezi commented Apr 28, 2022

Some features might be of interest to partners or early adopters.
Other features might not be ready for public consumption: tech-preview or an internal-only functionality.

This change adds a method to the authorization middleware for asserting a particular capability against the user's organization-assigned capabilities.

This change also includes an implementation related to ARM-based CPU architecture capability of (via the above-mentioned method) with the following APIs:

  • V2RegisterCluster
  • RegisterInfraEnv

Note that V2ListSupportedOpenshiftVersions is also relevant here and will be included in a follow-up change.

Find additional information in the feature enablement enhancement doc: #3744

List all the issues related to this PR

  • New Feature
  • Enhancement
  • Bug fix
  • Tests
  • Documentation
  • CI/CD

What environments does this code impact?

  • Automation (CI, tools, etc)
  • Cloud
  • Operator Managed Deployments
  • None

How was this code tested?

  • assisted-test-infra environment
  • dev-scripts environment
  • Reviewer's test appreciated
  • Waiting for CI to do a full test run
  • Manual (Elaborate on how it was tested)
  • No tests needed

Assignees

/cc @
/cc @

Checklist

  • Title and description added to both, commit and PR.
  • Relevant issues have been associated (see CONTRIBUTING guide)
  • Reviewers have been listed
  • This change does not require a documentation update (docstring, docs, README, etc)
  • Does this change include unit-tests (note that code changes require unit-tests)

Reviewers Checklist

  • Are the title and description (in both PR and commit) meaningful and clear?
  • Is there a bug required (and linked) for this change?
  • Should this PR be backported?

Sorry, something went wrong.

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 28, 2022
@openshift-ci openshift-ci bot requested review from eliorerz and gamli75 April 28, 2022 10:23
@openshift-ci
Copy link

openshift-ci bot commented Apr 28, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nmagnezi

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 28, 2022
@codecov
Copy link

codecov bot commented Apr 28, 2022

Codecov Report

Merging #3727 (96e4091) into master (96765ee) will decrease coverage by 0.07%.
The diff coverage is 28.26%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3727      +/-   ##
==========================================
- Coverage   66.30%   66.23%   -0.08%     
==========================================
  Files         178      179       +1     
  Lines       24835    24872      +37     
==========================================
+ Hits        16467    16474       +7     
- Misses       6845     6876      +31     
+ Partials     1523     1522       -1     
Impacted Files Coverage Δ
internal/common/common.go 25.00% <ø> (ø)
pkg/auth/auth_handler_test_utils.go 77.77% <0.00%> (ø)
pkg/auth/authenticator.go 100.00% <ø> (ø)
pkg/auth/authz.go 100.00% <ø> (ø)
pkg/auth/authz_utils.go 0.00% <0.00%> (ø)
pkg/auth/local_authenticator.go 49.33% <0.00%> (-1.36%) ⬇️
pkg/auth/none_authenticator.go 7.69% <0.00%> (-0.65%) ⬇️
pkg/auth/none_authz_handler.go 0.00% <0.00%> (ø)
pkg/auth/rhsso_authz_handler.go 73.30% <0.00%> (-3.48%) ⬇️
pkg/auth/rhsso_authenticator.go 52.17% <81.81%> (-0.36%) ⬇️
... and 2 more

@nmagnezi
Copy link
Contributor Author

/retest-required

@filanov
Copy link
Contributor

filanov commented May 2, 2022

Consider moving this helper function into a different package

@celebdor
Copy link
Contributor

celebdor commented May 9, 2022

Both the commit, the PR and the ticket lack description that sheds light on the context, motivation and goals for this change.

@nmagnezi nmagnezi force-pushed the MGMT-9136_org_based_feature_enablement branch 2 times, most recently from 0cc6f6e to 79816d2 Compare May 11, 2022 13:46
@nmagnezi
Copy link
Contributor Author

Consider moving this helper function into a different package

Done.

Both the commit, the PR and the ticket lack description that sheds light on the context, motivation and goals for this change.

You're right. I marked this PR as WIP for now, but I will work to add those sooner.
I just wait for #3727 to get approved so the commit-msg will be a shorter version of it.

@nmagnezi nmagnezi force-pushed the MGMT-9136_org_based_feature_enablement branch from 79816d2 to 8d7b789 Compare May 12, 2022 08:55
@nmagnezi
Copy link
Contributor Author

/retest-required

@nmagnezi nmagnezi force-pushed the MGMT-9136_org_based_feature_enablement branch from 8d7b789 to f3f6e5b Compare May 12, 2022 18:13
@openshift-ci openshift-ci bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 12, 2022
@nmagnezi
Copy link
Contributor Author

/test subsystem-aws

@openshift-ci
Copy link

openshift-ci bot commented May 12, 2022

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

  • /test edge-ci-index
  • /test edge-e2e-metal-assisted
  • /test edge-e2e-metal-assisted-ipv6
  • /test edge-e2e-metal-assisted-operator-ztp
  • /test edge-images
  • /test edge-lint
  • /test edge-subsystem-aws
  • /test edge-subsystem-kubeapi-aws
  • /test edge-unit-test
  • /test edge-verify-generated-code
  • /test images

The following commands are available to trigger optional jobs:

  • /test edge-e2e-ai-operator-ztp-ipv4v6-3masters-ocp-49
  • /test edge-e2e-ai-operator-ztp-ipv4v6-sno-ocp-49
  • /test edge-e2e-metal-assisted-4-10
  • /test edge-e2e-metal-assisted-4-6
  • /test edge-e2e-metal-assisted-4-8
  • /test edge-e2e-metal-assisted-4-9
  • /test edge-e2e-metal-assisted-capi
  • /test edge-e2e-metal-assisted-cnv
  • /test edge-e2e-metal-assisted-day2
  • /test edge-e2e-metal-assisted-ipv4v6
  • /test edge-e2e-metal-assisted-kube-api-late-binding-single-node
  • /test edge-e2e-metal-assisted-kube-api-late-unbinding-ipv4-single-node
  • /test edge-e2e-metal-assisted-kube-api-net-suite
  • /test edge-e2e-metal-assisted-none
  • /test edge-e2e-metal-assisted-ocs
  • /test edge-e2e-metal-assisted-odf
  • /test edge-e2e-metal-assisted-onprem
  • /test edge-e2e-metal-assisted-operator-capi
  • /test edge-e2e-metal-assisted-operator-disconnected
  • /test edge-e2e-metal-assisted-operator-ztp-multinode-spoke
  • /test edge-e2e-metal-assisted-single-node
  • /test edge-e2e-metal-assisted-static-ip-suite
  • /test edge-e2e-metal-assisted-tpmv2

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-assisted-service-master-edge-ci-index
  • pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted
  • pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-operator-ztp
  • pull-ci-openshift-assisted-service-master-edge-images
  • pull-ci-openshift-assisted-service-master-edge-lint
  • pull-ci-openshift-assisted-service-master-edge-subsystem-aws
  • pull-ci-openshift-assisted-service-master-edge-subsystem-kubeapi-aws
  • pull-ci-openshift-assisted-service-master-edge-unit-test
  • pull-ci-openshift-assisted-service-master-edge-verify-generated-code
  • pull-ci-openshift-assisted-service-master-images

In response to this:

/test subsystem-aws

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

@nmagnezi nmagnezi force-pushed the MGMT-9136_org_based_feature_enablement branch 7 times, most recently from 8ac262a to 069b0ad Compare May 15, 2022 16:50
@nmagnezi nmagnezi force-pushed the MGMT-9136_org_based_feature_enablement branch from 6937a59 to 3e03bf6 Compare May 23, 2022 14:35
@nmagnezi nmagnezi requested review from gamli75 and avishayt May 23, 2022 14:41
@nmagnezi nmagnezi force-pushed the MGMT-9136_org_based_feature_enablement branch 3 times, most recently from 0217167 to 2832515 Compare May 25, 2022 14:14
@nmagnezi nmagnezi requested a review from avishayt May 25, 2022 14:35
@nmagnezi
Copy link
Contributor Author

/retest-required

@nmagnezi nmagnezi changed the title MGMT-10197: Adds FEATURE_GATE: organization based feature enablement MGMT-10197: Adds ENABLE_ORG_BASED_FEATURE_GATES: organization based feature enablement May 25, 2022
@nmagnezi nmagnezi changed the title MGMT-10197: Adds ENABLE_ORG_BASED_FEATURE_GATES: organization based feature enablement MGMT-10197: Adds ENABLE_ORG_BASED_FEATURE_GATES May 25, 2022
@openshift-ci
Copy link

openshift-ci bot commented May 25, 2022

@nmagnezi: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/subsystem-aws de79d40 link true /test subsystem-aws
ci/prow/subsystem-kubeapi-aws de79d40 link true /test subsystem-kubeapi-aws
ci/prow/edge-e2e-metal-assisted-cnv de79d40 link true /test edge-e2e-metal-assisted-cnv
ci/prow/edge-e2e-metal-assisted-ipv6 de79d40 link true /test edge-e2e-metal-assisted-ipv6
ci/prow/edge-e2e-metal-assisted-ocs de79d40 link true /test edge-e2e-metal-assisted-ocs

Full PR test history. Your PR dashboard.

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

@nmagnezi
Copy link
Contributor Author

/test subsystem-kubeapi-aws

@openshift-ci
Copy link

openshift-ci bot commented May 25, 2022

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

  • /test edge-ci-index
  • /test edge-e2e-metal-assisted
  • /test edge-e2e-metal-assisted-ipv6
  • /test edge-e2e-metal-assisted-operator-ztp
  • /test edge-images
  • /test edge-lint
  • /test edge-subsystem-aws
  • /test edge-subsystem-kubeapi-aws
  • /test edge-unit-test
  • /test edge-verify-generated-code
  • /test images

The following commands are available to trigger optional jobs:

  • /test edge-e2e-ai-operator-ztp-ipv4v6-3masters-ocp-49
  • /test edge-e2e-ai-operator-ztp-ipv4v6-sno-ocp-49
  • /test edge-e2e-metal-assisted-4-10
  • /test edge-e2e-metal-assisted-4-6
  • /test edge-e2e-metal-assisted-4-8
  • /test edge-e2e-metal-assisted-4-9
  • /test edge-e2e-metal-assisted-capi
  • /test edge-e2e-metal-assisted-cnv
  • /test edge-e2e-metal-assisted-day2
  • /test edge-e2e-metal-assisted-ipv4v6
  • /test edge-e2e-metal-assisted-kube-api-late-binding-single-node
  • /test edge-e2e-metal-assisted-kube-api-late-unbinding-ipv4-single-node
  • /test edge-e2e-metal-assisted-kube-api-net-suite
  • /test edge-e2e-metal-assisted-none
  • /test edge-e2e-metal-assisted-ocs
  • /test edge-e2e-metal-assisted-odf
  • /test edge-e2e-metal-assisted-onprem
  • /test edge-e2e-metal-assisted-operator-capi
  • /test edge-e2e-metal-assisted-operator-disconnected
  • /test edge-e2e-metal-assisted-operator-ztp-multinode-spoke
  • /test edge-e2e-metal-assisted-single-node
  • /test edge-e2e-metal-assisted-static-ip-suite
  • /test edge-e2e-metal-assisted-tpmv2

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-openshift-assisted-service-master-edge-ci-index
  • pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted
  • pull-ci-openshift-assisted-service-master-edge-e2e-metal-assisted-operator-ztp
  • pull-ci-openshift-assisted-service-master-edge-images
  • pull-ci-openshift-assisted-service-master-edge-lint
  • pull-ci-openshift-assisted-service-master-edge-subsystem-aws
  • pull-ci-openshift-assisted-service-master-edge-subsystem-kubeapi-aws
  • pull-ci-openshift-assisted-service-master-edge-unit-test
  • pull-ci-openshift-assisted-service-master-edge-verify-generated-code
  • pull-ci-openshift-assisted-service-master-images

In response to this:

/test subsystem-kubeapi-aws

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

@nmagnezi
Copy link
Contributor Author

/retest-required

@danielerez
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 26, 2022
@openshift-bot
Copy link
Contributor

/retest-required

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

Some features might be of interest to partners or early adopters.
Other features might not be ready for public consumption: tech-preview
or an internal-only functionality.

This change adds a method to the authorization middleware for
asserting a particular capability against the user's
organization-assigned capabilities.

This change also includes an implementation related to ARM-based CPU
architecture capability of (via the above-mentioned method) with
the following APIs:
- V2RegisterCluster
- RegisterInfraEnv

Note that V2ListSupportedOpenshiftVersions is also relevant
here and will be included in a follow-up change.

Find additional information in the feature enablement enhancement doc: openshift#3744
@avishayt
Copy link
Contributor

/lgtm

@nmagnezi nmagnezi force-pushed the MGMT-9136_org_based_feature_enablement branch from 2832515 to 96e4091 Compare May 26, 2022 09:47
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label May 26, 2022
@avishayt
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 26, 2022
@openshift-merge-robot openshift-merge-robot merged commit 096a0f9 into openshift:master May 26, 2022
flaper87 pushed a commit to flaper87/assisted-service that referenced this pull request Sep 21, 2022
Some features might be of interest to partners or early adopters.
Other features might not be ready for public consumption: tech-preview
or an internal-only functionality.

This change adds a method to the authorization middleware for
asserting a particular capability against the user's
organization-assigned capabilities.

This change also includes an implementation related to ARM-based CPU
architecture capability of (via the above-mentioned method) with
the following APIs:
- V2RegisterCluster
- RegisterInfraEnv

Note that V2ListSupportedOpenshiftVersions is also relevant
here and will be included in a follow-up change.

Find additional information in the feature enablement enhancement doc: openshift#3744
danielerez pushed a commit to danielerez/assisted-service that referenced this pull request Oct 15, 2023
Some features might be of interest to partners or early adopters.
Other features might not be ready for public consumption: tech-preview
or an internal-only functionality.

This change adds a method to the authorization middleware for
asserting a particular capability against the user's
organization-assigned capabilities.

This change also includes an implementation related to ARM-based CPU
architecture capability of (via the above-mentioned method) with
the following APIs:
- V2RegisterCluster
- RegisterInfraEnv

Note that V2ListSupportedOpenshiftVersions is also relevant
here and will be included in a follow-up change.

Find additional information in the feature enablement enhancement doc: openshift#3744
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. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants