backstage-plugins icon indicating copy to clipboard operation
backstage-plugins copied to clipboard

[Bug]: harness.io/project-url has to end with / or the plugin doesn't work

Open OrkoHunter opened this issue 2 years ago • 2 comments

Expected Behavior

If I set a harness.io/project-url like https://app.harness.io/ng/#/account/accountID/cd/orgs/orgId/projects/projectId it should work.

Actual behavior

Plugin says no pipelines found.

Possible Implementation

https://github.com/harness/backstage-plugins/blob/666d1e859bf393d910361f6d6b347a8455527924/plugins/harness-ci-cd/src/components/ExecutionList/useProjectSlugEntity.tsx#LL16C50-L16C58

This regex should be updated. It expects a trailing /.

Either we append a trailing / when parsing the annotation ourselves in code. Or we update the regex to ignore the /.

cc @SarvJ1 @sarthakkasat @Debanitrkl @sandeepa-kv-jois

OrkoHunter avatar Feb 12 '23 10:02 OrkoHunter

I have tried to replicate the same, using this catalog where the URL doesn't have the trailing / and it works fine.

Debanitrkl avatar Feb 13 '23 07:02 Debanitrkl

Oh, interesting. Didn't expect it to be a one off glitch.

OrkoHunter avatar Feb 13 '23 08:02 OrkoHunter