Skip to content
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

Fixed Pipeline Schedules failing after upgrading #132

Merged
merged 5 commits into from
Feb 6, 2025

Conversation

hbelmiro
Copy link

@hbelmiro hbelmiro commented Jan 23, 2025

Resolves: https://issues.redhat.com/browse/RHOAIENG-14265

This PR cherry picks 5 commits from upstream.

Checklist:

@jgarciao
Copy link

I've tested this PR using the dsp-api-server test image provided by @hbelmiro and scheduled workflows seem to be working fine.

  • In the testing, I've manually modified an existing ScheduledWorkflow with the following command and after restarting the dsp-api-server pod it was updated removing the incorrect fields and it kept working correctly:
oc  patch scheduledworkflow  hello-world-every-2m89bbq  -n my-project  --type='merge' -p '{"spec":{"workflow":{"spec":{"dynamicKey1":"dynamicValue1","dynamicKey2":"dynamicValue2"}}}}'

@hbelmiro hbelmiro marked this pull request as ready for review January 24, 2025 14:07
@openshift-ci openshift-ci bot requested review from gmfrasca and rimolive January 24, 2025 14:07
@hbelmiro
Copy link
Author

@HumairAK @mprahl can you PTAL?

@mprahl
Copy link

mprahl commented Jan 30, 2025

@hbelmiro could you please rebase this PR?

