Skip to content

fix: List page crashes and missing rows#40

Open
Cragsmann wants to merge 3 commits into
functions-dev:masterfrom
Cragsmann:SRVOCF-840--fix-list-page-crashes
Open

fix: List page crashes and missing rows#40
Cragsmann wants to merge 3 commits into
functions-dev:masterfrom
Cragsmann:SRVOCF-840--fix-list-page-crashes

Conversation

@Cragsmann

@Cragsmann Cragsmann commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add per-repo error handling in loadFunctionTableItems so a deleted GitHub repo no longer crashes the entire list page (repos that fail to load are silently skipped)
  • Use function name from func.yaml instead of repo name as the correlation key, so cluster matching works when the two differ
  • Rename parseNamespaceAndRuntime to parseFuncYaml and extract the name field

Fixes SRVOCF-840

Test plan

  • Delete a function repo from GitHub, click Refresh on list page. Page shows remaining functions (or empty state) without crashing
  • Create a repo where func.yaml name differs from repo name. List page shows the func.yaml name and matches cluster status correctly
  • Unit tests pass (131 total, 5 new)

@Cragsmann Cragsmann changed the title SRVOCF-840: Fix list page crashes and missing rows fix: List page crashes and missing rows Jun 15, 2026
@matejvasek

matejvasek commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

via Claude:

Review

Blocking

Edit link breaks when func.yaml name differs from repo name.

The list page now uses the func.yaml name as the item name (FunctionsListPage.tsx:227: newItem(name || repo.name, ...)), and the edit link navigates using that name (FunctionsListPage.tsx:208: navigate(\/faas/edit/${name}`)`).

But resolveRepoContent in FunctionEditPage.tsx:193 looks up repos by GitHub repo name: repos.find((r) => r.name === repoName).

When func.yaml has name: my-function but the repo is named my-repo:

  1. List page shows my-function
  2. Clicking edit navigates to /faas/edit/my-function
  3. resolveRepoContent searches for a repo named my-function, finds nothing
  4. Edit page fails

The FunctionTableItem (or the edit route) needs to carry the repo name alongside the display name so that resolveRepoContent can resolve correctly.

Non-blocking

  • Silent error swallowing (FunctionsListPage.tsx:228-229): Bare catch drops all errors, not just 404s from deleted repos. Network timeouts and rate limits would silently hide repos with no indication to the user.

@Cragsmann

Copy link
Copy Markdown
Collaborator Author

Both issues confirmed and fixed:

1. Edit link (blocking): Added repoName field to FunctionTableItem. The edit button now passes fn.repoName (the GitHub repo name) instead of fn.name (the func.yaml display name), so resolveRepoContent resolves correctly even when they differ. Added a test covering the divergent-name case.

2. Silent error swallowing (non-blocking): Changed the bare catch to log via console.warn with the repo name and error message, so network timeouts and rate limits are visible instead of silently dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants