Compare commits

..
Author SHA1 Message Date
Eric Samelson 98c03bc8a2 Release 0.16.0 2020-06-25 09:29:20 -07:00
Eric Samelson 83ab2539c1 [ios][android] remove SDK 34 shell apps 2020-06-23 14:07:24 -07:00
Eric Samelson 064619e1ae [android] add SDK 38 shell tarball (#233) 2020-06-23 14:06:37 -07:00
Tomasz Sapeta b7fe01b758 [ios] Add shell tarballs for SDK38 (#231) 2020-06-23 14:08:43 +02:00
Dominik Sokal 6583b1a1db upgrade ioredis to 4.17.3 2020-06-22 15:00:42 +02:00
Dominik Sokal f24081cb91 Release 0.15.1 2020-06-22 13:45:27 +02:00
Dominik Sokal 4e719a200b update CHANGLEOG 2020-06-22 13:44:51 +02:00
Dominik Sokal 0b13494402 configure turtle to use the redis ca certificate (#232)
* add .vscode to gitignore

* configure turtle to use the redis ca certificate
2020-06-22 13:42:07 +02:00
Dominik Sokal 0ca26a40aa fix announcing supported sdk versions 2020-06-22 12:26:06 +02:00
Dominik Sokal f171913bac [circleci] bump yarn cache key 2020-06-18 15:32:41 +02:00
Dominik Sokal b47ee91117 update CHANGELOG.md 2020-06-02 14:06:05 +02:00
Dominik Sokal 77cb28ce66 Release 0.15.0 2020-06-02 14:04:22 +02:00
Dominik Sokal 7a2453cf53 upgrade @expo/xdl to 57.9.13 (to remove *.bak files from .ipa) 2020-06-02 14:01:11 +02:00
Charlie Cruzan 924908905f Update CHANGELOG.md 2020-05-14 10:17:23 -04:00
cruzach 798b4acca6 Release 0.14.12 2020-05-14 10:15:22 -04:00
cruzach 2303b44dd2 [ios] Update iOS custom client shell app 2020-05-13 09:27:17 -04:00
cruzach c204e0bef2 update CHANGELOG 2020-05-04 15:34:30 -04:00
cruzach 0918d8299e Release 0.14.11 2020-05-04 15:28:22 -04:00
cruzach 3543acfb26 [ios] Update sdk-37 shell app for 2.15.5 release 2020-05-04 14:49:41 -04:00
Wojciech Kozyra 42b6ff634c Release 0.14.10 2020-05-01 17:54:45 +02:00
Wojciech Kozyra fcd42b272f Update CHANGELOG 2020-05-01 17:54:09 +02:00
Wojciech Kozyra ecaef3a91d enable lean builds (#217) 2020-05-01 17:51:19 +02:00
Stanisław Chmiela 413e6a564d Cut 0.14.9 in CHANGELOG 2020-04-21 11:13:40 +02:00
Stanisław Chmiela ac27332151 Release 0.14.9 2020-04-21 11:12:24 +02:00
Stanisław Chmiela 72744f58ec [android] Build only the app artifact and not all available libraries (#214)
### Motivation and Context

I have noticed that not only the `app` project is being built on Turtle, but all the projects. (cross-posting from https://github.com/expo/expo-cli/pull/1937)

### Description

I've scoped the Gradle command to only build/assemble the `:app` project. It should be safe to do for all SDKs, since on all SDKs the app project was called `app`.

Published an alpha version of XDL to NPM, upgraded Turtle to it, deployed to staging and ran the build. It was over a minute faster than without this change ([new](https://staging.expo.io/dashboard/sjchmiela/builds/5c386cef-e808-49d3-91d8-9ce42af77c36) vs [old](https://staging.expo.io/dashboard/sjchmiela/builds/3d36340e-6ae1-4476-91cb-07d81f1edd1e)). (cross-posting from https://github.com/expo/expo-cli/pull/1937)
2020-04-21 11:11:52 +02:00
Stanisław Chmiela 96af4f753d Cut 0.14.8 in CHANGELOG 2020-04-20 16:48:54 +02:00
Stanisław Chmiela 4059c6f354 Release 0.14.8 2020-04-20 16:47:22 +02:00
Stanisław Chmiela b48f89054b Update XDL to remove check-dynamic-macros call (#212)
### Motivation and Context

See https://github.com/expo/expo-cli/pull/1933 and https://github.com/expo/expo/pull/7919.

### Description

Updates XDL so it includes change introduced in https://github.com/expo/expo-cli/pull/1933.
2020-04-20 16:46:35 +02:00
Stanisław Chmiela 7361f4af52 [changelog] Update changelog with 0.14.7 2020-04-20 12:40:16 +02:00
Stanisław Chmiela 41b48f0c66 Release 0.14.7 2020-04-20 12:39:17 +02:00
Stanisław Chmiela 56b3011d25 Remove secrets from SDK37 shell app, fix google-services.json handling (#209)
<!-- Thanks for contributing to _turtle_! Before you submit your pull request, please make sure to check the following boxes by putting an x in the [ ] (don't: [x ], [ x], do: [x]) -->

### Checklist
- [x] I've read the [Contribution Guidelines] (https://github.com/expo/turtle/blob/master/CONTRIBUTING.md).
- [x] I've updated the [CHANGELOG](https://github.com/expo/turtle/blob/master/CHANGELOG.md) if necessary.
- [x] I've ensured the unit and smoke tests are still passing - either by running `yarn test:unit` and `yarn test:smoke:[ios|android]` or by checking the appropriate CircleCI builds' statuses.
- [x] **I've manually tested whether the changes I made work as expected.**

### Motivation and Context

- `google-services.json` was being handled unintuitively, fixed with https://github.com/expo/expo-cli/pull/1897
- Expo Client's secrets were leaking in shell apps, fixed with https://github.com/expo/expo/pull/7768
- When deployed, fixes https://github.com/expo/expo/issues/7727.

### Description

XDL was modifying `google-services.json`, removing valid keys if the user doesn't provide the same, removed key in _some other place_ (see https://github.com/expo/expo/issues/7727#issuecomment-611544439). Fixed the change in XDL, upgraded to the fixed version here. Also removed secrets from the shell app.
2020-04-20 12:38:27 +02:00
Stanisław Chmiela ef6f9e3c5d Install only production dependencies in shell apps (#211)
<!-- Thanks for contributing to _turtle_! Before you submit your pull request, please make sure to check the following boxes by putting an x in the [ ] (don't: [x ], [ x], do: [x]) -->

### Checklist
- [x] I've read the [Contribution Guidelines](https://github.com/expo/turtle/blob/master/CONTRIBUTING.md).
- [x] I've updated the [CHANGELOG](https://github.com/expo/turtle/blob/master/CHANGELOG.md) if necessary.
- [x] I've ensured the unit and smoke tests are still passing - either by running `yarn test:unit` and `yarn test:smoke:[ios|android]` or by checking the appropriate CircleCI builds' statuses.
- [x] **I've manually tested whether the changes I made work as expected.**

### Motivation and Context

The build process doesn't use any of the `devDependencies` of shell apps and installing them makes the process slower and using more memory.

### Description

Added the `--production` flag to dependencies installer happening inside shell apps so it installs only the real dependencies of the project. This omits dependencies like:
- `babel-core`, `prettier`, `eslint` — we won't transpile, analyze, prettify JS when building the project,
- `expo-cli` — we could use `expo-cli` when building the project, but we don't (`expotools` are used and they are installed in the shell app)
- `expo-yarn-workspaces` — the `--ignore-scripts` removes the need for `expo-yarn-workspaces`

### Test plan

I have tested these changes as part of https://github.com/expo/turtle/pull/209. I have built two apps on SDK37 and both were built successfully.
2020-04-20 10:33:49 +02:00
Stanisław Chmiela 0302a5f71b Revert "Install only production dependencies in shell apps when setting up CLI too"
This reverts commit abb604b3b5.
2020-04-20 10:26:16 +02:00
Stanisław Chmiela abb604b3b5 Install only production dependencies in shell apps when setting up CLI too 2020-04-20 09:41:27 +02:00
Wojciech Kozyra f87dcc6972 add --ignore-scripts to yarn install in shellapp 2020-04-09 16:37:56 +02:00
Dominik Sokal fb27531805 Release 0.14.6 2020-04-09 15:14:53 +02:00
Dominik Sokal b307e0ed7f update CHANGELOG 2020-04-09 15:13:56 +02:00
Wojciech Kozyra 9bfa7c5674 improve deployment speed for android workers (#205)
improve deployment speed for android workers
2020-04-09 13:43:45 +02:00
Dominik Sokal 0fcade4a1f include turtle mode in in-progress message (#206)
* send turtle mode in in-progress message

* update smoke test recordings
2020-04-09 10:20:56 +02:00
Dominik Sokal df4b38711a upgrade @expo/xdl to 57.8.17 to fix downloading assets smaller than 10 bytes (fixes expo/expo#7701) 2020-04-08 15:48:19 +02:00
dependabot[bot] a2b5aa2934 Bump acorn from 6.1.0 to 6.4.1 (#202)
Bumps [acorn](https://github.com/acornjs/acorn) from 6.1.0 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.1.0...6.4.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-04-08 10:13:07 +02:00
Dominik Sokal 556e0758e7 don't use nix for ios smoke tests 2020-04-07 10:22:28 +02:00
Dominik Sokal 762c6f0538 Release 0.14.5 2020-04-06 14:27:36 +02:00
Dominik Sokal f549695e07 [turtle-cli] make the @expo/config error more meaningful 2020-04-06 14:27:10 +02:00
Dominik Sokal 1e8868e190 Release 0.14.4 2020-04-06 13:25:00 +02:00
Dominik Sokal 93df019bbc update CHANGELOG 2020-04-06 13:24:20 +02:00
Dominik Sokal 5541daa6ec [turtle-cli] insatll @expo/config and use it for determining sdk version 2020-04-06 13:21:29 +02:00
Dominik Sokal 22d78bf6fc [circleci] update cache key for shell apps 2020-04-06 12:26:03 +02:00
Dominik Sokal 4c724289d7 install node deps in android shell app when running smoke tests 2020-04-06 12:25:46 +02:00
Dominik Sokal c5a44dfb67 [circleci] run ios smoke test for sdk37 2020-04-06 12:24:44 +02:00
Dominik Sokal 8bbdc55932 [android] update smoke tests recording file 2020-04-06 12:23:36 +02:00
Dominik Sokal 80233c5736 [ios] update smoke test recordings 2020-04-06 11:38:32 +02:00
Dominik Sokal 5a2b8c47f4 Release 0.14.3 2020-04-03 17:13:47 +02:00
Dominik Sokal ab9391d672 update CHANGELOG - change the version to 0.14.3 - I incidentally interrupted the release 2020-04-03 17:13:24 +02:00
Dominik Sokal e95a6f49ff Release 0.14.2 2020-04-03 17:11:15 +02:00
Dominik Sokal d662cd47b6 [android] update sdk37 tarball so it doesn't use jq internally (#201)
* [android] update sdk37 tarball so it doesn't use jq internally

* [android] update sdk37 tarball again

* update CHANGELOG
2020-04-03 17:10:19 +02:00
Eric Samelson ce5de0963b Release 0.14.1 2020-04-01 14:16:42 -07:00
Eric Samelson 8f717c6c2e update CHANGELOG 2020-04-01 14:16:29 -07:00
Eric Samelson 905b55b7a4 [ios] update SDK 37 shell tarball to properly exclude unnecessary unimodules 2020-04-01 12:21:38 -07:00
Eric Samelson 4588281ffa Update CHANGELOG 2020-03-31 14:42:25 -07:00
Eric Samelson bc13f12052 Release 0.14.0 2020-03-31 14:40:15 -07:00
31 changed files with 3072 additions and 1174 deletions

No files matched your search

+69 -17
View File
@@ -9,7 +9,7 @@ executors:
working_directory: ~/turtle
mac:
macos: # https://circleci.com/docs/2.0/testing-ios/#supported-xcode-versions
xcode: '10.1.0'
xcode: "11.1.0"
working_directory: /Users/distiller/project
shell: /bin/bash -leo pipefail
android:
@@ -57,8 +57,8 @@ commands:
- run:
name: Configure aws-cli
command: |
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
setup_nix:
steps:
@@ -77,6 +77,49 @@ commands:
EOF
chmod +x /bin/rm
install_nodejs_mac:
parameters:
nodejs_version:
type: string
default: 12.16.1
yarn_version:
type: string
default: 1.22.0
steps:
- restore_cache:
key: "node-js-v1-darwin-archive-<< parameters.nodejs_version >>"
- run:
name: Uninstall yarn with brew
command: brew uninstall --force yarn
- install_node_and_yarn:
platform: darwin
nodejs_version: "<< parameters.nodejs_version >>"
yarn_version: "<< parameters.yarn_version >>"
- save_cache:
key: "node-js-v1-darwin-archive-<< parameters.nodejs_version >>"
paths:
- /private/tmp/nodejs.tar.xz
install_node_and_yarn:
parameters:
platform:
type: string
nodejs_version:
type: string
yarn_version:
type: string
steps:
- run:
name: Install node & yarn
command: |
NODEJS_ARCHIVE="/tmp/nodejs.tar.xz"
if [ ! -f "$NODEJS_ARCHIVE" ]; then
curl -o $NODEJS_ARCHIVE -SL "https://nodejs.org/dist/v<< parameters.nodejs_version >>/node-v<< parameters.nodejs_version >>-<< parameters.platform >>-x64.tar.xz"
fi
tar -xJf $NODEJS_ARCHIVE -C /usr/local --strip-components=1 --exclude CHANGELOG.md --exclude README.md --exclude LICENSE
ln -s /usr/local/bin/node /usr/local/bin/nodejs
npm install --global yarn@<< parameters.yarn_version >>
decrypt_secrets_if_possible:
steps:
- run:
@@ -93,18 +136,24 @@ commands:
workingdir:
type: string
default: .
platform:
type: string
default: linux
steps:
- restore_cache:
key: yarn-v1-{{ checksum "<< parameters.workingdir >>/yarn.lock" }}
key: yarn-v3-<< parameters.platform >>-{{ checksum "<< parameters.workingdir >>/yarn.lock" }}
save_yarn_cache:
parameters:
workingdir:
type: string
default: .
platform:
type: string
default: linux
steps:
- save_cache:
key: yarn-v1-{{ checksum "<< parameters.workingdir >>/yarn.lock" }}
key: yarn-v3-<< parameters.platform >>-{{ checksum "<< parameters.workingdir >>/yarn.lock" }}
paths:
- ~/.cache/yarn # `yarn cache dir`
@@ -115,10 +164,10 @@ commands:
default: ios
sdk_version:
type: string
default: sdk36
default: sdk37
steps:
- restore_cache:
key: "workingdir-v1-<< parameters.platform >>-<< parameters.sdk_version >>"
key: "workingdir-v2-<< parameters.platform >>-<< parameters.sdk_version >>"
save_workingdir_cache:
parameters:
@@ -130,10 +179,10 @@ commands:
default: ios
sdk_version:
type: string
default: sdk36
default: sdk37
steps:
- save_cache:
key: "workingdir-v1-<< parameters.platform >>-<< parameters.sdk_version >>"
key: "workingdir-v2-<< parameters.platform >>-<< parameters.sdk_version >>"
paths:
- "<< parameters.workingdir >>/<< parameters.platform >>/<< parameters.sdk_version >>"
@@ -180,20 +229,23 @@ jobs:
executor: mac
steps:
- install_nix
- install_nodejs_mac
- setup
- decrypt_secrets_if_possible
- restore_yarn_cache
- restore_yarn_cache:
platform: darwin
- run: yarn
- save_yarn_cache
- save_yarn_cache:
platform: darwin
- restore_workingdir_cache:
sdk_version: sdk35
sdk_version: sdk37
platform: ios
- run:
name: Run iOS smoke tests
command: ./scripts/tests/runIOSSmokeTestsCI.sh
command: SDK_VERSION=sdk37 ./scripts/tests/runIOSSmokeTestsCI.sh
- save_workingdir_cache:
workingdir: /Users/distiller/project/workingdir
sdk_version: sdk35
sdk_version: sdk37
platform: ios
android_smoke_tests:
@@ -205,11 +257,11 @@ jobs:
- run: yarn
- save_yarn_cache
- restore_workingdir_cache:
sdk_version: sdk36
sdk_version: sdk37
platform: android
- run:
name: Fetch Android shell app
command: SDK_VERSION=sdk36 ./scripts/android/fetchRemoteAndroidTarball.sh
command: SDK_VERSION=sdk37 ./scripts/android/fetchRemoteAndroidTarball.sh
- run:
name: Run Android smoke tests
command: |
@@ -217,7 +269,7 @@ jobs:
--run "./scripts/tests/runAndroidSmokeTestsCI.sh"
- save_workingdir_cache:
workingdir: ~/turtle/workingdir
sdk_version: sdk36
sdk_version: sdk37
platform: android
android_staging_deploy:
+1 -1
View File
@@ -22,6 +22,6 @@ export NODE_ENV=development
export EXPO_TURTLE_TOOLS_DIR="$(pwd)/tools"
PATH_add $EXPO_TURTLE_TOOLS_DIR/bin
if [ "$CI" = "true" ]; then
if [ "$CI" = "true" ] && [[ ! $OSTYPE =~ darwin.* ]]; then
PATH_add $EXPO_TURTLE_TOOLS_DIR/ci/bin
fi
+1
View File
@@ -6,6 +6,7 @@ google-cloud-credentials.json
/workingdir/*
/artifacts/*
.history
.vscode/
shell.apk
.secrets*
+94
View File
@@ -9,6 +9,100 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added iOS shell app for Expo SDK38.
- Added Android shell app for SDK 38.
### Removed
- Dropped support for SDK 34.
## [0.15.1] - 2020-06-22
### Changed
- Configure Turtle to use the Redis CA certificate.
### Fixed
- Fix announcing supported SDK versions.
## [0.15.0] - 2020-06-02
### Changed
- Updated `@expo/xdl` to 57.9.13 (added \*.bak files clean-up when building .ipa).
## [0.14.12] - 2020-05-14
### Changed
- Update iOS custom client shell app with various fixes.
## [0.14.11] - 2020-05-04
### Changed
- Update SDK 37 iOS shell app with various fixes.
## [0.14.10] - 2020-05-01
### Added
- support for "android.enableDangerousExperimentalLeanBuilds" in app.json.
## [0.14.9] - 2020-04-21
### Changed
- Updated `@expo/xdl` to 57.8.30 (scoped the build command so it only builds the `:app` Android sub-project and not all the sub-projects available, [PR](https://github.com/expo/expo-cli/pull/1937)).
## [0.14.8] - 2020-04-20
### Changed
- Updated `@expo/xdl` to 57.8.29 (removed call to `check-dynamic-macros-android.sh`, [PR](https://github.com/expo/expo-cli/pull/1933)).
## [0.14.7] - 2020-04-20
### Changed
- Turtle no longer installs all dependencies of shell apps projects — only the production dependencies are installed now.
- Updated `@expo/xdl` to 57.8.25 (fixed unintuitive `google-services.json` handling for SDK37+, [PR](https://github.com/expo/expo-cli/pull/1897)).
## [0.14.6] - 2020-04-09
### Changed
- Updated @expo/xdl to 57.8.17 (fixed downloading assets smaller than 10 bytes).
## [0.14.5] - 2020-04-06
### Changed
- Made @expo/config error more meaningful.
## [0.14.4] - 2020-04-06
### Fixed
- Determining SDK version for Expo apps using SDK >=37.
## [0.14.3] - 2020-04-03
### Fixed
- A fix for Android SDK 37 - `check-dynamic-macros-android.sh` doesn't use `jq` anymore.
## [0.14.1] - 2020-04-01
### Changed
- Updated iOS shell app for SDK 37 to remove unnecessary unimodules.
## [0.14.0] - 2020-03-31
### Added
- Added iOS shell app for SDK 37.
- Added Android shell app for SDK 37.
+16 -17
View File
@@ -3,27 +3,26 @@ FROM gcr.io/exponentjs/turtle-android-base:0.4.0
ADD . /app/turtle
RUN mv /app/turtle/workingdir /app && \
for SDK_VERSION in `ls /app/workingdir/android/`; do \
echo "preparing $SDK_VERSION shell app" && \
cd /app/workingdir/android/$SDK_VERSION && \
if [ -f universe-package.json ]; then \
mv package.json exponent-package.json && \
mv universe-package.json package.json && \
yarn install && \
mv package.json universe-package.json && \
mv exponent-package.json package.json; \
else \
yarn install; \
fi \
; done && \
mv /app/workingdir /app/turtle
WORKDIR /app/turtle
RUN ./scripts/fetchRemoteTarballs.sh android
RUN ln -s /app/turtle/workingdir /app/workingdir && \
for SDK_VERSION in `ls /app/workingdir/android/`; do \
echo "preparing $SDK_VERSION shell app" && \
cd /app/workingdir/android/$SDK_VERSION && \
mv packages non-workspace-packages && \
# Keep in sync with src/bin/setup/android/index.ts#_installNodeModules
# --prod requires --ignore-scripts (otherwise
# expo-yarn-workspaces errors as missing)
yarn install --ignore-scripts --prod && \
mv non-workspace-packages packages ; \
done
ENV NODE_ENV "production"
ENV TURTLE_WORKING_DIR_PATH /app/turtle/workingdir/
WORKDIR /app/turtle
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf
ADD redislabs_ca.pem /var/run/config/redislabs-tls/redislabs_ca.pem
CMD ["/usr/bin/supervisord"]
@@ -152,6 +152,8 @@ spec:
value: '-Xms2048m -XX:+HeapDumpOnOutOfMemoryError -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseG1GC'
- name: GRADLE_OPTS
value: '-Dorg.gradle.parallel=true -Dorg.gradle.configureondemand=true -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xms2048m -XX:+HeapDumpOnOutOfMemoryError -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XX:+UseG1GC"'
- name: REDIS_CA_CERTIFICATE
value: '/var/run/config/redislabs-tls/redislabs_ca.pem'
resources:
requests:
memory: "8192Mi"
+6 -3
View File
@@ -1,6 +1,6 @@
{
"name": "turtle-cli",
"version": "0.13.10",
"version": "0.16.0",
"description": "The command-line tool for building standalone Expo apps",
"preferGlobal": true,
"scripts": {
@@ -70,9 +70,11 @@
"@expo/babel-preset-cli": "^0.1.3",
"@types/decompress": "^4.2.3",
"@types/fs-extra": "^5.0.4",
"@types/ioredis": "^4.16.6",
"@types/jest": "^23.3.9",
"@types/joi": "^13.4.3",
"@types/lodash": "^4.14.129",
"@types/node-forge": "^0.8.6",
"@types/npm-package-arg": "^6.1.0",
"@types/progress": "^2.0.1",
"@types/raven": "^2.5.1",
@@ -102,8 +104,9 @@
"typescript": "^3.4.2"
},
"dependencies": {
"@expo/config": "^3.0.5",
"@expo/spawn-async": "^1.4.2",
"@expo/xdl": "57.5.2",
"@expo/xdl": "^57.9.13",
"@google-cloud/logging-bunyan": "^2.0.3",
"async-retry": "^1.2.1",
"aws-sdk": "^2.226.1",
@@ -115,7 +118,7 @@
"decompress": "^4.2.0",
"dogapi": "^2.8.3",
"fs-extra": "^6.0.0",
"ioredis": "^3.2.2",
"ioredis": "^4.17.3",
"is-semver": "^1.0.8",
"joi": "^13.2.0",
"lodash": "^4.17.11",
+1
View File
@@ -0,0 +1 @@
this is just a placeholder to simplify deployments
+1 -1
View File
@@ -14,7 +14,7 @@ PLATFORM=$1
yarn
yarn run build
if [ "$PLATFORM" = "android" ]; then
$ROOT_DIR/scripts/android/fetchRemoteAndroidTarball.sh
echo "shell apps will be fetched when building a Docker image"
elif [ "$PLATFORM" = "ios" ]; then
$ROOT_DIR/scripts/ios/fetchRemoteIosTarball.sh
fi
+6
View File
@@ -2,6 +2,8 @@
set -ueo pipefail
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../.. && pwd )"
export NODE_ENV=test
export ENVIRONMENT="development"
@@ -24,4 +26,8 @@ export REDIS_CONFIG_URL="noop"
export DATADOG_DISABLED="true"
export TURTLE_SDK_VERSIONS_SECRET_TOKEN="noop"
pushd $ROOT_DIR/workingdir/android/${SDK_VERSION:-sdk37} >/dev/null 2>&1
yarn
popd >/dev/null 2>&1
yarn test:smoke:android
+1 -1
View File
@@ -23,6 +23,6 @@ export DATADOG_DISABLED="true"
export TURTLE_SDK_VERSIONS_SECRET_TOKEN="noop"
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../.. && pwd )"
SDK_VERSION=sdk35 $ROOT_DIR/scripts/ios/fetchRemoteIosTarball.sh
$ROOT_DIR/scripts/ios/fetchRemoteIosTarball.sh
yarn test:smoke:ios
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/android-shell-builder-a8e204610e5712391336b378f47962bbb0c04164.tar.gz
+1 -1
View File
@@ -1 +1 @@
s3://exp-artifacts/android-shell-builder-1a6203cf1555c3b956a311ed539eafeb7594f030.tar.gz
s3://exp-artifacts/android-shell-builder-3cf3cf0707925322bcd667d5ba79120136f9afd8.tar.gz
+1
View File
@@ -0,0 +1 @@
s3://exp-artifacts/android-shell-builder-076a13fd8b4ee84a59eb6d2777f6db0a2c71fb6d.tar.gz
+1 -1
View File
@@ -1 +1 @@
s3://exp-artifacts/ios-expo-client-aadfc350d8e4ebf8dce9ce08723bb7e07d563846.tar.gz
s3://exp-artifacts/ios-expo-client-18a58afe742e63f1d2ac71ba21404d8b84e6563e.tar.gz
-1
View File
@@ -1 +0,0 @@
s3://exp-artifacts/ios-shell-builder-sdk-latest-651588ff3445a5d87b3a5b81ec2977c02b22f3a2.tar.gz
+1 -1
View File
@@ -1 +1 @@
s3://exp-artifacts/ios-shell-builder-sdk-latest-aadfc350d8e4ebf8dce9ce08723bb7e07d563846.tar.gz
s3://exp-artifacts/ios-shell-builder-sdk-latest-30eb0558ff6a77acf56bb045e98b84f6a5e1478a.tar.gz
+1
View File
@@ -0,0 +1 @@
s3://exp-artifacts/ios-shell-builder-sdk-latest-b0acfb129b4526f771bd0b363f2896b35f007e83.tar.gz
@@ -1 +1 @@
[{"scope":"https://sqs.us-west-2.amazonaws.com:443","method":"POST","path":"/","body":"Action=ReceiveMessage&MaxNumberOfMessages=1&QueueUrl=https%3A%2F%2Fsqs.us-west-2.amazonaws.com%2F274251141632%2Fturtle_jobs_local_dominik_android_in_priority.fifo&Version=2012-11-05&VisibilityTimeout=30","status":200,"response":"<?xml version=\"1.0\"?><ReceiveMessageResponse xmlns=\"http://queue.amazonaws.com/doc/2012-11-05/\"><ReceiveMessageResult><Message><MessageId>fc2fe53d-1447-4304-90e0-60b025ac9687</MessageId><ReceiptHandle>AQEBcOA9S4yhL3ZCaho9Cv+XVqJEbhOaaWJTsOvBD9SOa/NK/248s0+yI9bHro5Ti9WJrnD3H65SdK9eOETFeS/QDaaCMTYkxjvH/1DrSJt2rAptgItmxl8F6N3iDYLqplOQjmautdjCWYXrCLxMDihMHEjcvWNAq0XLAAjlQJvtm5Z8Vji5xXKJP3IpQOV2DvhS/Cqriteaqe6NW5xKwgKHOC52IVTPMSHiJ0ERUf55agntOOJJ7Za7vHdTr+Zjrxl6yVFWKC/cpwYI00OKGj4bArud0buiaD0rtjszLmcPgcwADRsmhfG65p3gLwIwjfclHqSLlmcuY3c+xsu/5VM1YA==</ReceiptHandle><MD5OfBody>c9e8a99bf73407dfa26a2cb81103c26a</MD5OfBody><Body>{&quot;id&quot;:&quot;b9f9f814-5603-4dd5-929d-c9eed756c591&quot;,&quot;experienceId&quot;:&quot;531b2db0-4b14-11e9-92d6-95aebd1034a3&quot;,&quot;experienceName&quot;:&quot;@dsokal-local/turtle-cli-example&quot;,&quot;platform&quot;:&quot;android&quot;,&quot;config&quot;:{&quot;releaseChannel&quot;:&quot;default&quot;},&quot;status&quot;:&quot;sent-to-queue&quot;,&quot;sdkVersion&quot;:&quot;32.0.0&quot;,&quot;accountId&quot;:&quot;4c44c9d8-3cb6-4980-8505-ca0637cf3165&quot;,&quot;priority&quot;:&quot;high&quot;,&quot;credentials&quot;:{&quot;keystore&quot;:&quot;/u3+7QAAAAIAAAABAAAAAQAscWdyemIydGhiYzFzYjJuaGJjOTBkeGowYmd1dHkyeHBsd3Y0eXcxd2JndT0AAAFpycAadgAABQIwggT+MA4GCisGAQQBKgIRAQEFAASCBOrpcy5jViAnKMlnwuvGQ2qa5UcYfuJQwaa48a4oEcvZlrPUUvQSi1T/ZOVpWc8bhiAD8xvTbTh0w1B26K4bPrbrchQGyubs5o3tZU94I+1yMR//nITj4srlUPipX7kr2KdGDqfLfS4EwK8FXACyXx3YxC30STovgtOjTctGUQRzD2iQmu9UmlCAl4szItY2vn+j51VJBpjV9SWXrWpEOmH6hkq7xlHFhbr00FpJXnzON6ifg7ymMIUbkG2nLC3VGCVTAqWBsOgEnUExMOKTedl6Rdzze5sP9CmzUk4aUpgZK1CHjvY03/RztuFky85ODEfSLrk3zBnegQgg0x54RQq1ji+/s5IyPslfpZbcVsTM1KBLEstfCkhZT8xjCZeUxD44U1UxcMlXRYsWtpHv5gfG/4vvV9xQ+pqzuCD43DLiTrqUFw9VzIzXjU7L9CXNGN0DtcmTI5usoKhLZPYgnpT546H4rnZkPzxYs3HXd+tyBmqFTWbvoRiFI2njeaMu0/RZMR17VKjv1u7rITpi7xjwX8cxPvxHLxoDyLL/0vxu45qfmH9ScOWw0QAxQ6RybMhZuZYXuHCERrJ4DLgXNqX8yDjba/C4ioF4nl4cL1S3JtUUE8aRaB6KKQaXP2Fxj+mww3eqetWBuCBD0yBHVscqCZfePh3b1hotMaVZvu/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L13JNYtMHUe3AAOfkycMNVjeTDkzLXZiULCDIisCnPuJQ9cRz7N&quot;,&quot;keyPassword&quot;:&quot;fb7409988d78459c826cf2a438cb3a33&quot;,&quot;keystoreAlias&quot;:&quot;QGRzb2thbC1sb2NhbC90dXJ0bGUtY2xpLWV4YW1wbGU=&quot;,&quot;keystorePassword&quot;:&quot;80c3583b33b84a1d91e5cf33b2421d7c&quot;},&quot;manifest&quot;:{&quot;android&quot;:{&quot;package&quot;:&quot;com.expo.turtle.cli.example&quot;},&quot;bundledAssets&quot;:[&quot;asset_3a2ba31570920eeb9b1d217cabe58315.ttf&quot;,&quot;asset_744ce60078c17d86006dd0edabcd59a7.ttf&quot;,&qLine truncated
[{"scope":"https://sqs.us-west-2.amazonaws.com:443","method":"POST","path":"/","body":"Action=ReceiveMessage&MaxNumberOfMessages=1&QueueUrl=https%3A%2F%2Fsqs.us-west-2.amazonaws.com%2F274251141632%2Fturtle_jobs_local_dominik_android_in.fifo&Version=2012-11-05&VisibilityTimeout=30","status":200,"response":"<?xml version=\"1.0\"?><ReceiveMessageResponse xmlns=\"http://queue.amazonaws.com/doc/2012-11-05/\"><ReceiveMessageResult/><ResponseMetadata><RequestId>2f9926f3-9db4-588e-a00a-71f445522996</RequestId></ResponseMetadata></ReceiveMessageResponse>","rawHeaders":["x-amzn-RequestId","2f9926f3-9db4-588e-a00a-71f445522996","Date","Wed, 08 Apr 2020 13:50:35 GMT","Content-Type","text/xml","Content-Length","240"]},{"scope":"https://sqs.us-west-2.amazonaws.com:443","method":"POST","path":"/","body":"Action=ReceiveMessage&MaxNumberOfMessages=1&QueueUrl=https%3A%2F%2Fsqs.us-west-2.amazonaws.com%2F274251141632%2Fturtle_jobs_local_dominik_android_in_priority.fifo&Version=2012-11-05&VisibilityTimeout=30","status":200,"response":"<?xml version=\"1.0\"?><ReceiveMessageResponse xmlns=\"http://queue.amazonaws.com/doc/2012-11-05/\"><ReceiveMessageResult/><ResponseMetadata><RequestId>e42b6179-9846-5d83-9209-367e40aa9c02</RequestId></ResponseMetadata></ReceiveMessageResponse>","rawHeaders":["x-amzn-RequestId","e42b6179-9846-5d83-9209-367e40aa9c02","Date","Wed, 08 Apr 2020 13:50:41 GMT","Content-Type","text/xml","Content-Length","240"]},{"scope":"https://sqs.us-west-2.amazonaws.com:443","method":"POST","path":"/","body":"Action=ReceiveMessage&MaxNumberOfMessages=1&QueueUrl=https%3A%2F%2Fsqs.us-west-2.amazonaws.com%2F274251141632%2Fturtle_jobs_local_dominik_android_in.fifo&Version=2012-11-05&VisibilityTimeout=30","status":200,"response":"<?xml version=\"1.0\"?><ReceiveMessageResponse xmlns=\"http://queue.amazonaws.com/doc/2012-11-05/\"><ReceiveMessageResult><Message><MessageId>093d5a52-932c-4141-958a-4ee8146dadab</MessageId><ReceiptHandle>AQEBq2BDKWkc+YFuyL+qBVQ6RCqne9ndyzDri6BeHTv+HhCU3kOlINEzzqbgrGJXh49AB6lVInGNsI+uc5uMhC61UscDKfFeqgfhDDUftovz6RXwiIj+xRalgP5fPZn94LbY4KmUoCuGCpXu9UlGxOoorYTkLft9AVY6kabCRlXA8SJzzYjUb1s+rtBoWS3Trj/AOIxOy0EqxeEWpBsNKc1yWc9RNbZ8/qABFLMjOzdmr5gaLEDoRJTUZZUEu9TVOxrC54ES+UaCmgVY17Ubmwo884GbHLoyUA+xqSD0Cvify5GCv3xzB+wjB4gGdGUFdOjj</ReceiptHandle><MD5OfBody>f0cb57fa399d2c8e81f8423e93127bdc</MD5OfBody><Body>{&quot;id&quot;:&quot;1b148a0a-4a5e-4572-b28a-c31aa018351a&quot;,&quot;experienceId&quot;:&quot;0128bca1-78cf-4cb8-ac00-c07600500254&quot;,&quot;experienceName&quot;:&quot;@dsokal-local/turtle-cli-example&quot;,&quot;platform&quot;:&quot;android&quot;,&quot;config&quot;:{&quot;releaseChannel&quot;:&quot;default&quot;,&quot;buildType&quot;:&quot;apk&quot;},&quot;status&quot;:&quot;sent-to-queue&quot;,&quot;sdkVersion&quot;:&quot;37.0.0&quot;,&quot;accountId&quot;:&quot;9b473c78-6d0e-4b69-88a8-1c0960287b2f&quot;,&quot;priority&quot;:&quot;normal&quot;,&quot;credentials&quot;:{&quot;keystore&quot;:&quot;/u3+7QAAAAIAAAABAAAAAQAscWdyemIydGhiYzFzYjJuaGJjOTBkeGowYmd1dHkyeHBsd3Y0eXcxd2JndT0AAAFxTutg3AAABQEwggT9MA4GCisGAQQBKgIRAQEFAASCBOl0ClAt46XtKkD3OZ4KtYCfGvjcqn+NUvylgValp+eckKR3vpTdmzIJxCCPCPpVWUT9kssEpIWea1oyDbBoh01lSazoofkTt+QIkcnr2sOcWgoyywIH+jNH4CPDfycdjPBsy8IoFqSz5DSS9vWwdO8xw0uw/iBd0MmQUcdJANZb0HbvrOU9R1n8IeNeFZUS0nk8czYplz8e7+lWphAY1vA7oLKwYMvkPrHQSoHaXh7WqOyn3A31eQgTHZGW2vwSa7gUS+X1izYozAY5AaKrxwUYQ56dWMNnuufSGldj8KWIpdps1Bo1bN6bb/eDWiXbEGWXgwJOZxYs9OFiPPw296aBdtWpG3qu11Z+NQmr28ov0uqj9yWBX/+iO8TgyCEBPZHRnlVRvoRIvhXoZ2GYsLMvJsn7GrdPWHzzs1cKkg85Ffh7Tr1+32LkVHqHtuId/2hhC2HeP5Yzgkw45ty29H3SXWpydrDjLwQAtGYDnYxYplRxhSt+FXMsepuytDCHAjJ27Ers9mMOs8LriYznJcup32FSrdvAk8SXdrxIXmZ7q8dgmI0OD6tlS+cNGm9Y0e7kWbFbSXK72YViVWzAL/Rm0ecQPSnOaowpVsvU6vWHCdUxgwWGpJAXPPrVmvoTwzQQ4gjm6d4IvRzfW2pXMGvw+gr/19LicvUkhRLS7qKHaYS1QXss9rxWgE8SdFMJghFnwc2s+V4wDsf44aeX3/0mYegfijXI/2d6htQ4ouojQBmQlK7pKiUGjDepgT3S+G8XBSslBcTv0Vf5sudUcisXH8BQd015Sf5ruE7k0BLObfUWsJSd3b8uRjwAXkjCKILiU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+3 -1
View File
@@ -101,7 +101,9 @@ async function _shellAppPostDownloadAction(sdkVersion: string, workingdir: strin
async function _installNodeModules(cwd: string) {
l.info(`installing dependencies in ${cwd} directory...`);
const command = await _shouldUseYarnOrNpm();
await ExponentTools.spawnAsyncThrowError(command, ['install'], {
// Keep in sync with /Dockerfile
// --prod requires --ignore-scripts (otherwise expo-yarn-workspaces errors as missing)
await ExponentTools.spawnAsyncThrowError(command, ['install', '--ignore-scripts', '--production'], {
pipeToLogger: true,
loggerFields: LOGGER_FIELDS,
cwd,
+23 -5
View File
@@ -1,5 +1,6 @@
import _url from 'url';
import { ConfigError, getExpoSDKVersion } from '@expo/config';
import { ExponentTools } from '@expo/xdl';
import _ from 'lodash';
import uuid from 'uuid';
@@ -63,21 +64,22 @@ export function createBuilderAction({
}
}
const projectAbsoluteDir = ProjectUtils.resolveAbsoluteDir(projectDirArg);
const args = {
releaseChannel: cmd.releaseChannel || 'default',
buildType: cmd.type,
buildMode: cmd.mode,
username: userData.username || 'anonymous',
projectDir: ProjectUtils.resolveAbsoluteDir(projectDirArg),
projectDir: projectAbsoluteDir,
publicUrl: cmd.publicUrl,
};
const appJSON = await ProjectUtils.loadAppJSON(projectDirArg, cmd.config);
const sdkVersion = _.get(appJSON, 'expo.sdkVersion');
const sdkVersion = getExpoSDKVersionSafely(projectAbsoluteDir, appJSON);
await setup(platform, sdkVersion);
const credentials = await prepareCredentials(cmd);
const rawJob = {
...await buildJobObject(platform, appJSON, args, credentials),
...await buildJobObject(platform, appJSON, args, credentials, sdkVersion),
...cmd.buildDir && { fakeUploadDir: ProjectUtils.resolveAbsoluteDir(cmd.buildDir) },
...cmd.output && { fakeUploadBuildPath: ProjectUtils.resolveAbsoluteDir(cmd.output) },
};
@@ -95,11 +97,27 @@ export function createBuilderAction({
};
}
function getExpoSDKVersionSafely(projectDir: string, appJSON?: any) {
try {
return getExpoSDKVersion(projectDir, appJSON && appJSON.expo);
} catch (err) {
if (err instanceof ConfigError) {
throw new Error(
'Couldn\'t find the `expo` library in your project\'s dependencies.'
+ ' Have you run \'yarn install\' or \'npm install\' for your project?',
);
} else {
throw err;
}
}
}
const buildJobObject = async (
platform: 'android' | 'ios',
appJSON: any,
{ releaseChannel, buildType, buildMode, username, publicUrl, projectDir }: any,
credentials: any,
sdkVersion: string,
) => {
const experienceName = `@${_.get(appJSON, 'expo.owner', username)}/${_.get(appJSON, 'expo.slug')}`;
const job = {
@@ -115,14 +133,14 @@ const buildJobObject = async (
id: uuid.v4(),
platform,
projectDir,
sdkVersion: _.get(appJSON, 'expo.sdkVersion'),
sdkVersion,
experienceName,
...(credentials && { credentials }),
};
const url = getExperienceUrl(job.experienceName, job.config.publicUrl);
const manifest = await ExponentTools.getManifestAsync(url, {
'Exponent-SDK-Version': _.get(appJSON, 'expo.sdkVersion'),
'Exponent-SDK-Version': sdkVersion,
'Exponent-Platform': platform,
'Expo-Release-Channel': releaseChannel,
'Accept': 'application/expo+json,application/json',
+13 -9
View File
@@ -3,7 +3,6 @@ import path from 'path';
import { AndroidShellApp, ImageUtils } from '@expo/xdl';
import fs from 'fs-extra';
import _ from 'lodash';
import semver from 'semver';
import { ANDROID_BUILD_TYPES } from 'turtle/constants';
import uuidv4 from 'uuid/v4';
@@ -11,7 +10,7 @@ import getOrCreateCredentials from 'turtle/builders/utils/android/credentials';
import { formatShellAppDirectory } from 'turtle/builders/utils/android/workingdir';
import * as commonUtils from 'turtle/builders/utils/common';
import * as imageHelpers from 'turtle/builders/utils/image';
import { resolveExplicitOptIn } from 'turtle/builders/utils/unimodules';
import { resolveExplicitOptIn, resolveNativeModules } from 'turtle/builders/utils/unimodules';
import { uploadBuildToS3 } from 'turtle/builders/utils/uploader';
import { ensureCanBuildSdkVersion } from 'turtle/builders/utils/version';
import config from 'turtle/config';
@@ -73,15 +72,20 @@ async function runShellAppBuilder(
const sdkVersion = _.get(manifest, 'sdkVersion', sdkVersionFromJob);
const workingDir = formatShellAppDirectory({ sdkVersion });
// (2019-07-31) We are explicitly choosing to disable this option until we have more
// infrastructure/tooling built around optional modules and OTA updates, as right now it's
// very easy for developers to break apps in production with optional modules.
// Default behaviour:
// - load all modules except [expo-branch]
// - load expo-branch only if present in package.json dependencies
//
// to enable full resolver switch resolveExplicitOptIn to resolveNativeModules
// Behaviour with "enableDangerousExperimentalLeanBuilds" flag enabled
// - add unimodules from `manifest.dependencies` (project package.json dependecies)
// - add unimodules from react-native-unimodules package.json
// - add unimodules from expo package package.json
// - add recusively all dependecies of already added unimodules
logger.info({ buildPhase: 'resolve native modules' }, 'Resolving universal modules dependencies');
const enabledModules = semver.satisfies(sdkVersion, '>= 33.0.0')
? await resolveExplicitOptIn(workingDir, _.get(manifest, 'dependencies'))
: null;
const packageJsonDependecies = _.get(manifest, 'dependencies');
const enabledModules = _.get(manifest, 'android.enableDangerousExperimentalLeanBuilds')
? await resolveNativeModules(workingDir, packageJsonDependecies)
: await resolveExplicitOptIn(workingDir, packageJsonDependecies);
try {
await AndroidShellApp.createAndroidShellAppAsync({
+13 -3
View File
@@ -1,3 +1,4 @@
import fs from 'fs';
import os from 'os';
import path from 'path';
@@ -44,8 +45,17 @@ export default {
intervalMs: env('DATADOG_INTERVAL_MS', 5 * 60 * 1000),
},
redis: {
url: env('REDIS_URL'),
configUrl: env('REDIS_CONFIG_URL'),
main: {
url: env('REDIS_URL'),
caCertificate: envTransform(
'REDIS_CA_CERTIFICATE',
null,
(caCertificate: string) => caCertificate && fs.readFileSync(caCertificate),
),
},
turtle: {
url: env('REDIS_CONFIG_URL'),
},
},
logger: {
level: env('LOGGER_LEVEL', 'info'),
@@ -81,7 +91,7 @@ export default {
androidDependenciesDir: env(
'TURTLE_ANDROID_DEPENDENCIES_DIR',
path.join(os.homedir(), '.turtle/androidDependencies'),
),
),
tempS3LogsDir: env('TURTLE_TEMP_S3_LOGS_DIR', '/tmp/logs'),
fakeUploadDir: envOptional('TURTLE_FAKE_UPLOAD_DIR'),
temporaryFilesRoot: env(
+9 -7
View File
@@ -10,7 +10,7 @@ import logger from 'turtle/logger';
import * as buildDurationMetric from 'turtle/metrics/buildDuration';
import * as buildStatusMetric from 'turtle/metrics/buildStatus';
import { checkShouldExit, setCurrentJobId, turtleVersion } from 'turtle/turtleContext';
import { getPriorities } from 'turtle/utils/priorities';
import { getPriorities, labelConfiguration, TurtleMode } from 'turtle/utils/priorities';
import * as redis from 'turtle/utils/redis';
import { sanitizeJob } from 'turtle/validator';
@@ -22,8 +22,8 @@ function _maybeExit() {
}
export async function doJob() {
const jobData = await getJob();
await processJob(jobData);
const { job, turtleMode } = await getJob();
await processJob(job, turtleMode);
_maybeExit();
}
@@ -34,6 +34,7 @@ export async function getJob() {
try {
let job = null;
const priorities = await getPriorities();
const turtleMode = labelConfiguration(priorities);
for (const priority of priorities) {
job = await sqs.receiveMessage(priority);
_maybeExit();
@@ -44,7 +45,7 @@ export async function getJob() {
}
_maybeExit();
if (job !== null) {
return job;
return { job, turtleMode };
}
} catch (err) {
logger.error({ err }, 'Error at receiving messages');
@@ -52,7 +53,7 @@ export async function getJob() {
}
}
async function processJob(jobData: any) {
async function processJob(jobData: any, turtleMode: TurtleMode) {
const receiptHandle = jobData.ReceiptHandle;
const { priority } = jobData;
@@ -92,7 +93,7 @@ async function processJob(jobData: any) {
let buildFailed = false;
const buildType = _.get(job, 'config.buildType', 'default');
try {
const status = await build(job);
const status = await build(job, turtleMode);
buildStatusMetric.add(buildType, priority, status);
buildFailed = !status;
} catch (err) {
@@ -137,7 +138,7 @@ function failAfterMaxJobTime(priority: string, receiptHandle: string, job: any)
}, config.builder.maxJobTimeMs);
}
async function build(job: any) {
async function build(job: any, turtleMode: TurtleMode) {
const startTimestamp = Date.now();
const s3Url = await logger.initForJob(job);
const calculateBuildDuration = () => Math.ceil((Date.now() - startTimestamp) / 1000);
@@ -146,6 +147,7 @@ async function build(job: any) {
await sqs.sendMessage(job.id, BUILD.JOB_STATES.IN_PROGRESS, {
logUrl: s3Url,
logFormat: 'json',
turtleMode,
});
const result = await (builders as any)[job.platform](job);
const buildDuration = calculateBuildDuration();
+12 -12
View File
@@ -5,11 +5,11 @@ import take from 'lodash/take';
import logger from 'turtle/logger';
import { sendMetric } from 'turtle/metrics/datadog';
import { getReplicaCount } from 'turtle/utils/metadata';
import { getLabeledConfiguration, TurtleModeLabels } from 'turtle/utils/priorities';
import { getLabeledConfiguration, TurtleMode } from 'turtle/utils/priorities';
const createMetricName = () => `turtle.replicaCount`;
const createModeMetricName = (mode: TurtleModeLabels) => `${createMetricName()}.${mode}`;
const createModeTag = (mode: TurtleModeLabels) => `mode:${mode}`;
const createModeMetricName = (mode: TurtleMode) => `${createMetricName()}.${mode}`;
const createModeTag = (mode: TurtleMode) => `mode:${mode}`;
export default async function sendConfigToDatadog() {
let configuration;
@@ -30,28 +30,28 @@ export default async function sendConfigToDatadog() {
const metricName = createMetricName();
const normalReplicaCount = replicaCounts[TurtleModeLabels.Normal] || 0;
const highReplicaCount = replicaCounts[TurtleModeLabels.High] || 0;
const highOnlyReplicaCount = replicaCounts[TurtleModeLabels.HighOnly] || 0;
const normalReplicaCount = replicaCounts[TurtleMode.Normal] || 0;
const highReplicaCount = replicaCounts[TurtleMode.High] || 0;
const highOnlyReplicaCount = replicaCounts[TurtleMode.HighOnly] || 0;
const normalTag = createModeTag(TurtleModeLabels.Normal);
const normalMetricName = createModeMetricName(TurtleModeLabels.Normal);
const normalTag = createModeTag(TurtleMode.Normal);
const normalMetricName = createModeMetricName(TurtleMode.Normal);
logger.debug(
`Sending ${metricName}=${normalReplicaCount} (${normalTag}), ${normalMetricName}=${normalReplicaCount} to Datadog`,
);
await sendMetric(metricName, normalReplicaCount, [normalTag]);
await sendMetric(normalMetricName, normalReplicaCount);
const highTag = createModeTag(TurtleModeLabels.High);
const highMetricName = createModeMetricName(TurtleModeLabels.High);
const highTag = createModeTag(TurtleMode.High);
const highMetricName = createModeMetricName(TurtleMode.High);
logger.debug(
`Sending ${metricName}=${highReplicaCount} (${highTag}), ${highMetricName}=${highReplicaCount} to Datadog`,
);
await sendMetric(metricName, highReplicaCount, [highTag]);
await sendMetric(highMetricName, highReplicaCount);
const highOnlyTag = createModeTag(TurtleModeLabels.HighOnly);
const highOnlyMetricName = createModeMetricName(TurtleModeLabels.HighOnly);
const highOnlyTag = createModeTag(TurtleMode.HighOnly);
const highOnlyMetricName = createModeMetricName(TurtleMode.HighOnly);
logger.debug(
`Sending ${metricName}=${highOnlyReplicaCount} (${highOnlyTag}),`
+ ` ${highOnlyMetricName}=${highOnlyReplicaCount} to Datadog`,
-1
View File
@@ -4,7 +4,6 @@ declare module 'bunyan-sentry-stream';
declare module 'bunyan-debug-stream';
declare module 'copy';
declare module 'dogapi';
declare module 'ioredis';
declare module 'is-semver';
declare module 'request-progress';
declare module '@expo/xdl';
+12 -10
View File
@@ -9,7 +9,7 @@ import { getRedisClient, RedisClient } from 'turtle/utils/redis';
export const NORMAL = 'normalPriority';
export const HIGH = 'highPriority';
export enum TurtleModeLabels {
export enum TurtleMode {
Normal = 'normal',
High = 'high',
HighOnly = 'highOnly',
@@ -100,13 +100,15 @@ async function getConfiguration(currentRedisClient: any) {
export async function getLabeledConfiguration(currentRedisClient?: any) {
const configuration = await getConfiguration(currentRedisClient);
return configuration.map((i: string[]) => {
if (isEqual(i, NORMAL_CONFIGURATION)) {
return TurtleModeLabels.Normal;
} else if (isEqual(i, HIGH_CONFIGURATION)) {
return TurtleModeLabels.High;
} else {
return TurtleModeLabels.HighOnly;
}
});
return configuration.map((i: string[]) => labelConfiguration(i));
}
export function labelConfiguration(configuration: string[]): TurtleMode {
if (isEqual(configuration, NORMAL_CONFIGURATION)) {
return TurtleMode.Normal;
} else if (isEqual(configuration, HIGH_CONFIGURATION)) {
return TurtleMode.High;
} else {
return TurtleMode.HighOnly;
}
}
+15 -6
View File
@@ -12,18 +12,27 @@ export enum RedisClient {
Configuration = 'REDIS_CLIENT_CONFIGURATION',
}
interface IClientConfig { [key: string]: string; }
interface IClientConfig {
[key: string]: {
url: string;
caCertificate?: string;
};
}
const clientToUrl: IClientConfig = {
[RedisClient.Subscriber]: config.redis.url,
[RedisClient.Default]: config.redis.url,
[RedisClient.Configuration]: config.redis.configUrl,
const clientConfigs: IClientConfig = {
[RedisClient.Subscriber]: config.redis.main,
[RedisClient.Default]: config.redis.main,
[RedisClient.Configuration]: config.redis.turtle,
};
export function connect(timeoutMs: number, type: string): Promise<any> {
return new Promise((resolve, reject) => {
const redisClient = new Redis(clientToUrl[type], {
const { url, caCertificate } = clientConfigs[type];
const redisClient = new Redis(url, {
maxRetriesPerRequest: 2,
...caCertificate && {
tls: { ca: caCertificate },
},
});
const timer = setTimeout(() => reject(new Error('Timeout at connecting to Redis')), timeoutMs);
redisClient.on('ready', () => {
+2 -2
View File
@@ -38,9 +38,9 @@ async function setTurtleVersion(version: string) {
function resolveWWWEndpoint() {
const currentEnv = config.deploymentEnv;
if (currentEnv === 'production') {
return 'https://expo.io';
return 'https://exp.host';
} else if (currentEnv === 'staging') {
return 'https://staging.expo.io';
return 'https://staging.exp.host';
} else {
return 'http://127.0.0.1:3000';
}
+2766 -1072
View File
File diff suppressed because it is too large. Load diff