Skip to content
This repository was archived by the owner on Nov 16, 2020. It is now read-only.

Commit 2dbabfd

Browse files
authored
Merge pull request #496 from kars7e/release-1.16
Release 0.1.16
2 parents 9aac7f2 + 274476f commit 2dbabfd

File tree

2 files changed

+224
-3
lines changed

2 files changed

+224
-3
lines changed

CHANGELOG.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
All notable changes to this project will be documented in this file. For more information & examples, check
33
[What's New](https://vmware.github.io/dispatch/news) section on Dispatch website.
44

5-
## [Unreleased] - [[Git compare](https://github.com/vmware/dispatch/compare/v0.1.15...HEAD)]
5+
6+
## [Unreleased] - [[Git compare](https://github.com/vmware/dispatch/compare/v0.1.16...HEAD)]
7+
8+
## [0.1.16] - 2017-06-06 - [[Git compare](https://github.com/vmware/dispatch/compare/v0.1.15...v0.1.16)] [[What's new](https://vmware.github.io/dispatch/2018/06/06/v0-1-16-release.html)]
69

710
### Added
811
- [BREAKING CHANGE] **Support for contexts when working with Dispatch CLI.**
@@ -12,14 +15,28 @@ This change requires config file to be context-aware (old version of config won'
1215
When creating a function, user can now specify a timeout (in milliseconds).
1316
When executing a function, it will be terminated if takes longer than the specified timeout. Note that this is language-dependent (language pack must support timeout).
1417
[PR #487](https://github.com/vmware/dispatch/pull/487).
18+
- **CLI login now works with service accounts.**
19+
Previously, `dispatch login` command only worked with OIDC users (e.g. when authentication has been configured using GitHub auth provider).
20+
Now you can run `dispatch login --service-account test-svc-account --jwt-private-key <path-to-key-file>` and the auth data will be stored in the dispatch config file.
21+
there is also a corresponding `dispatch logout` command to clear the credentials. [PR #460](https://github.com/vmware/dispatch/pull/460).
22+
- **Batch resource creation now supports all resource types.**
23+
One of the handy features of Dispatch CLI is batch creation of resources, where user can specify multiple resources using YAML file, and then create them all
24+
using `dispatch create -f file.yaml` command. In this release, the batch file supports all resource types
25+
(previously event drivers, driver types, event subscriptions and APIs were missing). [PR #495](https://github.com/vmware/dispatch/pull/495/files).
1526

1627
### Fixed
1728
- [[Issue #472](https://github.com/vmware/dispatch/issues/472)] **Send empty response in API gateway when function does not return anything.**
1829
Previously, API gateway would return a complete output of function execution from function manager if function itself didn't return any content.
1930
This exposed a lot of arguably private information about the internal implementation of the function.
2031
From now on, the API gateway will return an empty response if function output is null. [PR #477](https://github.com/vmware/dispatch/pull/477).
21-
22-
32+
- [[Issue #486](https://github.com/vmware/dispatch/issues/486)] **Event Driver creation failed when secrets were used.**
33+
Previous release introduced a regression in event driver creation if driver was configured with secrets. It's now fixed.
34+
[PR #488](https://github.com/vmware/dispatch/pull/488).
35+
- [[Issue #485](https://github.com/vmware/dispatch/issues/485)] **Dispatch resources displayed incorrect timestamps.**
36+
The timestamps for Dispatch resources (functions, images, etc.) displayed incorrect dates, i.e. dates that did not correspond to the actual
37+
dates of creation/modification of resources. In this release, the dates should now be properly saved and displayed.
38+
NOTE: due the nature of this bug, only new deployments will notice the fix. [PR #494](https://github.com/vmware/dispatch/pull/494).
39+
2340
## [0.1.15] - 2017-05-24 - [[Git compare](https://github.com/vmware/dispatch/compare/v0.1.14...v0.1.15)] [[What's new](https://vmware.github.io/dispatch/2018/05/23/v0-1-15-release.html)]
2441

2542
### Added
Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
---
2+
layout: post
3+
title: "v0.1.16 Dispatch Release"
4+
year: 2018
5+
---
6+
7+
# v0.1.16 Dispatch Release
8+
9+
[Download v0.1.16](https://github.com/vmware/dispatch/releases/tag/v0.1.16)
10+
11+
12+
## Support for contexts when working with Dispatch CLI [Breaking change]
13+
After installing Dispatch, a config file `HOME/.dispatch/config.json` is generated to store details about the Dispatch deployment.
14+
This file includes information like Dispatch API URL, authentication details or organization name. Until recently
15+
this meant that if you wanted to connect to multiple Dispatch deployments, you had to maintain multiple config files and shuffle them around
16+
every time you wanted to change the current environment.
17+
18+
To make using multiple Dispatch deployments a little bit easier, in this release we introduce CLI contexts.
19+
CLI context is nothing more than a group of configuration options related to a particular Dispatch deployment.
20+
The `HOME/.dispatch/config.json` file can now store multiple contexts:
21+
22+
```json
23+
{
24+
"current": "dev",
25+
"contexts": {
26+
"dev": {
27+
"host": "dev.dispatch.example.com",
28+
"port": 443,
29+
"scheme": "",
30+
"organization": "dispatch",
31+
"cookie": "",
32+
"namespace": "dispatch"
33+
},
34+
"prod": {
35+
"host": "prod.dispatch.example.com",
36+
"port": 443,
37+
"scheme": "",
38+
"organization": "dispatch",
39+
"cookie": "",
40+
"namespace": "dispatch"
41+
}
42+
}
43+
}
44+
```
45+
46+
Dispatch CLI allows you to list them:
47+
48+
```shell
49+
$ dispatch manage context
50+
CONTEXT | CONFIG
51+
------------------------------------------------
52+
dev | {
53+
| "host": "dev.dispatch.example.com",
54+
| "port": 443,
55+
| "scheme": "",
56+
| "organization": "dispatch",
57+
| "cookie": "",
58+
| "namespace": "dispatch"
59+
| }
60+
* prod | {
61+
| "host": "prod.dispatch.example.com",
62+
| "port": 443,
63+
| "scheme": "",
64+
| "organization": "dispatch",
65+
| "cookie": "",
66+
| "namespace": "dispatch"
67+
| }
68+
```
69+
70+
and set the active context:
71+
```shell
72+
$ dispatch manage context --set dev
73+
Set context to dev
74+
75+
$ dispatch manage context
76+
CONTEXT | CONFIG
77+
------------------------------------------------
78+
* dev | {
79+
| "host": "dev.dispatch.example.com",
80+
| "port": 443,
81+
| "scheme": "",
82+
| "organization": "dispatch",
83+
| "cookie": "",
84+
| "namespace": "dispatch"
85+
| }
86+
prod | {
87+
| "host": "prod.dispatch.example.com",
88+
| "port": 443,
89+
| "scheme": "",
90+
| "organization": "dispatch",
91+
| "cookie": "",
92+
| "namespace": "dispatch"
93+
| }
94+
95+
```
96+
97+
**NOTE:** This change requires config file to be context-aware (old version of config won't work with new CLI, and vice-versa).
98+
99+
100+
## CLI login now works with service accounts
101+
Previously, `dispatch login` command only worked with OIDC users (e.g. when authentication has been configured using GitHub auth provider).
102+
Now you can run `dispatch login --service-account test-svc-account --jwt-private-key <path-to-key-file>` and the auth data will be stored in the dispatch config file.
103+
there is also a corresponding `dispatch logout` command to clear the credentials. Note that login takes your context into account and allows you to use
104+
different users for different environments.
105+
106+
107+
## Batch resource creation now supports all resource types
108+
One of the handy features of Dispatch CLI is batch creation of resources, where user can specify multiple resources using YAML file, and then create them all
109+
using `dispatch create -f file.yaml` command. In this release, the batch file supports all resource types (previously event drivers, driver types, event subscriptions and APIs were missing).
110+
111+
The following excerpt shows an example of a file that creates all currently supported resources:
112+
113+
```yaml
114+
kind: BaseImage
115+
name: nodejs-base
116+
dockerUrl: dispatchframework/nodejs-base:0.0.7
117+
language: nodejs
118+
tags:
119+
- key: role
120+
value: test
121+
---
122+
kind: Image
123+
name: nodejs
124+
baseImageName: nodejs-base
125+
tags:
126+
- key: role
127+
value: test
128+
---
129+
kind: Function
130+
name: hello-js
131+
sourcePath: 'nodejs/hello.js'
132+
image: nodejs
133+
schema:
134+
in:
135+
properties:
136+
name:
137+
minLength: 1
138+
pattern: "^[A-Za-z]+$"
139+
type: string
140+
place:
141+
minLength: 1
142+
pattern: "^[A-Za-z]+$"
143+
type: string
144+
required:
145+
- name
146+
out:
147+
properties:
148+
myField:
149+
type: string
150+
required:
151+
- myField
152+
tags:
153+
- key: role
154+
value: test
155+
---
156+
kind: Secret
157+
name: open-sesame
158+
secrets:
159+
password: OpenSesame
160+
tags:
161+
- key: role
162+
value: test
163+
---
164+
kind: API
165+
name: post-hello
166+
enabled: true
167+
function: hello-py
168+
methods:
169+
- POST
170+
protocols:
171+
- https
172+
uris:
173+
- /hello
174+
tags:
175+
- key: role
176+
value : test
177+
---
178+
kind: DriverType
179+
name: ticker
180+
image: kars7e/timer:latest
181+
tags:
182+
- key: role
183+
value : test
184+
---
185+
kind: Driver
186+
name: ticker
187+
type: ticker
188+
config:
189+
- key: seconds
190+
value: 2
191+
tags:
192+
- key: role
193+
value : test
194+
---
195+
kind: Subscription
196+
event-type: ticker.tick
197+
function: hello-py
198+
name: ticker-sub
199+
source-type: ticker
200+
tags:
201+
- key: role
202+
value : test
203+
---
204+
```

0 commit comments

Comments
 (0)