Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
175 changes: 17 additions & 158 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ parameters:
common_job_environment: &common_job_environment
CARGO_NET_GIT_FETCH_WITH_CLI: true
RUST_BACKTRACE: full
NODE_VERSION: 14.17.5
NPM_VERSION: 7.10.0

commands:
linux_install_baseline:
Expand Down Expand Up @@ -77,87 +75,17 @@ commands:
tar -xf jaeger.tar.gz
mv jaeger-1.33.0-windows-amd64 jaeger

# This job sets up our nodejs dependencies,
# and makes sure everything is ready to run integration tests
macos_prepare_node_env:
# This job makes sure everything is ready to run integration tests
macos_prepare_env:
steps:
#TODO[igni]: check for node version before we try to install it
# Installing this with the curl nvm command was proving difficult,
# so I've opted to just install the .pkg. Should be the same net
# result, even if liked the opportunity for symmetry with Linux.
- run:
name: Installing Node.js with a .pkg.
command: |
curl "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.pkg" > "$HOME/Downloads/node.pkg" && sudo installer -store -pkg "$HOME/Downloads/node.pkg" -target "/"
sudo npm install --global npm@${NPM_VERSION}
- run:
name: Assert Node.js version
command: test "$(node --version)" = "v${NODE_VERSION}"
- run:
name: Assert npm version
command: test "$(npm --version)" = "${NPM_VERSION}"
- run:
# The jaeger exporter won't work without this
name: Increase udp packet size
command: |
sudo sysctl net.inet.udp.maxdgram=65536
sudo sysctl net.inet.udp.maxdgram
linux_prepare_node_env:
steps:
#TODO[igni]: check for node version before we try to install it
- run:
name: Install nvm
command: |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
echo '. ~/.nvm/nvm.sh' >> $BASH_ENV
- run:
name: Install desired Node.js version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice to be able to remove all this!

command: |
nvm install $NODE_VERSION
nvm alias default $NODE_VERSION
npm install --global npm@${NPM_VERSION}
- run:
name: Assert Node.js version
command: test "$(node --version)" = "v${NODE_VERSION}"
- run:
name: Assert npm version
command: test "$(npm --version)" = "${NPM_VERSION}"

windows_prepare_node_env:
#TODO[igni]: check for node version before we try to install it
steps:
- run:
name: Install desired Node.js version with nvm
command: |
nvm install ${Env:NODE_VERSION}
nvm on
- run:
# https://github.com/coreybutler/nvm-windows/issues/300
# Have to move the command out of the way because it can't
# overwrite itself otherwise. This is madness, but apparently
# accepted. Other things I tried: using yarn to install npm,
# using http://npm.im/npm-windows-upgrade and even shouting.
name: Install specific version of npm in a crazy Windows way
command: |
$node_dir = (get-item (get-command npm).source).directory.fullname
foreach ($cmd in @("npm", "npx")) {
foreach ($ext in @(".ps1", ".cmd", "")) {
if (Test-Path "$node_dir/$cmd$ext") {
rename-item -path (join-path -path $node_dir -childpath "$cmd$ext") "${cmd}-orig${ext}"
}
}
}
npm-orig install --global "npm@${Env:NPM_VERSION}"
- run:
name: Assert Node.js version
command: |
if ((node --version) -Ne "v${Env:NODE_VERSION}") { exit 1 }
- run:
name: Assert npm version
command: |
if ((npm --version) -Ne "${Env:NPM_VERSION}") { exit 1 }

windows_prepare_rust_env:
windows_prepare_env:
steps:
- run:
name: Install rustup
Expand All @@ -179,7 +107,7 @@ commands:
[net]
git-fetch-with-cli = true
"@
prepare_rust_env:
prepare_env:
steps:
- rust/install:
version: stable
Expand Down Expand Up @@ -238,9 +166,11 @@ commands:

build_common_permutations:
steps:
- rust/build:
with_cache: false
crate: --locked -p apollo-router
- run:
name: cargo check workspace
command: |
set -e -o pipefail
cargo check --locked
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this redundant with the build that's necessary for running tests?

build_all_permutations:
steps:
- build_common_permutations
Expand Down Expand Up @@ -346,8 +276,7 @@ jobs:
equal: [*rust_linux_executor, << parameters.platform >>]
steps:
- linux_install_baseline
- linux_prepare_node_env
- prepare_rust_env
- prepare_env
- xtask_lint:
os: linux
check_compliance:
Expand All @@ -364,8 +293,7 @@ jobs:
equal: [*rust_linux_executor, << parameters.platform >>]
steps:
- linux_install_baseline
- linux_prepare_node_env
- prepare_rust_env
- prepare_env
- xtask_check_compliance:
os: linux
build:
Expand All @@ -382,25 +310,22 @@ jobs:
equal: [*rust_linux_executor, << parameters.platform >>]
steps:
- linux_install_baseline
- linux_prepare_node_env
- prepare_rust_env
- prepare_env
- build_workspace:
os: linux
- when:
condition:
equal: [*rust_windows_executor, << parameters.platform >>]
steps:
- windows_install_baseline
- windows_prepare_node_env
- windows_prepare_rust_env
- windows_prepare_env
- windows_build_workspace
- when:
condition:
equal: [*rust_macos_executor, << parameters.platform >>]
steps:
- macos_install_baseline
- macos_prepare_node_env
- prepare_rust_env
- prepare_env
- build_workspace:
os: macos
test:
Expand All @@ -417,25 +342,22 @@ jobs:
equal: [*rust_linux_executor, << parameters.platform >>]
steps:
- linux_install_baseline
- linux_prepare_node_env
- prepare_rust_env
- prepare_env
- test_workspace:
os: linux
- when:
condition:
equal: [*rust_windows_executor, << parameters.platform >>]
steps:
- windows_install_baseline
- windows_prepare_node_env
- windows_prepare_rust_env
- windows_prepare_env
- windows_test_workspace
- when:
condition:
equal: [*rust_macos_executor, << parameters.platform >>]
steps:
- macos_install_baseline
- macos_prepare_node_env
- prepare_rust_env
- prepare_env
- test_workspace:
os: macos

