* Pin pkg to release-0.18 version
* ./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh
* bump k8s version to 1.18.8
* Fix the brokerage of importing latest serving
* exclude script/test-infra md from md check
* feat: Add plugin listing to "kn --help"
This works on all levels. Test needs to be expanded still.
Fixes#266
* chore: Fix test
* Add test and ported #910 over.
* changelog update
* fix test
* Fix test
* fix integration tests
* fix test
* chore: Add some explanatory comments
* fix test
* Update unit test for invalid concurrency target value
* Vendor v0.16.0 eventing and serving
* Commit the LICENSES generated by hack/update-deps.sh
* Spare third_party dir from license check in hack/build.sh
* Update eventing and serving version for 'kn version'
* Use DeprecatedInjectionAnnotation key for backward compatibility
Fixes#918
Use DeprecatedInjectionAnnotation, i.e. "knative-eventing-injection"
for reconciling broker via namespace labeling and trigger annotations.
From eventing v0.16.0 release, this key is changed to "eventing.knative.dev/injection"
however, older eventing installation wont recognize it. So we continue
using the deprecated key until the sugar-controller would support reconciling
on either keys.
* Fix(kn version): Display eventing.knative.dev at v1beta1 version
We've been showing 'v1alpha1' in kn version while we actually
vendor and refer v1beta1 for eventing.knative.dev
* chore(e2e): Run tests against serving/eventing v0.16.0 release
* Update test for concurrency-target to expect new error message
the new error message for incorrect concurrency-target value contains "should be at least 0.01"
* Setup sugar-controller for released eventing version setup
- reuse knative_setup util from common lib for latest-release CI setup
* Fix typo in YAML URL and add subheader for sugar-controller install
* add kn export type
* add kn export type
* add kn export type
* Update pkg/apis/client/register.go
Co-authored-by: Matt Moore <mattmoor@vmware.com>
* e2e test for kn export type
* e2e test for kn export type
* add new type for kn export
* rebase
* rebase
Co-authored-by: Roland Huß <rhuss@redhat.com>
Co-authored-by: Matt Moore <mattmoor@vmware.com>
Co-authored-by: Roland Huß <roland@ro14nd.de>
* Refactor main flow, plugin and configuration handling
* The plugin handling has been moved out of the `KnDefaultCommand` constructor where it was executed as a side-effect. The original code from `kubectl` suffers from the same issue that plugin handling is not a top-level concern but was very likely introduced as an after-thought. Instead, the plugin handling is done now by a `PluginManager` which is explicitly called in `main()`.
* Configuration and bootstrap option handling is centralized in the package `option`. After the bootstrap happened, the content of the configuration file, as well as any other global configuration, can be obtained from methods on `config.GlobalConfig`. Also, all flag handling is delegated to cobra so that no own parsing is needed.
* Many of the logic in `pkg/kn/commands/plugin` for plugin management has been moved up to `pkg/kn/plugin` as this code is not only relevant for `plugin list` but also for the bootstrap process.
* fix: invalid subcommands will lead to a proper error message
* Update pkg/kn/config/types.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update pkg/kn/plugin/manager.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update hack/generate-docs.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update hack/generate-docs.go
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* chore: Add missing links
* chore: recert to shas in links in developer guide for now.
Co-authored-by: Navid Shaikh <nshaikh@redhat.com>
* Update go.mod to specify the module is go1.14
Thus the go commands will default to -mod=vendor
See: https://golang.org/doc/go1.14#go-command
* install goimports as a tool
* drop mod=vendor usage as that's the default with go1.14
* remove comment about using -mod=vendor
* Revert "drop mod=vendor usage as that's the default with go1.14"
This reverts commit 567004d404bb7ebd39ed527dc75759cfc7db672f.
* Revert "remove comment about using -mod=vendor"
This reverts commit 2a71393a2015c1539be1503e0c52cf64283e12d0.
* Revert "install goimports as a tool"
This reverts commit 9616d5e2d2ab0d61e8454b1ace057ec9712e182d.
* use go_run_tool to run goimports
* inline go_run_tool
* include required env var REPO_ROOT_DIR
* (refactor) address the e2e extract / refactor of issue #763
* various updates to address reviewers feedback
* renamed lib/test/integration to lib/test and package to test
* chore: Cleaned up README
This is just a start for reorganizing the client side documentation.
* chore: Add option to generate frontmatter to gendocs.
This is needed for latter inclusion in knative.dev. Related to #639.
This script is the hook that the bots key off of to float our dependencies forward via a PR each day that lets us determine whether things have broken via Prow. In our other repos, this generally lets us know about breaking changes across repos within 1 business day, and has proven valuable.
- `./hack/build.sh` performs usual flow of codegen, build and test
- `./hack/build.sh -x` only compiles cross platform
- Updates hack/build.sh help message to reflect this
* fix(version): Displays supported APIs and version
Fixes#404
```
./kn version
Version: v20191017-local-6328a73-dirty
Build Date: 2019-10-17 09:55:55
Git Revision: 6328a73
Supported APIs:
- serving.knative.dev/v1alpha1 (knative-serving v0.8.0)
```
* Removes ServingVersion feeding from ldflags
- hardcodes the supported APIs as they're supposed to be updated when we bump deps
* Fixes typo in e2e tests
* Uses array for deterministic order of printing supported APIs
* Renamed to --build-cross to --all (as we are not building a cross but all binaries. Could be renamed to --all-bin to be more clear)
* Fixed inclusion of external build-flags.sh script (which was broken when used build.sh with a symbolic label)
* Moved cross compiling to the end (to not interfer with --fast or --codegen)
* Aligned labels (to be short and concise)
Fixes#364
- Ensure kn cross platform build works in pre-submit tests
- Run ./hack/build.sh -x after running existing pre-submit tests
- defines a function post_build_tests to invoke cross platform builds
- post_build_tests will be run by test-infra after build tests are compelete
- Use `./hack/build.sh -x` or `./hack/build.sh --build-cross`
- Doesn't touch any of the existing flow, providing these options will build binaries and exit
* Update serving to 0.8. Try building.
* Find the right serving version
* Change our own import path to knative.dev to match
* Remove dependency on old version of client
* Update yaml template
* Add sleep to test to deal with race
* fix merge conflict
* Update vendor modules
* Check that every generated file has been regenerated for CI
* No color when not on a tty which is useful for build logs
* Always do updates when called without args
* Removed -u option and added -c for codegen only (dep update, docs gen, formatting, license check)
(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 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
* 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
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.
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)
Creates four subpackages for now:
1. kn/commands - inludes types.go for common
struct and other common files and misc commands
2. kn/commands/service - all 'kn service *' commands
3. kn/commands/revision - all 'kn revision *' commands
4. kn/core - contains the root.go and other top level
for code and testing
5. refactors:
a. split .../commons/human_readable_flags.go into three
b. modifies the HumanReadableFlags.ToPrinter to get pass
a function that sets the columns and fields
Had to refactor all tests to avoid cycles.
* feat(build.sh): Adding options and running tests
* Added running unit tests to the script
* Added options to support different development flows (see help message below)
* Allow symlinking to /usr/local/bin so that the script can be called from everywhere
Usage message:
Knative Client Build Script
Usage: hack/build.sh [... options ...]
with the following options:
-f --fast Only build (without formatting, testing, code generation)
-t --test Run tests even when used with --fast
-u --update Update dependencies
-h --help Display this help message
--verbose Verbose script output (set -x)
You can add a symbolic link to this build script into your PATH so that it can be
called from everywhere. E.g.:
ln -s .../hack/build.sh /usr/local/bin/kn_build.sh
Examples:
* Compile, format, tests, docs: build.sh
* Compile only: build.sh --fast
* Compile with tests: build.sh -f -t
* doc(build.sh): Added documentation for new build.sh options
* docs(build.sh): Cosmetic fixes
* docs(build.sh): Tiny documentation fix
* chore(build.sh): Another typo fix
* chore: Streamlined build.sh
* Merged generate-docs.sh into build.sh
* Split up into smaller functions
* Added serving dependency version to 'kn version' command
Not sure whether the latter is really useful (showing the serving dependency)
as this is might get confused with the knative version
installed on the cluster.
* chore: Fixed indentation