Skip to content

Commit 522e3af

Browse files
authored
Remove Fed 1 from main (#491)
This simplifies the repo into a single Cargo workspace which removes a bunch of extra infrastructure. The idea is we can have a `v1` or `support/v1` branch where we can still make tweaks to fed 1 (e.g., security fixes) without it being in the way for new fed 2 work.
1 parent 1f00f51 commit 522e3af

File tree

189 files changed

+3160
-10272
lines changed

Some content is hidden

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

189 files changed

+3160
-10272
lines changed
File renamed without changes.
File renamed without changes.

renovate.json5 renamed to .github/renovate.json5

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// Keep automerge off for now, while we validate this works.
77
"automerge": false,
88
"ignorePaths": [
9-
109
// Add the Renovate config:base defaults
1110
"**/node_modules/**",
1211
"**/bower_components/**",
@@ -15,9 +14,6 @@
1514
"**/fixtures/**",
1615
"**/test/**",
1716
"**/tests/**",
18-
19-
// But also, let's exclude Federation 1.
20-
"federation-1/**"
2117
],
2218
"packageRules": [
2319
// Bunch up all non-major npm dependencies into a single PR. In the common case
@@ -29,49 +25,72 @@
2925
{
3026
"matchCurrentVersion": "< 1.0.0",
3127
"separateMinorPatch": true,
32-
"matchManagers": [ "cargo" ],
28+
"matchManagers": [
29+
"cargo"
30+
],
3331
"minor": {
3432
"groupName": "cargo pre-1.0 packages",
3533
"groupSlug": "cargo-all-pre-1.0",
36-
"automerge": false, // eventually true?
34+
"automerge": false,
35+
// eventually true?
3736
},
3837
"patch": {
3938
"groupName": "cargo pre-1.0 packages",
4039
"groupSlug": "cargo-all-pre-1.0",
41-
"automerge": false, // eventually true?
40+
"automerge": false,
41+
// eventually true?
4242
}
4343
},
4444
// npm by itself for non-major >= 1.0.0
4545
{
4646
"matchCurrentVersion": ">= 1.0.0",
47-
"matchManagers": [ "npm" ],
48-
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
47+
"matchManagers": [
48+
"npm"
49+
],
50+
"matchUpdateTypes": [
51+
"minor",
52+
"patch",
53+
"pin",
54+
"digest"
55+
],
4956
"groupName": "all npm non-major packages >= 1.0",
5057
"groupSlug": "npm-all-non-major-gte-1.0",
5158
"automerge": false,
5259
},
5360
// cargo by itself for non-major >= 1.0.0
5461
{
5562
"matchCurrentVersion": ">= 1.0.0",
56-
"matchManagers": [ "cargo" ],
57-
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
63+
"matchManagers": [
64+
"cargo"
65+
],
66+
"matchUpdateTypes": [
67+
"minor",
68+
"patch",
69+
"pin",
70+
"digest"
71+
],
5872
"groupName": "all cargo non-major packages >= 1.0",
5973
"groupSlug": "cargo-all-non-major-gte-1.0",
6074
"automerge": false,
6175
},
62-
6376
// We'll review these in a PR of their own since it has the most direct runtime
6477
// implications on users that we'd like to be very intentional about.
6578
{
66-
"matchPackagePrefixes": ["deno_"],
79+
"matchPackagePrefixes": [
80+
"deno_"
81+
],
6782
"groupName": "deno updates",
6883
"groupSlug": "rust-deno-updates",
69-
"matchManagers": ["cargo"],
84+
"matchManagers": [
85+
"cargo"
86+
],
7087
"automerge": false
7188
},
7289
// CentOS 8 is EOL, but 7 lives on.
7390
{
74-
"matchPackageNames": ["centos"],
91+
"matchPackageNames": [
92+
"centos"
93+
],
7594
"allowedVersions": "7.x"
7695
}
7796
]

.github/workflows/publish.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Publish Components
22

3-
on:
3+
on:
44
push:
55
branches:
66
- main
7-
7+
88
jobs:
99
harmonizer_publish:
1010
if: "contains(github.event.head_commit.message, 'Automated PR for harmonizer release')"
@@ -13,16 +13,15 @@ jobs:
1313
steps:
1414
- name: Checkout Repo
1515
uses: actions/checkout@v3
16-
16+
1717
- name: Run Cargo xtask tag
1818
run: |
19-
cd federation-2
2019
HARMONIZER_RELEASE_VERSION=composition@v`cargo metadata --format-version 1 |jq -r '.packages[] | select(.name=="harmonizer") | .version'`
2120
cd ..
2221
git config user.name "ApolloBot2"
2322
git config user.email "[email protected]"
2423
cargo xtask tag --package $HARMONIZER_RELEASE_VERSION --real-publish
25-
24+
2625
router-bridge_publish:
2726
if: "contains(github.event.head_commit.message, 'Automated PR for router-bridge release')"
2827
name: Publish router-bridge
@@ -38,7 +37,6 @@ jobs:
3837

3938
- name: Run Cargo xtask tag
4039
run: |
41-
cd federation-2
4240
ROUTERBRIDGE_RELEASE_VERSION=router-bridge@v`cargo metadata --format-version 1 |jq -r '.packages[] | select(.name=="router-bridge") | .version'`
4341
cd ..
4442
git config user.name "ApolloBot2"

.github/workflows/release.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ on:
77
type: string
88
required: true
99
description: Federation release version
10-
10+
1111
jobs:
1212
harmonizer_pr:
1313
name: Create harmonizer release
1414
runs-on: ubuntu-latest
15+
env:
16+
VERSION: ${{ github.event.inputs.version }}
1517
steps:
1618
- name: Checkout Repo
1719
uses: actions/checkout@v3
@@ -22,15 +24,14 @@ jobs:
2224
node-version: 16
2325

2426
- name: start
25-
run: |
26-
echo "${{ github.event.inputs.version }}"
27+
run: echo "$VERSION"
2728

2829
- name: Update @apollo/composition
29-
run: npm i --prefix ./federation-2/harmonizer -E @apollo/composition@${{github.event.inputs.version}}
30-
31-
# - name: Install Rustup
32-
# run: curl https://sh.rustup.rs -sSf | sh -s -- -y
30+
run: npm i --prefix ./harmonizer -E "@apollo/composition@$VERSION"
3331

32+
# - name: Install Rustup
33+
# run: curl https://sh.rustup.rs -sSf | sh -s -- -y
34+
3435
- name: Run cargo xtask
3536
run: cargo xtask dist --debug
3637

@@ -55,21 +56,20 @@ jobs:
5556
# run: curl https://sh.rustup.rs -sSf | sh -s -- -y
5657

5758
- name: Update @apollo/federation-internals and @apollo/query-planner
58-
run: npm i --prefix ./federation-2/router-bridge @apollo/federation-internals@${{github.event.inputs.version}} @apollo/query-planner@${{github.event.inputs.version}}
59+
run: npm i --prefix ./router-bridge "@apollo/federation-internals@$VERSION" "@apollo/query-planner@$VERSION"
5960

6061
- name: Install Cargo edit
6162
run: cargo install cargo-edit
62-
63+
6364
- name: Run cargo edit and cargo build
6465
run: |
65-
echo "${{ github.event.inputs.version }}"
66-
cd federation-2
67-
NEW_VERSION=`cargo metadata --format-version 1 |jq -r '.packages[] | select(.name=="router-bridge") | .version' | python3 -c 'import sys; version=sys.stdin.readline().split("+")[0].split("."); version[2] = str(int(version[2]) + 1); print(".".join(version))'`+v${{ github.event.inputs.version }}
66+
echo "$VERSION"
67+
NEW_VERSION=`cargo metadata --format-version 1 |jq -r '.packages[] | select(.name=="router-bridge") | .version' | python3 -c 'import sys; version=sys.stdin.readline().split("+")[0].split("."); version[2] = str(int(version[2]) + 1); print(".".join(version))'`+"v$VERSION"
6868
echo "New version " $NEW_VERSION
6969
cargo set-version $NEW_VERSION -p router-bridge
7070
cargo build -p router-bridge
7171
cd router-bridge
72-
npm version ${{ github.event.inputs.version }}
72+
npm version "$VERSION"
7373
- name: Create Pull Request
7474
uses: peter-evans/create-pull-request@v5
7575
with:

.tool-versions

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
rust 1.70.0
2-
31
nodejs 16.20.0

0 commit comments

Comments
 (0)