Expand Down Expand Up @@ -465,23 +387,6 @@ jobs:
- run: brew install cmake
- rust/install:
version: stable
# Installing this with the curl nvm command was proving difficult,
# so I've opted to just install the .pkg. Should be the same net
# result, even if liked the opportunity for symmetry with Linux.
- run:
name: Installing Node.js with a .pkg.
command: |
curl "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}.pkg" > "$HOME/Downloads/node.pkg" && sudo installer -store -pkg "$HOME/Downloads/node.pkg" -target "/"
- run:
name: Install specific version of npm
command: |
sudo npm install --global npm@${NPM_VERSION}
- run:
name: Assert Node.js version
command: test "$(node --version)" = "v${NODE_VERSION}"
- run:
name: Assert npm version
command: test "$(npm --version)" = "${NPM_VERSION}"
- run:
command: >
cargo xtask dist
Expand Down Expand Up @@ -510,22 +415,6 @@ jobs:
sudo apt-get install -y libssl-dev
- rust/install:
version: stable
- run:
name: Install nvm
command: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
- run: echo '. ~/.nvm/nvm.sh' >> $BASH_ENV
- run:
name: Install desired Node.js version
command: |
nvm install $NODE_VERSION
nvm alias default $NODE_VERSION
npm install --global npm@${NPM_VERSION}
- run:
name: Assert Node.js version
command: test "$(node --version)" = "v${NODE_VERSION}"
- run:
name: Assert npm version
command: test "$(npm --version)" = "${NPM_VERSION}"
- run:
command: >
cargo xtask dist
Expand Down Expand Up @@ -559,36 +448,6 @@ jobs:
[net]
git-fetch-with-cli = true
"@
- run:
name: Install desired Node.js version with nvm
command: |
nvm install ${Env:NODE_VERSION}
nvm on
- run:
# https://github.com/coreybutler/nvm-windows/issues/300
# Have to move the command out of the way because it can't
# overwrite itself otherwise. This is madness, but apparently
# accepted. Other things I tried: using yarn to install npm,
# using http://npm.im/npm-windows-upgrade and even shouting.
name: Install specific version of npm in a crazy Windows way
command: |
$node_dir = (get-item (get-command npm).source).directory.fullname
foreach ($cmd in @("npm", "npx")) {
foreach ($ext in @(".ps1", ".cmd", "")) {
if (Test-Path "$node_dir/$cmd$ext") {
rename-item -path (join-path -path $node_dir -childpath "$cmd$ext") "${cmd}-orig${ext}"
}
}
}
npm-orig install --global "npm@${Env:NPM_VERSION}"
- run:
name: Assert Node.js version
command: |
if ((node --version) -Ne "v${Env:NODE_VERSION}") { exit 1 }
- run:
name: Assert npm version
command: |
if ((npm --version) -Ne "${Env:NPM_VERSION}") { exit 1 }
- run:
command: >
cargo xtask dist
Expand Down
5 changes: 0 additions & 5 deletions .tool-versions

This file was deleted.

14 changes: 8 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions NEXT_CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ By [@Geal](https://github.com/Geal) in https://github.com/apollographql/router/p

## 🛠 Maintenance

### Depend on published `router-bridge` ([PR #1613](https://github.com/apollographql/router/issues/1613))

We have published the `router-bridge` to crates.io, which removes the need for router developers to have nodejs installed.

By [@o0Ignition0o](https://github.com/o0Ignition0o) in https://github.com/apollographql/router/pull/1613

### Re-organize our release steps checklist ([PR #1605](https://github.com/apollographql/router/pull/1605))

Expand Down
4 changes: 0 additions & 4 deletions apollo-router-scaffold/templates/base/.tool-versions

This file was deleted.

2 changes: 1 addition & 1 deletion apollo-router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ reqwest = { version = "0.11.11", default-features = false, features = [
"json",
"stream",
] }
router-bridge = { git = "https://github.com/apollographql/federation-rs.git", tag = "defer-alpha4" }
router-bridge = "0.1.0-alpha.1"
schemars = { version = "0.8.10", features = ["url"] }
sha2 = "0.10.2"
serde = { version = "1.0.144", features = ["derive", "rc"] }
Expand Down