Skip to content

fix: revert type of status.upgradedPostgresVersion to string#1745

Merged
rooftopcellist merged 1 commit intoansible:develfrom
kurokobo:pg_version
Mar 4, 2024
Merged

fix: revert type of status.upgradedPostgresVersion to string#1745
rooftopcellist merged 1 commit intoansible:develfrom
kurokobo:pg_version

Conversation

@kurokobo
Copy link
Copy Markdown
Contributor

@kurokobo kurokobo commented Mar 3, 2024

SUMMARY

Closes #1738

As follow-up for #1741, this PR changes to store status.upgradedPostgresVersion as a string, to keep backward compatibility.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
ADDITIONAL INFORMATION

Tested by following reproducible steps in #1738 (comment).

In step 7, deploy customized Operator with this PR instead of devel image:

$ IMG=registry.example.com/ansible/awx-operator:pg make docker-build docker-push deploy

In step 8, I can confirm there is no failed task.

$ kubectl -n awx logs deployments/awx-operator-controller-manager | grep -e "^PLAY RECAP" -A 1
PLAY RECAP *********************************************************************
localhost                  : ok=112  changed=16   unreachable=0    failed=0    skipped=75   rescued=0    ignored=1   
--
PLAY RECAP *********************************************************************
localhost                  : ok=85   changed=1    unreachable=0    failed=0    skipped=83   rescued=0    ignored=1 

In step 10. I can confirm PSQL 15 is running.

$ kubectl -n awx get pod
NAME                                              READY   STATUS    RESTARTS   AGE
awx-operator-controller-manager-984cd5d6f-jqwgw   2/2     Running   0          4m43s
awx-demo-postgres-15-0                            1/1     Running   0          3m50s
awx-demo-task-57d668d7b5-bmjrv                    4/4     Running   0          3m19s
awx-demo-web-6777767f5b-6lcwt                     3/3     Running   0          3m18s

In step 11, the status has upgradedPostgresVersion.

$ kubectl -n awx get awx awx-demo -o yaml
...
status:
  adminPasswordSecret: awx-demo-admin-password
  adminUser: admin
  broadcastWebsocketSecret: awx-demo-broadcast-websocket
  conditions:
  - lastTransitionTime: "2024-03-03T16:24:35Z"
    reason: ""
    status: "False"
    type: Failure
  - lastTransitionTime: "2024-03-03T16:21:12Z"
    reason: Successful
    status: "True"
    type: Running
  - lastTransitionTime: "2024-03-03T16:28:51Z"
    reason: Successful
    status: "True"
    type: Successful
  image: quay.io/ansible/awx:latest
  postgresConfigurationSecret: awx-demo-postgres-configuration
  secretKeySecret: awx-demo-secret-key
  upgradedPostgresVersion: "15"
  version: 23.9.0

In addition, just to be sure, I restarted Operator to trigger new reconciliation loop for existing AWX that has upgradedPostgresVersion and verified that the loop completes without any errors.

@aknochow aknochow requested a review from TheRealHaoLiu March 4, 2024 14:15
@aknochow aknochow self-assigned this Mar 4, 2024
@aknochow aknochow requested a review from rooftopcellist March 4, 2024 20:49
@rooftopcellist rooftopcellist merged commit dba934d into ansible:devel Mar 4, 2024
@kurokobo kurokobo deleted the pg_version branch April 1, 2024 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade failed due to use of < for str and int

3 participants