* fix(service update): Retry an update in case of a conflict.
Is related to #224 and should fix one flake.
* chore(service): Fixed retry-loop for kn service create/update
* fix(service): Pick up new field Address instead of Domain when listing service
Starting with 0.7.0 old fields are not populated anymore. Let's switch to the new fields then.
This fix should work with 0.6.0, too as the new fields already have been populated back then.
So we can unconditionally pick status.address.url which is accordance with
our policy to support the latest release and the release before.
Fixes#246.
* fix(service list): Use status.URL instead of status.Address in column
* chore: Rebase and update changelog
* chore: Rebase and test fix
* Adds Github issue and pull request templates
We might need to add few labels for knative/client repo as mentioned
in the template.
* Adds nightly build reference and swap client and serving section
* Asks user to paste output of kn version in bug report template
This puts all the console output to the command, where it belongs too.
One could add a ProgressHandler for more fine granular feedback (like suggested in #234) but for now this is not needed.
* fix(serving): Remove hardcoded GVK and look it up from schema
Fixes#133.
* chore(serving): Add test for "WaitForService()"
* refactor(service): Add listRoutes() to client + generic way for list options
* chore(serving): Fixing rebase conflicts
(and gofmt if goimports isn't available)
- Runs goimports on all packages except vendor dir and filter on only *.go files
- Runs gofmt on all dirs except vendor and filters on *.go files, also writes the results instead of printing diff
- Fixes typo s/insteat/insead
- Adds the changes after adding simply code step in hack/build.sh
- Uses source_dir var specifying the dirs to work on
- Combines gofmt commands into single command
* Adds custom comparison for checking multiple substrings
This changeset introduces custom comparison for checking if a target
string has given multiple substrings, namely `ContainsMultipleSubstrings`.
Also removes `commands.TestContains` function and replaces all references
of `commands.TestContains` with `gotest.tools/assert.Check` function and
uses `ContainsMultipleSubstrings` as comparison function.
* Renames and makes the compare function variadic
New name: ContainsAll
New location: pkg/util/compare.go
Also the function now takes target string as first arg,
and accepts any number of substrings to check.
Removed the message arg, the compare function composes the error message.
For eg:
```
Actual output: foo-abcd foo <unknown> 0 OK / 0 <unknown> <unknown>
Missing strings: foo-abcd1, foo1
```
* Adds tests for compare utility ContainsAll
* Update vendor/modules.txt
Explores all sub-commands from root and adds a RunE for all
commands that are groups with child commands and without a RunE.
The added RunE will return the correct errors when the command
is called with empty sub-command or with an unknown sub-command.
It will also print the command help message first.
Added a gotest.tools test for root.go.
* fix(servicing): Fix logic 'service create --force' and some bogus tests
Now a more meaningful error is returned when the user tries to create
a service that already exists. Until know the service is tried
to be created even if the client already knows that it exists.
Also some broken (broken in the sense that the test was nonsense) tests has been fixed.
* chore(serving): Use constant instead of string lateral in test
- Accepts an argument name for listing particular route
- Enables the machine readable output flags
- Updates docs for kn route command group
- Adds unit tests for route command group and route list
- Adds integration tests for route list in basic workflow test
- Updates tests and getting namespace
- Adds more unit tests for code in pkg/kn/commands/route/list_flags.go
- Adds route list command in smoke tests
- Updates vendor/modules.txt
- Clean up imports
- Addresses review comments
- replaces knative to Knative
- uses reflect.DeepEqual for slice comparison
- removes few code comments
- removes irrelevant tests modifications from the PR
* Removes pausing between e2e smoke tests
Removes time.Sleep as by default service create waits for it to
become ready. Also adds a command to create service in --async mode.
* Checks if service create in async mode is ready
also describes the async mode service and finally deletes it
* Adds kn revision delete command
* Adds unit tests for revision delete command
* Adds integration tests for revision delete command
Added revision delete command tests in new workflow namely
TestRevisionWorkflow.
* Removes extra line and renames an import alias
* Adds 10 seconds sleep between service create and revision delete
Also adds check for 'No resources found' while grabbing revision name.
* Clean up imports
* Removes the pause after service create
* Updates testing output strings in unit and e2e
* Updates post goimports on hack and test dirs
* feat(build.sh): Enable goimports for cleanup imports + cleanup imports
Much like 'go fmt' for cleaning up go source, 'goimports' can help
in properly formatting and grouping imports. See https://goinbigdata.com/goimports-vs-gofmt/
for a quick overview.
This commit also cleansup imports on existing files.
* fix(build): Add missing space for output on iterm
* chore(build): Merged gofmt and goimports
And changed order so that formatting and import reordering comes
before compiling and testing
* feat(service create): Added --no-wait and --wait-timeout
By default, `kn service create` blocks until the service is either
created or an error occured during service creation.
With the option --no-wait the behaviour can be switched to an
async mode so that that kn returns immediately after the service is
created without waiting for a successful Ready status condition.
The timeout for how long to wait can be configured with --wait-timeout
If a timeout occur, that doesn't mean that the service is not created,
but the wait just returns. The default value is 60 seconds.
In wait mode, print out the service URL as a last line (so that it can be used together with `tail -1`) to extract the service URL after the service is created.
Fixes#54
* chore(service create): Tolerate if obeservedGeneration has not been set yet during startup
* chore(service create): Refactored based on review comments
* Introduced an --async flag (replacing --wait and --no-wait)
* Added proper retry handling on the list watch
* Updated help message
* chore(service wait): Added a new test for sync behaviour
* fix(build.sh): Cosmetic spacing fix
Iterm has an issue with rendering multi byte unicode chars. This
commit adds an extra space to certain emojis on iterm only.
This fixes current rendering issues on Linux term because that extra
space was added previously unconditionally.
* fix(build.sh): Avoid uninitialized variable ITERM_PROFILE
* Set current namespace from kubeconfig by default
Currently kn command does not pick up namespace from kubeconfig but
hardcorded default namespace.
This patch fixes to get namespace from kubeconfig.
Fixes https://github.com/knative/client/issues/7
* Use NamespaceFactory to get current namespace
* Update unit tests
* Add nil check for ClientConfig
* Lists revisions for a given service
Fixes#127
* Adds unit tests for listing revisions of a service
* Adds integration tests for listing revisions of a service
* Updates docs for listing revisions of a service
* Updates vendor/modules.txt
1. creates a namespace 'kne2etests' (default name, change with env KN_E2E_NAMESPACE)
2. executes kn commands as per Basic workflow doc in said namespace
3. verifies each command's output
4. deletes the 'kne2etests' namespace
While working with `build.sh --watch` it turned out the underlying
tool xnotify is not matured enough:
* It doesn't work when IntelliJ IDEA changes a file
* It can't deal with ignoring newly generated temp files (like .swp for vi)
This commit exchanges xnotify with fswatch which is much more matured.
* fix(e2e): Use build.sh for compiling
Fixes#174.
* Update test/e2e-tests.sh
Co-Authored-By: Adriano Cunha <35786489+adrcunha@users.noreply.github.com>
* Remove unused `--config` option
Currently `--config` option in kn command is not used from anywhere.
This patch removes the option from the command.
* update auto gen files
* Update deps by hack/update-deps.sh
* it will make easy to access docs from single directory, it will also help in case if we create github pages for the same
* fixed links from README.md
rebased and addressed comments
Autoscaler concurrency annotations are added to the revision template if
--min-scale / --max-scale / --concurrency-target/--concurrency-limit
are provided to `kn service create` and `kn service update`
Fixes#151
This features uses and requires https://github.com/AgentCosmic/xnotify
and should work on any platform
Use it with
* Watch & compile: build.sh --watch
* Watch, compile, test: build.sh --watch --test
* Watch, compile, test & verbose output: build.sh --watch --test --verbose
(shortcuts -w && -t can be used, too)