…riodic schedule correctly (kubeflow#11475)

---------

Signed-off-by: Helber Belmiro <[email protected]>
(cherry picked from commit 97acacb)
Signed-off-by: Helber Belmiro <[email protected]>

(cherry picked from commit 72f11d9)
Signed-off-by: Helber Belmiro <[email protected]>
(cherry picked from commit 34bf2f8)
Signed-off-by: Helber Belmiro <[email protected]>
(cherry picked from commit 2686e01)
…ver startup

Signed-off-by: Helber Belmiro <[email protected]>
(cherry picked from commit 8ab8dae)
@hbelmiro
Copy link
Author

@hbelmiro could you please rebase this PR?

@mprahl done.

@mprahl
Copy link

mprahl commented Jan 31, 2025

@hbelmiro could you please remind me what the last commit is fixing compared to what's in upstream?

@hbelmiro
Copy link
Author

hbelmiro commented Jan 31, 2025

@hbelmiro could you please remind me what the last commit is fixing compared to what's in upstream?

@mprahl 40a10c4 fixes the ServiceAccount name, which in ODH we add the DSPA name as a suffix.

#129 may give more context.

@mprahl
Copy link

mprahl commented Jan 31, 2025

@hbelmiro could you please remind me what the last commit is fixing compared to what's in upstream?

@mprahl 40a10c4 fixes the ServiceAccount name, which in ODH we add the DSPA name as a suffix.

#129 may give more context.

Could you please explain why this default value for the service account is not working correctly?
https://github.com/opendatahub-io/data-science-pipelines-operator/blob/7f7f7852591c5389af0661ecea5059bc0d498c83/config/internal/apiserver/default/deployment.yaml.tmpl#L75-L76

@hbelmiro
Copy link
Author

@hbelmiro could you please remind me what the last commit is fixing compared to what's in upstream?

@mprahl 40a10c4 fixes the ServiceAccount name, which in ODH we add the DSPA name as a suffix.
#129 may give more context.

Could you please explain why this default value for the service account is not working correctly? https://github.com/opendatahub-io/data-science-pipelines-operator/blob/7f7f7852591c5389af0661ecea5059bc0d498c83/config/internal/apiserver/default/deployment.yaml.tmpl#L75-L76

@mprahl I wasn't aware of that config. I'll take a look.

@hbelmiro
Copy link
Author

@hbelmiro could you please remind me what the last commit is fixing compared to what's in upstream?

@mprahl 40a10c4 fixes the ServiceAccount name, which in ODH we add the DSPA name as a suffix.
#129 may give more context.

Could you please explain why this default value for the service account is not working correctly? https://github.com/opendatahub-io/data-science-pipelines-operator/blob/7f7f7852591c5389af0661ecea5059bc0d498c83/config/internal/apiserver/default/deployment.yaml.tmpl#L75-L76

@mprahl I wasn't aware of that config. I'll take a look.

@mprahl good catch!
The ServiceAccount is hardcoded in upstream. I'll send a PR to fix it and then we can cherry pick it and remove 40a10c4.

/hold

@mprahl
Copy link

mprahl commented Jan 31, 2025

@hbelmiro I think that hardcoded value is on purpose as it's supposed to get replaced here, so maybe it's not getting replaced properly.
https://github.com/kubeflow/pipelines/blob/915cc552f56359454b91870df0e5eea1ecda2218/backend/src/apiserver/template/template.go#L295-L306

@hbelmiro
Copy link
Author

@hbelmiro I think that hardcoded value is on purpose as it's supposed to get replaced here, so maybe it's not getting replaced properly. https://github.com/kubeflow/pipelines/blob/915cc552f56359454b91870df0e5eea1ecda2218/backend/src/apiserver/template/template.go#L295-L306

@mprahl setDefaultServiceAccount is not being called because of the hardcoded value.
Besides that, I don't see a reason for having a hardcoded value if there's a config for a default value.

@mprahl
Copy link

mprahl commented Jan 31, 2025

@hbelmiro I think that hardcoded value is on purpose as it's supposed to get replaced here, so maybe it's not getting replaced properly. https://github.com/kubeflow/pipelines/blob/915cc552f56359454b91870df0e5eea1ecda2218/backend/src/apiserver/template/template.go#L295-L306

@mprahl setDefaultServiceAccount is not being called because of the hardcoded value. Besides that, I don't see a reason for having a hardcoded value if there's a config for a default value.

Oh, I see. Perhaps just removing the if condition would fix it?

@hbelmiro
Copy link
Author

@hbelmiro I think that hardcoded value is on purpose as it's supposed to get replaced here, so maybe it's not getting replaced properly. https://github.com/kubeflow/pipelines/blob/915cc552f56359454b91870df0e5eea1ecda2218/backend/src/apiserver/template/template.go#L295-L306

@mprahl setDefaultServiceAccount is not being called because of the hardcoded value. Besides that, I don't see a reason for having a hardcoded value if there's a config for a default value.

Oh, I see. Perhaps just removing the if condition would fix it?

@mprahl Having pipeline-runner hardcoded doesn't make sense to me.
From my perspective, we should use DefaultPipelineRunnerServiceAccount since the beginning:

ServiceAccountName: common.GetStringConfigWithDefault(common.DefaultPipelineRunnerServiceAccountFlag, common.DefaultPipelineRunnerServiceAccount),

And keep the condition there (just for safety).

@mprahl
Copy link

mprahl commented Jan 31, 2025

@hbelmiro I think that hardcoded value is on purpose as it's supposed to get replaced here, so maybe it's not getting replaced properly. https://github.com/kubeflow/pipelines/blob/915cc552f56359454b91870df0e5eea1ecda2218/backend/src/apiserver/template/template.go#L295-L306

@mprahl setDefaultServiceAccount is not being called because of the hardcoded value. Besides that, I don't see a reason for having a hardcoded value if there's a config for a default value.

Oh, I see. Perhaps just removing the if condition would fix it?

@mprahl Having pipeline-runner hardcoded doesn't make sense to me. From my perspective, we should use DefaultPipelineRunnerServiceAccount since the beginning:

ServiceAccountName: common.GetStringConfigWithDefault(common.DefaultPipelineRunnerServiceAccountFlag, common.DefaultPipelineRunnerServiceAccount),

And keep the condition there (just for safety).

That seems okay too!

@hbelmiro hbelmiro marked this pull request as ready for review February 5, 2025 19:34
@openshift-ci openshift-ci bot requested a review from HumairAK February 5, 2025 19:34
@hbelmiro
Copy link
Author

hbelmiro commented Feb 5, 2025

/unhold

@mprahl can you please take another look?

Copy link

openshift-ci bot commented Feb 5, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mprahl

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Feb 5, 2025
@hbelmiro
Copy link
Author

hbelmiro commented Feb 6, 2025

@mprahl can you please manually merge it?

@mprahl mprahl merged commit b8d339a into opendatahub-io:master Feb 6, 2025
3 of 5 checks passed
@hbelmiro hbelmiro deleted the fix-swf branch February 6, 2025 15:11
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.

4 participants