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

SALTO-6582: Fix deploy error for ProfileEnrollmentPolicyRule #6498

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shir-reifenberg
Copy link
Contributor

@shir-reifenberg shir-reifenberg commented Aug 29, 2024

Fix deployment issue


Additional context for reviewer
The issue caused by the fact with omit profileAttributes array when empty, though it's required in the deployment.
will add noise reduction as well.


Release Notes:

Okta_adapter:

  • Fix a bug in the deployment of ProfileEnrollmentPolicyRule when profileAttributes is empty

User Notifications:

Okta_adadpter:

  • profileAttributes array will be added to ProfileEnrollmentPolicyRule when empty

@coveralls
Copy link

Coverage Status

coverage: 93.8% (-0.03%) from 93.825%
when pulling da4e010 on shir-reifenberg:SALTO-6582-AllowEmptyProfileAttributesInProfileEnrollmentRule
into ca458e7 on salto-io:main.

@@ -202,6 +202,7 @@ const getPolicyCustomizations = (): Record<string, definitions.fetch.InstanceFet
? { elemID: accessPolicyRuleCustomizer }
: { elemID: { extendsParent: true } }),
serviceUrl: { path: details.ruleServiceUrl ?? details.policyServiceUrl },
allowEmptyArrays: typeName === PROFILE_ENROLLMENT_RULE_TYPE_NAME ? true : undefined,
Copy link
Contributor

Choose a reason for hiding this comment

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

This will fix the bug going forward, assuming users do a fetch before deploying new changes, but restoring older workspace versions would still fail. It's fine IMO to decide we're not putting more effort into it, but if we want to ensure restores work, we also need to assign an empty array when deploying this type.

@shoshana-houri shoshana-houri removed their request for review December 23, 2024 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants