Skip to content

SRVOCF-1071: Add deploy/undeploy button to list table actions - #181

Draft
Cragsmann wants to merge 1 commit into
openshift:masterfrom
Cragsmann:SRVOCF-1071-change-the-delete-to-an-undeploy-button-and-update
Draft

SRVOCF-1071: Add deploy/undeploy button to list table actions#181
Cragsmann wants to merge 1 commit into
openshift:masterfrom
Cragsmann:SRVOCF-1071-change-the-delete-to-an-undeploy-button-and-update

Conversation

@Cragsmann

@Cragsmann Cragsmann commented Sep 3, 2026

Copy link
Copy Markdown

Summary

  • 🎁 Replace the destructive delete action with a status-driven Deploy/Undeploy toggle in the functions list Actions column (Deploy when the function is not running, Undeploy when it is).
  • 🎁 Add a backend deploy endpoint that triggers the function's CI workflow via workflow_dispatch, add DispatchWorkflow to the SCM client, and emit the workflow_dispatch trigger in generated CI workflows.
  • 🎁 Add a deployFunction client and drive the toggle from function status with inline success/error feedback. Deploy is guarded when a function has no source repository; Undeploy reuses the delete-modal flow but keeps the GitHub repository intact.
  • 🧪 Record workflow_dispatch calls in the fake GitHub server and expose them for assertions, cover the deploy dispatch and the flip to Undeploy in e2e, and update unit and e2e expectations for the split buttons. The empty-state e2e is skipped outside CI where a shared dev cluster usually has leftover functions.
  • 📚 Add the deploy/undeploy toggle design doc.

Fixes SRVOCF-1071
Relates to SRVOCF-1072

Checklist

  • Updated docs/ARCHITECTURE.md (if there are relevant changes to our layered architecture)
  • Updated docs/TESTING.md (if there are relevant changes to our testing framework or setup)

@openshift-merge-bot

Copy link
Copy Markdown

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Sep 3, 2026
@openshift-ci-robot

openshift-ci-robot commented Sep 3, 2026

Copy link
Copy Markdown

@Cragsmann: This pull request references SRVOCF-1071 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the bug to target the "5.1.0" version, but no target version was set.

Details

In response to this:

Summary

  • 🔧 Rename the function row "Delete" action to "Undeploy": swap the trash icon for a power-off icon, add an "Undeploy" tooltip on the enabled button, and explain in the confirmation modal that undeploying removes the running function and its Knative Service while leaving the GitHub repository intact.
  • 📚 Add an "Undeploy a function" step to the setup guide and fix the guide title ("Set up guide" to "Setup guide").
  • 🧪 Update unit and e2e tests and locale strings to match the new action.

Fixes SRVOCF-1071

Checklist

  • Updated docs/ARCHITECTURE.md (if there are relevant changes to our layered architecture)
  • Updated docs/TESTING.md (if there are relevant changes to our testing framework or setup)

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci

openshift-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign twogiants for approval. For more information see the Code Review Process.

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

Details 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

Comment thread src/pages/function-list/components/FunctionTable.tsx Outdated
@Cragsmann
Cragsmann marked this pull request as draft September 8, 2026 08:35
@openshift-ci openshift-ci Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Sep 8, 2026
@Cragsmann
Cragsmann force-pushed the SRVOCF-1071-change-the-delete-to-an-undeploy-button-and-update branch from 165966f to 7ae60cd Compare September 9, 2026 07:27
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 9, 2026
@Cragsmann Cragsmann changed the title SRVOCF-1071: Change the delete action to an undeploy button SRVOCF-1071: Add deploy/undeploy button to list table actions Sep 9, 2026
Previously the functions list only offered a destructive delete that
removed the Knative Service. Deploying a not-yet-deployed function
required leaving the console entirely. Replace that with a single
status-driven toggle in the Actions column: Deploy when the function
is not running, Undeploy when it is.

Backend: add a deploy endpoint that triggers the function's CI
workflow via workflow_dispatch, add DispatchWorkflow to the SCM
client, and emit the workflow_dispatch trigger in generated CI
workflows so the dispatch has a target.

Frontend: add a deployFunction client and drive the toggle button
from function status, with inline success/error feedback. Deploy is
guarded when the function has no source repository. Undeploy reuses
the delete-modal flow but keeps the GitHub repository intact.

Tests: record workflow_dispatch calls in the fake GitHub server and
expose them for assertions, cover the deploy dispatch and the flip to
Undeploy in e2e, and update unit and e2e expectations for the split
buttons. The empty-state e2e is skipped outside CI, where a shared
dev cluster usually has leftover functions.

Issue SRVOCF-1071
Issue SRVOCF-1072

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Cragsmann
Cragsmann force-pushed the SRVOCF-1071-change-the-delete-to-an-undeploy-button-and-update branch from 08cbdc5 to 88f2b0a Compare September 9, 2026 12:04
@Cragsmann

Copy link
Copy Markdown
Author

/test-e2e

@Cragsmann
Cragsmann marked this pull request as ready for review September 9, 2026 12:20
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 9, 2026
@openshift-ci
openshift-ci Bot requested a review from pmeida September 9, 2026 12:22
@openshift-ci

openshift-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown

@Cragsmann: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@Cragsmann

Cragsmann commented Sep 9, 2026

Copy link
Copy Markdown
Author

/test e2e-aws

@Cragsmann
Cragsmann marked this pull request as draft September 10, 2026 07:38
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants