Skip to content

lock-to-digest help text default is backwards and doesn't seem to work #1329

@duglin

Description

@duglin

service create help text:

      --lock-to-digest                    Keep the running image for the
                                          service constant when not
                                          explicitly specifying the image.
                                          (--no-lock-to-digest pulls the
                                          image tag afresh with each new
                                          revision) (default true)

Script:

$ cat bug
#!/bin/bash
./kn service create echo --image duglin/echo | tee out
URL=$(tail -1 out) ; rm out
curl $URL
read a # rebuild duglin/echo
./kn service update echo --image duglin/echo
curl $URL
echo should show new output
./kn service delete echo

HEAD output:

$ ./bug
Creating service 'echo' in namespace 'default':

  0.114s The Configuration is still working to reflect the latest desired specification.
  0.274s The Route is still working to reflect the latest desired specification.
  0.382s Configuration "echo" is waiting for a Revision to become ready.
  5.122s ...
  5.450s Ingress has not yet been reconciled.
  5.501s Waiting for load balancer to be ready
  5.724s Ready to serve.

Service 'echo' created to latest revision 'echo-wgjsy-1' is available at URL:
http://echo-default.kndev.us-south.containers.appdomain.cloud
Hi from echo (host: echo-wgjsy-1-deployment-7df68685bf-p9db5 rev: echo-wgjsy-1)

Updating Service 'echo' in namespace 'default':

  0.089s The Configuration is still working to reflect the latest desired specification.
  7.540s Traffic is not yet migrated to the latest revision.
  7.642s Ingress has not yet been reconciled.
  7.765s Waiting for load balancer to be ready
  8.246s Ready to serve.

Service 'echo' updated to latest revision 'echo-hctnz-2' is available at URL:
http://echo-default.kndev.us-south.containers.appdomain.cloud
test (host: echo-hctnz-2-deployment-74bc67846c-rp9dx rev: echo-hctnz-2)
should show new output
Service 'echo' successfully deleted in namespace 'default'.

Notice it shows "test" as the output of the curl because it picked up a new "echo" image.

Which shows that the default is 'false' not 'true'. I believe these are the correct semantics so the help text needs to be updated with 'false' as the default value. I think "create" has the same backwards default value.

When I modify the script to include --lock-to-digest or --no-lock-to-digest on the create and update, it seems to have no effect on the output - in all cases the new image is downloaded each time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions