Bug 1781827

Summary: Only the first occurrence of a console log link variable gets replaced
Product: OpenShift Container Platform Reporter: Samuel Padgett <spadgett>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: aos-bugs, jokerman, xiaocwan
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, OpenShift console would only replace the first occurrence of a variable in ConsoleExternalLogLink URL templates. Console now correctly replaces every instance of the variable in the template with the correct value.
Story Points: ---
Clone Of:
: 1782873 1783312 (view as bug list) Environment:
Version: 4.3.0-0.nightly-2019-12-09-035405 Cluster ID: bfecd802-f81b-4cbb-b826-7d1b216d9eb0 Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:71.0) Gecko/20100101 Firefox/71.0
Last Closed: 2020-05-13 21:54:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1782873, 1783312    

Description Samuel Padgett 2019-12-10 16:29:44 UTC
Console log links with multiple occurrences of the same variable expression aren't handled correctly. Only the first expression is replaced. Console should replace all occurrences.

Comment 1 Samuel Padgett 2019-12-10 16:31:19 UTC
https://github.com/openshift/console/pull/3745

Comment 3 XiaochuanWang 2019-12-18 02:07:12 UTC
Using the below url:
``` 
  hrefTemplate: >-
    https://example.com/logs?resourceName=${resourceName}&containerName=${containerName}&Namespace=${resourceNamespace}&resourceNamespace=${resourceNamespace}&podLabels=${podLabels}
  text: Example Logs
```
Test on 4.4.0-0.nightly-2019-12-16-124946 and it does not reproduce. This could be Verified.

Comment 5 errata-xmlrpc 2020-05-13 21:54:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0581