-
Task
-
Resolution: Obsolete
-
Minor
-
2.12.0.GA
-
False
-
False
-
Today there are 3 unique sync.sh scripts for the three sync processes for the:
- crw operator
- crw operator metadata
- crw operator bundle
But these refer to duplicate / non-duplicate copies of sync-che-operator-to-crw-operator.sh and sync-che-olm-to-crw-olm.sh
So... instead of having the bundle and metadata syncs depend on RUNNING the sync-che-operator script to convert code from upstream che-operator, we could use as input the code in https://github.com/redhat-developer/codeready-workspaces-images/tree/crw-2-rhel-8/codeready-workspaces-operator and assume it's already been correctly transformed, updated, and committed.
Then the sync scripts for the metadata and bundle would only need to run sync.sh and sync-che-olm-to-crw-olm.sh, which ought to be renamed to emphasize that they're doing different things.
But haha at myself, because codeready-workspaces-operator contains NONE of the code needed for the CSV; it's intentionally not there because it's going into a different container image (unlike in upstream where it's all mixed together with the go code).
Or the sync-olm code could be collapsed into the sync.sh wrapper.
Point is, it's grown to be a bit of a mess, and we need to clean it up so that we stop having problems where code is fixed in the wrong place (or only 1 of 3 places). See CRW-2303
Another approach could be to figure out WHY the operator sync is needed before doing the olm syncs, move those bits of logic over to the olm sync, and have only 3 files handle the 3 disparate sync/fork operations instead of 5.
But since operator needs to generate the manager.yaml for OCP 3.11 support, any time we have to add/remove something from the CSV (like in CRW-2180) we need to apply the same change in the operator and the two CSVs.
However, we could explore moving the parts that are different between the two sync-olm*sh scripts into separate scripts, so that the bulk of the code is identical and more easily maintained/diffed.
- relates to
-
CRW-2324 Operator container failed to start from "latest" operator channel: 'RELATED_IMAGE_gateway_authentication_sidecar'. Environment variable with default value was not found."
- Closed