Skip to content

Updates ansible collections and ansible packages to supported versions. #105

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-ansible.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
- run: sudo rm -rf /usr/local/bin/kustomize
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: '3.12'
- name: Run test e2e ansible molecule
run: |
env
pip3 install --user --upgrade setuptools pip
pip3 install --user ansible-core~=2.15.0
pip3 install --user ansible-core~=2.17.4
make test-e2e-ansible-molecule
6 changes: 3 additions & 3 deletions images/ansible-operator/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ verify_ssl = true
name = "pypi"

[packages]
ansible-runner = "~=2.3.6"
ansible-runner = "~=2.4.0"
ansible-runner-http = "~=1.0.0"
ansible-core = "~=2.15.12"
urllib3 = "~=1.26"
ansible-core = "==2.17.4"
urllib3 = "~=1.26.2"
kubernetes = "==29.0.0"
requests = "~=2.31.0"

Expand Down
339 changes: 177 additions & 162 deletions images/ansible-operator/Pipfile.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions internal/ansible/controller/reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestReconcile(t *testing.T) {
"failures": int64(0),
"ok": int64(0),
"skipped": int64(0),
"completion": eventTime.Format("2006-01-02T15:04:05.99999999"),
"completion": eventTime.Format("2006-01-02T15:04:05.99999999+00:00"),
},
"message": "Awaiting next reconciliation",
"reason": "Successful",
Expand Down Expand Up @@ -209,7 +209,7 @@ func TestReconcile(t *testing.T) {
"failures": int64(0),
"ok": int64(0),
"skipped": int64(0),
"completion": eventTime.Format("2006-01-02T15:04:05.99999999"),
"completion": eventTime.Format("2006-01-02T15:04:05.99999999+00:00"),
},
"message": "new failure message",
"reason": "Failed",
Expand Down Expand Up @@ -326,7 +326,7 @@ func TestReconcile(t *testing.T) {
"failures": int64(0),
"ok": int64(0),
"skipped": int64(0),
"completion": eventTime.Format("2006-01-02T15:04:05.99999999"),
"completion": eventTime.Format("2006-01-02T15:04:05.99999999+00:00"),
},
"message": "Awaiting next reconciliation",
"reason": "Successful",
Expand Down Expand Up @@ -383,7 +383,7 @@ func TestReconcile(t *testing.T) {
"failures": int64(0),
"ok": int64(0),
"skipped": int64(0),
"completion": eventTime.Format("2006-01-02T15:04:05.99999999"),
"completion": eventTime.Format("2006-01-02T15:04:05.99999999+00:00"),
},
"message": "Awaiting next reconciliation",
"reason": "Successful",
Expand Down Expand Up @@ -432,7 +432,7 @@ func TestReconcile(t *testing.T) {
"failures": int64(0),
"ok": int64(0),
"skipped": int64(0),
"completion": eventTime.Format("2006-01-02T15:04:05.99999999"),
"completion": eventTime.Format("2006-01-02T15:04:05.99999999+00:00"),
},
"message": "Failed to get ansible-runner stdout",
},
Expand Down
4 changes: 2 additions & 2 deletions internal/ansible/runner/eventapi/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ type EventTime struct {

// UnmarshalJSON - override unmarshal json.
func (e *EventTime) UnmarshalJSON(b []byte) (err error) {
e.Time, err = time.Parse("2006-01-02T15:04:05.999999999", strings.Trim(string(b[:]), "\"\\"))
e.Time, err = time.Parse("2006-01-02T15:04:05.999999999+00:00", strings.Trim(string(b[:]), "\"\\"))
return
}

// MarshalJSON - override the marshal json.
func (e EventTime) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf("\"%s\"", e.Time.Format("2006-01-02T15:04:05.99999999"))), nil
return []byte(fmt.Sprintf("\"%s\"", e.Time.Format("2006-01-02T15:04:05.99999999+00:00"))), nil
}

// JobEvent - event of an ansible run.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ collections:
- name: operator_sdk.util
version: "0.5.0"
- name: kubernetes.core
version: "2.4.0"
version: "3.2.0"
- name: cloud.common
version: "2.1.1"
version: "3.0.0"
- name: community.docker
version: "3.10.3"
version: "3.12.1"
`
6 changes: 3 additions & 3 deletions testdata/memcached-molecule-operator/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ collections:
- name: operator_sdk.util
version: "0.5.0"
- name: kubernetes.core
version: "2.4.0"
version: "3.2.0"
- name: cloud.common
version: "2.1.1"
version: "3.0.0"
- name: community.docker
version: "3.10.3"
version: "3.12.1"
Loading