Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix Argo Rollout CR wrong annotation type #377

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

Miracle05
Copy link
Contributor

For Argo Rollouts managed objects we are getting annotations with type ObjectLikeDict and the further object creation obj = K8sObjectData is falling with error

validation error for K8sObjectData annotations value is not a valid dict (type=type_error.dict)

So we need to call a dict method for explicit type conversion

@CLAassistant
Copy link

CLAassistant commented Dec 16, 2024

CLA assistant check
All committers have signed the CLA.

@kimsehwan96
Copy link

Not only annotations but also labels need same logic like below

        if item.metadata.labels:
            if type(item.metadata.labels) is ObjectLikeDict:
                labels = item.metadata.labels.__dict__
            else:
                labels = item.metadata.labels

@RoiGlinik
Copy link
Contributor

Thanks @Miracle05 and @kimsehwan96 . Will test it shortly and approve. Ill add the labels part myself .

@RoiGlinik RoiGlinik merged commit 4c657aa into robusta-dev:main Dec 19, 2024
1 check passed
@Miracle05 Miracle05 deleted the argo-rollouts-fix branch December 20, 2024 08:51
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants