Skip to content

Commit b255356

Browse files
authored
Merge pull request #98 from dart-lang/merge-appengine-package
transfer package:appengine
2 parents 4d6251e + 5216af1 commit b255356

File tree

878 files changed

+231583
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

878 files changed

+231583
-0
lines changed

.github/ISSUE_TEMPLATE/appengine.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
name: "package:gcloud"
3+
about: "Create a bug or file a feature request against package:gcloud."
4+
labels: "package:gcloud"
5+
---

.github/labeler.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
- changed-files:
55
- any-glob-to-any-file: '.github/**'
66

7+
'package:appengine':
8+
- changed-files:
9+
- any-glob-to-any-file: 'pkgs/appengine/**'
10+
11+
'package:gcloud':
12+
- changed-files:
13+
- any-glob-to-any-file: 'pkgs/gcloud/**'
14+
715
'package:native_synchronization':
816
- changed-files:
917
- any-glob-to-any-file: 'pkgs/native_synchronization/**'

.github/workflows/appengine.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: package:appengine
2+
permissions: read-all
3+
4+
on:
5+
pull_request:
6+
branches: [ main ]
7+
paths:
8+
- '.github/workflows/appengine.yml'
9+
- 'pkgs/appengine/**'
10+
push:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/appengine.yml'
14+
- 'pkgs/appengine/**'
15+
schedule:
16+
- cron: '0 0 * * 0' # weekly
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
working-directory: pkgs/appengine
24+
25+
steps:
26+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
27+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
28+
29+
- name: Install dependencies
30+
run: dart pub get
31+
32+
# Disabled - this would format ~492 files.
33+
# - name: Verify formatting
34+
# run: dart format --output=none --set-exit-if-changed .
35+
36+
- name: Analyze project source
37+
run: dart analyze --fatal-infos
38+
39+
- name: Run tests
40+
run: dart test

pkgs/appengine/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.dart_tool
2+
.packages
3+
.pub/
4+
pubspec.lock
5+
tmp/

pkgs/appengine/.test_config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"test_package": {
3+
"platforms" : ["vm"]
4+
}
5+
}

pkgs/appengine/AUTHORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Below is a list of people and organizations that have contributed
2+
# to the Dart project. Names should be added to the list like so:
3+
#
4+
# Name/Organization <email address>
5+
6+
Google Inc.

pkgs/appengine/CHANGELOG.md

