Skip to content

bug(lambda): Retain repository name when parsing unknown Git providers for artifact versions #6666

@zyzzmohit

Description

@zyzzmohit

What happened:

In pkg/app/piped/platformprovider/lambda/function.go, the FindArtifactVersions function looks at the Git URL to generate a commit hyperlink. If it encounters a Git host it doesn't explicitly recognize (like AWS CodeCommit or a self-hosted Git server), it falls back to a default: case where it zeroes out both the gitURL and the repoPath (repoPath = ""). This results in ArtifactVersion.Name being completely empty.

What you expected to happen:

While it makes sense for the gitURL hyperlink to be empty if the provider's web-viewer format is unknown, the parsed repoPath should NOT be zeroed out. Discarding it causes a completely blank artifact name/repository to be displayed in the PipeCD UI.

How to reproduce it:

Define a lambda source manifest where the git URL points to an unrecognized host (e.g., git: https://git.mycompany.com/my/repo.git). When viewing the deployment on the control-plane UI, the source artifact name displays as blank.

Environment:

  • piped version: master
  • control-plane version: master
  • Others: N/A

I am intending to submit a PR to safely retain the repoPath name for this :)

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions