Open commarla opened 4 years ago
I'm also hitting this issue. It looks like the API is built from an old version of the OpenAPI spec doc which includes this bug for both jobExecutionRun
and jobExecutionDelete
. The jobExecutionRun
endpoint has been fixed in recent updates, but not the jobExecutionDelete
endpoint. Rebuilding this API would fix the execution run endpoint, but not the execution delete endpoint.
Noticed that. However, pull request is pointless since it is a code generated project. As a workaround, here is some pro tips :
~/go/pkg/mod/github.com/rundeck
replace
directive to redirect this project. Take my go.mod as example module MyAwesomeProject
go 1.14
replace github.com/rundeck/go-rundeck/rundeck v0.0.0-20190510195016-2cf9670bbcc4 => ./rundeck
require (
github.com/aws/aws-sdk-go v1.33.14
github.com/rundeck/go-rundeck/rundeck v0.0.0-20190510195016-2cf9670bbcc4
github.com/stretchr/testify v1.6.1 // indirect
)
func (client BaseClient) JobExecutionRun(ctx context.Context, ID string, request *ExecuteJobRequest) (result ExecutionList, err error) {
func (client BaseClient) JobExecutionRunPreparer(ctx context.Context, ID string, request *ExecuteJobRequest) (*http.Request, error) {
Just a workaround, and it have been proven works in my project. Again, pull request for this project is pointless, I don't think we should do that.
Hi @ProTip
I tried to use the JobExecutionRun function https://github.com/rundeck/go-rundeck/blob/master/rundeck/client.go#L1091 but I think the int32 format is an error.
JobID is a string everywhere else, JobGet https://github.com/rundeck/go-rundeck/blob/master/rundeck/client.go#L1165 for example.
I understand this SDK is autogenerated but how can we fix that ?
Thanks