Always check if devworkspace CRDs came from current upstream dependency#412
Conversation
|
@amisevsk: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
benoitf
left a comment
There was a problem hiding this comment.
I tested by checkouting v0.2.3 and using that version
then I switched to main branch
then I had
/go/pkg/mod/k8s.io/apimachinery@v0.18.8/pkg/util/wait/wait.go:90
2021-05-04T06:50:43.993Z INFO controllers.DevWorkspace Reconciling Workspace {"Request.Namespace": "default", "Request.Name": "theia-next", "devworkspace_id": ""}
2021-05-04T06:50:44.002Z ERROR controller Reconciler error {"reconcilerGroup": "workspace.devfile.io", "reconcilerKind": "DevWorkspace", "controller": "devworkspace", "name": "theia-next", "namespace": "default", "error": "DevWorkspace.workspace.devfile.io \"theia-next\" is invalid: status.workspaceId: Required value"}
error
then I switched to amisevsk:keep-crds-up-to-date branch
did make install
got warning
cat: /tmp/devworkspace-operator/deploy/templates/crd/bases/devfile_version: No such file or directory
but it worked
$ kubectl get dw --all-namespaces
NAMESPACE NAME DEVWORKSPACE ID PHASE INFO
default theia-next workspacef5cbd85232f04398 Running https://workspacef5cbd85232f04398-theia-3100.192.168.64.64.nip.io
thanks 👍
When fetching upstream devfile/api CRDs, store the DEVWORKSPACE_API_VERSION variable as a file in the directory. When using the _init_devworkspace_crds makefile target, check that the version matches so that CRDs are always up to date with the expected version. This avoids issues of requiring an `update_devworkspace_crds` invocation in already-cloned repos whenever the devfile/api dependency is updated. Signed-off-by: Angel Misevski <amisevsk@redhat.com>
5643ca9 to
fbccd35
Compare
|
New changes are detected. LGTM label has been removed. |
|
Force pushed to suppress the warning when the version file does not exist. |
|
/test v7-devworkspaces-operator-e2e, v7-devworkspace-happy-path |
|
/test v7-devworkspaces-operator-e2e |
Fix shellcheck warnings in generate-deployment.sh and update_devworkspace_crds.sh Signed-off-by: Angel Misevski <amisevsk@redhat.com>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: amisevsk, benoitf, JPinkney The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test v7-devworkspaces-operator-e2e |
|
Fixed(-ish) now. |
sleshchenko
left a comment
There was a problem hiding this comment.
I'm late to the party but LGTM
One thing I'm not sure about - maybe it would be a good idea if we even commit deploy/templates/crd/bases/devfile_version
The problem here is that |
What does this PR do?
Store current
devfile/apiversion in directory alongside devfile CRDs. When running the_init_devworkspace_crdsmakefile target, check against this version file and update CRDs if necessary.Incidentally, also deletes the old
ComponentsCRD file, which was left over from eclipse-che/che-operator#729What issues does this PR fix or reference?
Out-of-date CRDs in all local repos (have to run
make update_devworkspace_crds) whenever devfile/api version is bumped.Is it tested? How?
Run
make _init_devworkspace_crds; CRDs should be updated and hash should be stored indeploy/templates/crd/bases/devfile_version