Bug 2012766 - OC adm group sync generates an empty Item
Summary: OC adm group sync generates an empty Item
Keywords:
Status: CLOSED DUPLICATE of bug 1989391
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Maciej Szulik
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-11 09:01 UTC by Roman Hodain
Modified: 2024-12-20 21:21 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-11 11:57:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 6406751 0 None None None 2021-10-11 12:23:52 UTC

Description Roman Hodain 2021-10-11 09:01:51 UTC
Description of problem:
When using `oc adm group sync` into a YAML file. The tool generates an empty item to the YAML file that prevents successful parsing later on. The `ac apply -f` does not work properly with this data and ends with non 0 return code.

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

How reproducible:
    100%

Steps to Reproduce:
    1. oc adm groups sync my_ldap_group --sync-config=sync-config.yaml -o yaml

Actual results:
    apiVersion: user.openshift.io/v1
    items:
    - metadata:
        creationTimestamp: null
      users: null
    - apiVersion: user.openshift.io/v1
      kind: Group
      metadata:
        annotations:
          openshift.io/ldap.sync-time: ...
          openshift.io/ldap.uid: ...

Expected results:
    Missing the first item that contains only null values.

Additional info:
    I believe that this was introduced with Bug 1936904

Comment 1 Maciej Szulik 2021-10-11 11:57:38 UTC

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


Note You need to log in before you can comment on or make changes to this bug.