Lines changed: 313 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,313 @@
1+
## 0.13.9-wip
2+
3+
* Update the pubspec repository field to reflect the new repo location.
4+
5+
## 0.13.8
6+
7+
* Require `package:protobuf` ^3.1.0.
8+
9+
## 0.13.7
10+
11+
* Widen dependency constraint on `package:http`.
12+
13+
## 0.13.6
14+
15+
* Require Dart 2.19.
16+
* Setup `dbService` to do retries for failed requests.
17+
18+
## 0.13.5
19+
20+
* Added topics to `pubspec.yaml`.
21+
22+
## 0.13.4
23+
24+
* Implement `onConnectionStateChanged` to sync `grpc: 3.1.0`
25+
26+
## 0.13.3
27+
28+
* Populate the pubspec `repository` field.
29+
* Update the readme to add experimental verbiage.
30+
31+
## 0.13.2
32+
* Gracefully handle cases where logging fails.
33+
34+
## 0.13.1
35+
* Fix dependency on `package:gcloud` to version `0.8.0`.
36+
37+
## 0.13.0
38+
**WARNING**: Version `0.13.0` is broken, use `0.13.1`.
39+
40+
* Migrated to _null-safety_ and `package:gcloud` version `0.8.0`.
41+
42+
## 0.12.1
43+
* Setup default `authClient` in `package:gcloud`, fixing regression from
44+
introduction of _Application Default Credentials_ in `0.12.0`.
45+
46+
## 0.12.0
47+
* **Breaking**, now using the environment variable `GOOGLE_CLOUD_PROJECT`
48+
instead of `GCLOUD_PROJECT` for project name.
49+
* **Breaking**, now using
50+
[Application Default Credentials](https://cloud.google.com/docs/authentication/production)
51+
instead of using the environment variable `GCLOUD_KEY`.
52+
This allows authentication by specifying an _exported service account key_
53+
in `GOOGLE_APPLICATION_CREDENTIALS`, or running
54+
`gcloud auth application-default login` on your local machine.
55+
56+
## 0.11.0
57+
58+
* Upgrade `gcloud` to `0.7.0` with breaking changes in datastore keys.
59+
60+
## 0.10.5
61+
62+
* Handle duplicate `user-agent` headers.
63+
64+
## 0.10.4
65+
66+
* Added `Logging.reportError` to the `logging interface, for reporting errors
67+
to [Stackdriver Error Reporting](https://cloud.google.com/error-reporting/)
68+
when running in AppEngine.
69+
* Report errors logged through the `package:logging` adapter to
70+
`Logging.reportError` (for reporting to Stackdriver Error Reporting).
71+
* Updated protobuf source files.
72+
* Reduced number of unnecessarily generated protos.
73+
74+
## 0.10.3
75+
76+
* Update Protobuf to v1.0.0
77+
* Add client library identification header
78+
* Fix `grpc/datastore` tests
79+
80+
## 0.10.2
81+
82+
* Update gRPC version dependency
83+
84+
## 0.10.1
85+
86+
* Update gRPC API protos
87+
88+
## 0.10.0
89+
90+
* Revert `0.9.0`
91+
92+
## 0.9.0
93+
94+
* Instantiate new `DatastoreDB` instances for each request.
95+
96+
## 0.8.1
97+
98+
* Detect dev mode when running behind a proxy.
99+
100+
## 0.8.0
101+
102+
* Add `applicationContext` getter to `ClientContext`
103+
104+
## 0.7.3
105+
106+
* Add `onAcceptingConnections` callback to `runAppEngine()`
107+
108+
## 0.7.2
109+
110+
* Update the generated protobufs.
111+
112+
## 0.7.1
113+
114+
* Update to use `package:grpc` version 2.0
115+
116+
## 0.7.0
117+
118+
* Refactored to use `package:grpc` to talk to Logging and Datastore backends.
119+
120+
## 0.6.1
121+
122+
* Added `isCronJonRequest` as a helper method for determining if a request
123+
originates from the AppEngine cronjob scheduler.
124+
125+
## 0.6.0
126+
127+
**Breaking changes:**
128+
* Removed poorly documented assets support with broken tests.
129+
* Removed memcache as the service was never made it past alpha.
130+
131+
Users of memcache should consider using
132+
[Cloud Memorystore](https://cloud.google.com/memorystore/) instead. This comes
133+
with a redis interface for which there are multiple packages available on pub.
134+
Serving assets is just a matter of sending a file from disk. This is easy to do
135+
without the logic that this package used to contain.
136+
137+
## 0.5.1+1
138+
139+
* Support latest `pkg:http` and `pkg:http2`.
140+
141+
## 0.5.1
142+
143+
* Correct root path for serving assets.
144+
145+
## 0.5.0
146+
147+
* Support for Dart 2.0 constants and updated gcloud.
148+
149+
## 0.4.4+2
150+
151+
* Fix race condition in gRPC client between `http2Connection.isOpen` and
152+
`http2Connection.makeRequest`.
153+
154+
## 0.4.4+1
155+
156+
* Delay http/2 connection dialer by 20 ms to give client enough time to receive
157+
server settings.
158+
159+
## 0.4.4
160+
161+
* Improve output logging when memcache connections fail.
162+
* Fix Dart 2 runtime issues.
163+
164+
## 0.4.3+1
165+
166+
* When logging requests, the `appengine.googleapis.com/trace_id` label
167+
is populated.
168+
169+
## 0.4.3
170+
171+
* When logging, the following `protoPayload` values are now populated:
172+
* `instanceId`
173+
* `referrer`
174+
* `traceId` via the `X-Cloud-Trace-Context` request header.
175+
176+
* The `appengine.googleapis.com/instance_name` label is also populated for
177+
all log entries.
178+
179+
* `traceId` was also added to the `ClientContext` class.
180+
181+
## 0.4.2
182+
183+
* Add support for connecting to memcache instance defined by environment
184+
variables `GAE_MEMCACHE_HOST` and `GAE_MEMCACHE_PORT`.
185+
186+
## 0.4.1
187+
188+
* Add `shared` option to `runAppEngine` to enable multi-threaded operation
189+
with isolates.
190+
191+
## 0.4.0+3
192+
193+
* Fix an issue where models with un-indexed list properties could not be
194+
committed.
195+
196+
## 0.4.0+2
197+
198+
* Be less verbose in request logs printed during local development
199+
200+
## 0.4.0
201+
202+
Switch from Managed VMs to Flexible environment:
203+
204+
* Removed `UsersService` api.
205+
* Removed `ModulesService` api.
206+
* Removed `RemoteApi` api (was already deprecated).
207+
* Introduce new GCLOUD\_PROJECT and GCLOUD\_KEY environment variables.
208+
* Remove STORAGE\_SERVICE\_ACCOUNT\_FILE environment variable.
209+
* To prevent duplicate logging of errors, `runAppEngine` will no longer log
210+
request-specific errors on stdout if they got already logged via the
211+
request-specific log.
212+
213+
## 0.3.3+1
214+
215+
* Support `gcloud` package version `0.3.0`.
216+
217+
## 0.3.3
218+
219+
* Work around dev\_appserver.py issue (it doesn't drain stdout we therefore avoid
220+
printing anything).
221+
222+
## 0.3.2
223+
224+
* Require `protobuf` package `^0.5.0`
225+
* Support the lastest release of `fixnum` package.
226+
227+
## 0.3.1+1
228+
229+
* Improved output of `Logger.root` with `useLoggingPackageAdaptor`.
230+
231+
## 0.3.1
232+
233+
* Added optional `port` argument to `runAppEngine`.
234+
* Removed the call to `/bin/hostname`.
235+
236+
## 0.3.0+1
237+
238+
* Widen dependency constraint on `package:logging`.
239+
240+
## 0.3.0
241+
242+
* Pass the memcache expiration time to the memcache service. Before the
243+
expiration argument to Memcache.set and Memcache.setAll was ignored.
244+
245+
* Removed the expiration argument to Memcache.clear. It is not supported by
246+
the App Engine memcache API.
247+
248+
## 0.2.6+3
249+
250+
* Update dependencies to allow gcloud 0.2.0 with Cloud Pub/Sub support.
251+
252+
## 0.2.6+2
253+
254+
* Do not close `authClient`, since `registerStorageService` does it
255+
automatically.
256+
257+
## 0.2.6+1
258+
259+
* Correctly handling `x-appengine-https` header.
260+
* Turn logging of for Level.OFF
261+
262+
## 0.2.6
263+
264+
* Added adaptor for `package:logging` via `useLoggingPackageAdaptor()`.
265+
* Added workaround for incorrect `requestedUri` comming from 'dart:io'.
266+
267+
## 0.2.5
268+
269+
* Added withAppEngineServices() function which allows running arbitrary code
270+
using AppEngine services via a service scope.
271+
272+
## 0.2.4+1
273+
274+
* Change the service scope keys keys to non-private symbols.
275+
276+
## 0.2.4
277+
278+
* Run request handlers inside a service scope
279+
(see `package:gcloud/service_scope.dart`).
280+
* Insert an authenticated HTTP client into the service scope.
281+
* Insert a `memcacheService` into the service scope.
282+
* Added `isDevelopmentServer` and `isProductionEnvironment` getter to client
283+
context.
284+
* Make hostnames returned from modules service use -dot- naming to support
285+
HTTPS.
286+
* Mark `package:appengine/remote_api.dart` as deprecated.
287+
288+
## 0.2.3
289+
290+
* Small bugfix in the lowlevel memcache API implementation.
291+
292+
## 0.2.2
293+
294+
* Updated `README.md`
295+
* Widen googleapis_auth constraint to include version 0.2.0
296+
297+
## 0.2.1
298+
299+
* Small bugfix in storage API implementation
300+
* respect DART_PUB_SERVE url only in developer mode
301+
* sync db/datastore tests to the ones used in gcloud
302+
303+
## 0.2.0
304+
305+
* Use datastore/db APIs from package:gcloud
306+
* simplified annotation system
307+
* paging-based query API
308+
* Added module service
309+
* Some bugfixes
310+
311+
## 0.1.0
312+
313+
* Alpha release

0 commit comments

Comments
 (0)