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

[release-4.14] OCPBUGS-30571: Fix for ACM Policy Generator Plugin #757

Merged

Conversation

edcdavid
Copy link
Contributor

  • This commit fixes an issue happening when using policies generated with ACM Policy Generator Plugin.
    For ConfigurationPolicy kind, the name of the object and the inner template are the same when generated with ACM Gen.
    In comparison the PGT plugin, adds "-config" to the name of the inner template. this leads to overloaded keys in the
    clusterGroupUpgrade.Status.SafeResourceNames map.

Changes:

  • Addressing Jun's comments

  • Addinitonal fixes for map key

  • fix kuttl test

openshift-kni#756)

* This commit fixes an issue happening when using policies generated with ACM Policy Generator Plugin.
For ConfigurationPolicy kind, the name of the object and the inner template are the same when generated with ACM Gen.
In comparison the PGT plugin, adds "-config" to the name of the inner template. this leads to overloaded keys in the
clusterGroupUpgrade.Status.SafeResourceNames map.

Changes:
 - namespace+"/"+name key used in the clusterGroupUpgrade.Status.SafeResourceNames map
 - use of namespace instead of namespace length in GetSafeResourceName
 - use of utf8.RuneCountInString() instead of len to support non english characters (see policy web hook at https://github.com/stolostron/governance-policy-propagator/blob/feb9abb241954d7ce64054d7c621b423deece8cf/api/v1/policy_webhook.go#L86-L87 ).
 - adding logs to display the safenames and lenghts

* Addressing Jun's comments

* Addinitonal fixes for map key

* fix kuttl test
@openshift-ci-robot
Copy link

@edcdavid: This pull request references Jira Issue OCPBUGS-29208, which is invalid:

  • expected the bug to target either version "4.14." or "openshift-4.14.", but it targets "4.16.0" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is ON_QA instead
  • expected Jira Issue OCPBUGS-29208 to depend on a bug targeting a version in 4.15.0 and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

  • This commit fixes an issue happening when using policies generated with ACM Policy Generator Plugin.
    For ConfigurationPolicy kind, the name of the object and the inner template are the same when generated with ACM Gen.
    In comparison the PGT plugin, adds "-config" to the name of the inner template. this leads to overloaded keys in the
    clusterGroupUpgrade.Status.SafeResourceNames map.

Changes:

  • Addressing Jun's comments

  • Addinitonal fixes for map key

  • fix kuttl test

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 7, 2024
@jc-rh jc-rh removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 7, 2024
@edcdavid edcdavid changed the title [release-4.14] OCPBUGS-29208: Fix for ACM Policy Generator Plugin (#751) (#756) [release-4.14] OCPBUGS-30571: Fix for ACM Policy Generator Plugin Mar 8, 2024
@openshift-ci-robot
Copy link

@edcdavid: This pull request references Jira Issue OCPBUGS-30571, which is invalid:

  • expected Jira Issue OCPBUGS-30571 to depend on a bug targeting a version in 4.15.0, 4.15.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

  • This commit fixes an issue happening when using policies generated with ACM Policy Generator Plugin.
    For ConfigurationPolicy kind, the name of the object and the inner template are the same when generated with ACM Gen.
    In comparison the PGT plugin, adds "-config" to the name of the inner template. this leads to overloaded keys in the
    clusterGroupUpgrade.Status.SafeResourceNames map.

Changes:

  • Addressing Jun's comments

  • Addinitonal fixes for map key

  • fix kuttl test

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 openshift-eng/jira-lifecycle-plugin repository.

@edcdavid
Copy link
Contributor Author

edcdavid commented Mar 8, 2024

/jira refresh

@openshift-ci-robot
Copy link

@edcdavid: This pull request references Jira Issue OCPBUGS-30571, which is invalid:

  • expected Jira Issue OCPBUGS-30571 to depend on a bug targeting a version in 4.15.0, 4.15.z and in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but no dependents were found

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

Copy link

openshift-ci bot commented Mar 12, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jc-rh

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 Mar 12, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 1055079 into openshift-kni:release-4.14 Mar 12, 2024
5 checks passed
@openshift-ci-robot
Copy link

@edcdavid: Jira Issue OCPBUGS-30571: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-30571 has been moved to the MODIFIED state.

In response to this:

  • This commit fixes an issue happening when using policies generated with ACM Policy Generator Plugin.
    For ConfigurationPolicy kind, the name of the object and the inner template are the same when generated with ACM Gen.
    In comparison the PGT plugin, adds "-config" to the name of the inner template. this leads to overloaded keys in the
    clusterGroupUpgrade.Status.SafeResourceNames map.

Changes:

  • Addressing Jun's comments

  • Addinitonal fixes for map key

  • fix kuttl test

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 openshift-eng/jira-lifecycle-plugin repository.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants