You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to set service & it's cluster expiry in our test. We tried with "ExpiredAt" function v1.NewManagedService().Service("ocm-addon-test-operator").ExpiredAt(time.Now().Add(time.Hour)). i.e setting to expire after one hour of creation i.e
2022/12/08 11:51:23 Debug - Request method is POST
2022/12/08 11:51:23 Debug - Request URL is 'https://api.integration.openshift.com/api/service_mgmt/v1/services'
2022/12/08 11:51:23 Debug - Request body follows
2022/12/08 11:51:23 Debug - {
"kind": "ManagedService",
"expired_at": "2022-12-08T12:51:23Z",
...
...
But in http POST method's response , I could see it set to 36 hours after created_at timestamp i.e
"created_at": "2022-12-08T11:51:27Z",
"expired_at": "2022-12-09T23:51:23.964498103Z",
It sets expiration_timestamp for the clusters created by
clusters_mgmt endpoints. We need to work on fixing [1]
i.e setting expiration_timestamp for clusters created by
services (i.e service_mgmt endpoint). We will disable
testing service_mgmt endpoints in CI till this gets fixed.
[1] cloud-bulldozer#102
We want to set service & it's cluster expiry in our test. We tried with "ExpiredAt" function v1.NewManagedService().Service("ocm-addon-test-operator").ExpiredAt(time.Now().Add(time.Hour)). i.e setting to expire after one hour of creation i.e
2022/12/08 11:51:23 Debug - Request method is POST
2022/12/08 11:51:23 Debug - Request URL is 'https://api.integration.openshift.com/api/service_mgmt/v1/services'
2022/12/08 11:51:23 Debug - Request body follows
2022/12/08 11:51:23 Debug - {
"kind": "ManagedService",
"expired_at": "2022-12-08T12:51:23Z",
...
...
But in http POST method's response , I could see it set to 36 hours after created_at timestamp i.e
"created_at": "2022-12-08T11:51:27Z",
"expired_at": "2022-12-09T23:51:23.964498103Z",
Looks like it is using cluster's expiration_timestamp https://gitlab.cee.redhat.com/service/ocm-managed-services/-/blob/main/pkg/services/managed_services.go#L280 though user has provided ExpiredAt
We tried v1.NewManagedService().Cluster(v1.NewCluster().ExpirationTimestamp( However this cluster builder ( https://github.com/openshift-online/ocm-sdk-go/blob/main/servicemgmt/v1/cluster_builder.go ) is not having ExpirationTimestamp method.
May be we should use cluster builder from github.com/openshift-online/ocm-sdk-go/clustersmgmt/v1 for cluster inside service instead of https://github.com/openshift-online/ocm-sdk-go/blob/main/**servicemgmt**/v1/cluster_builder.go
Also we need to check from which ocm-sdk-go release we have this ExpirationTimestamp() function.
We should avoid testing services in CI till it gets fixed.
The text was updated successfully, but these errors were encountered: