Skip to content

Clean up job summaries: per-job artifacts, logical names, size column#43

Merged
omerzi merged 3 commits intomainfrom
feat/clean-job-summaries
Apr 15, 2026
Merged

Clean up job summaries: per-job artifacts, logical names, size column#43
omerzi merged 3 commits intomainfrom
feat/clean-job-summaries

Conversation

@omerzi
Copy link
Copy Markdown
Member

@omerzi omerzi commented Apr 15, 2026

Overview

Addresses fly-desktop#170 (client half). Cleans up the GitHub Actions job summary to be useful instead of noisy.

Before: Every job showed a "🦋 Fly action — Completed successfully" banner with raw artifact filenames (manifest.json, my-lib-1.0.0.tgz) and duplicates across all jobs.

After: Clean job-name header, logical package names with versions, deduplication, ecosystem grouping, and optional size column.

What changed

Template (templates/job-summary.md)

  • Removed the "🦋 Fly action" banner and butterfly emoji
  • Job summary title is now ## {GITHUB_JOB} (e.g. "Docker Release", "NPM Release")
  • Simplified footer — just a link to Fly, no horizontal rules

Artifact name resolution (src/artifact-path.ts — new)

Ported ExtractPackageAndVersion from fly-service's Go code to TypeScript. Parses Artifactory deployment paths to extract logical names:

Raw name Path Resolved
my-lib-1.0.0.tgz my-lib/-/my-lib-1.0.0.tgz my-lib @ 1.0.0
manifest.json myorg/api/v2.0.0/manifest.json myorg/api @ v2.0.0
manifest.json myorg/api/sha256:abc/manifest.json (filtered out — digest)
app-1.0.jar com/example/app/1.0/app-1.0.jar app @ 1.0

Deduplication and grouping (src/job-summary.ts)

  • Deduplicates by (type, name, version) — Docker manifests that appear multiple times collapse to one row
  • Sorts by ecosystem (npm → docker → maven → pypi → ...)
  • Size column shown conditionally when at least one artifact has size data (new backend field); omitted entirely for backward compat

Types (src/types.ts)

  • CollectedArtifact extended with optional timestamp and size fields matching the new backend response

Notes

  • Companion PR in fly-service provides per-job filtering and the new metadata fields
  • 23 unit tests for artifact-path.ts covering all ecosystems and edge cases
  • All 223 tests pass

Replaces the noisy "Fly action" banner with a clean job-name header
(from GITHUB_JOB). Resolves raw artifact filenames into logical package
names and versions by porting the Go path parser to TypeScript.
Deduplicates artifacts and groups by ecosystem.

Adds an optional Size column when the backend provides artifact sizes,
and conditionally omits it for backward compatibility with older data.
…back

In CI, GITHUB_JOB is set to the actual job name (e.g. "unit-tests"),
so the "CI Job" fallback is never used. Match the ## header pattern
instead of a specific string.
@github-actions
Copy link
Copy Markdown
Contributor

👍 Frogbot scanned this pull request and did not find any new security issues.


Copy link
Copy Markdown
Collaborator

@sverdlov93 sverdlov93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — fly-action PR #43

Nice cleanup — the job summaries will be much more useful with logical names, dedup, and per-job filtering. The TS port of artifact_path.go is faithful (verified all 7 parsers against the Go source). Tests are comprehensive (23 for artifact-path, good coverage in job-summary.spec). A few items below.

Port correctness: All parsers (npm, docker, maven, pypi, nuget, generic) match the Go source in fly-service/internal/graphql/artifactpath/artifact_path.go. Edge cases (scoped npm, sha256 digests, maven metadata, flat nuget filenames) are all handled identically.

Comment thread src/job-summary.ts
Comment thread src/job-summary.ts
Comment thread src/job-summary.ts
Comment thread src/e2e/action-lifecycle.e2e.spec.ts Outdated
…e assertion

- DRY: buildArtifactsTable now calls resolveAndDedup instead of
  reimplementing resolve+filter+dedup inline.
- Edge case: show "No displayable artifacts" message when all artifacts
  are filtered out (e.g. digest-only Docker pushes) instead of silently
  omitting the section.
- E2e: replace loose regex with dynamic GITHUB_JOB assertion to validate
  template substitution end-to-end.
@omerzi omerzi merged commit 280f3de into main Apr 15, 2026
6 of 7 checks passed
igalsi-t added a commit that referenced this pull request Apr 16, 2026
Integrate buildArtifactsTable, formatSize, and template simplification
from #43 alongside the distribute feature additions.

Made-with: Cursor
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