Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1823362

Summary: The new label is not getting overwritten in the output image.
Product: OpenShift Container Platform Reporter: Abhishek <aabhishe>
Component: BuildAssignee: Adam Kaplan <adam.kaplan>
Status: CLOSED DUPLICATE QA Contact: wewang <wewang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3.zCC: aos-bugs, wzheng
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-13 15:04:39 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:

Description Abhishek 2020-04-13 13:12:46 UTC
Description of problem: The new label  is not getting overwritten in the output image 
Ref: https://github.com/openshift/source-to-image/blob/master/docs/new_labels.md


Version-Release number of selected component (if applicable):
OCP 4.3

How reproducible:
Always

Steps to Reproduce:
1. oc new-app centos/python-36-centos7:latest~https://github.com/jupyter-on-openshift/jupyterhub-quickstart.git

2. oc describe istag jupyterhub-quickstart:latest | grep -i scripts-url


Actual results:

$ oc describe istag jupyterhub-quickstart:latest | grep -i scripts-url
		io.openshift.s2i.scripts-url=image:///usr/libexec/s2i
		io.s2i.scripts-url=image:///usr/libexec/s2i

Expected results:

$ oc describe istag jupyterhub-quickstart:latest | grep -i scripts-url
		io.openshift.s2i.scripts-url=image:///opt/app-root/builder
		io.s2i.scripts-url=image:///usr/libexec/s2i


Additional info:
This is working fine in OCP 3.11 environment.

Comment 1 Adam Kaplan 2020-04-13 15:04:39 UTC
Unfortunately this behavior is a change from 3.11 to 4.x. We currently do not support using the image_metadata.json to update labels at build time. The best alternative is to set the outputLabels on the `BuildConfig` spec [1].

We would be willing to consider restoring this behavior as an RFE.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1758305#c20

*** This bug has been marked as a duplicate of bug 1758305 ***