Skip to content

Commit 58c2b9d

Browse files
committed
Merge branch 'master' into gmac/v3_complexity_update
2 parents 94cf6c4 + b8e2bff commit 58c2b9d

File tree

602 files changed

+74490
-5859
lines changed

Some content is hidden

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

602 files changed

+74490
-5859
lines changed

Diff for: .github/workflows/ci.yaml

+53-23
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,29 @@ jobs:
99
- uses: actions/checkout@v4
1010
- uses: ruby/setup-ruby@v1
1111
with:
12-
ruby-version: 2.7
12+
ruby-version: 3.4
1313
bundler-cache: true
1414
- run: bundle exec rake rubocop
1515
system_tests:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
19-
- uses: ruby/setup-ruby@v1
18+
- uses: shogo82148/actions-setup-redis@v1
2019
with:
21-
ruby-version: 2.7
22-
bundler-cache: true
23-
- run: bundle exec rake compile
20+
redis-version: "7.x"
21+
- run: redis-cli ping
22+
- uses: actions/checkout@v4
2423
- uses: ruby/setup-ruby@v1
2524
with:
26-
ruby-version: 2.7
25+
ruby-version: 3.4
2726
bundler-cache: true
2827
env:
29-
BUNDLE_GEMFILE: ./spec/dummy/Gemfile
30-
- run: bundle exec rails test:system
28+
BUNDLE_GEMS__GRAPHQL__PRO: ${{ secrets.BUNDLE_GEMS__GRAPHQL__PRO }}
29+
BUNDLE_GEMFILE: gemfiles/rails_master.gemfile
30+
- run: bin/rails test:all
3131
working-directory: ./spec/dummy
32+
env:
33+
BUNDLE_GEMS__GRAPHQL__PRO: ${{ secrets.BUNDLE_GEMS__GRAPHQL__PRO }}
34+
BUNDLE_GEMFILE: ../../gemfiles/rails_master.gemfile
3235
# Some coverage goals of these tests:
3336
# - Test once without Rails at all
3437
# - Test postgres, to make sure that the ActiveRecord
@@ -43,40 +46,65 @@ jobs:
4346
matrix:
4447
include:
4548
- gemfile: Gemfile
46-
ruby: 3.2
47-
# Rails 6.1 is tested with Postgresql below
49+
ruby: 3.4
50+
- gemfile: Gemfile
51+
ruby: 2.7 # lowest supported version
4852
- gemfile: gemfiles/rails_7.0.gemfile
4953
ruby: 3.1
50-
- gemfile: gemfiles/rails_master.gemfile
51-
ruby: 3.1
5254
- gemfile: gemfiles/rails_7.0.gemfile
5355
ruby: 3.2
5456
- gemfile: gemfiles/rails_7.1.gemfile
5557
ruby: 3.3
5658
- gemfile: gemfiles/rails_master.gemfile
5759
ruby: 3.3
60+
graphql_reject_numbers_followed_by_names: 1
61+
redis: 1
62+
- gemfile: gemfiles/rails_master.gemfile
63+
ruby: 3.4
64+
graphql_reject_numbers_followed_by_names: 1
65+
isolation_level_fiber: 1
66+
redis: 1
5867
runs-on: ubuntu-latest
5968
steps:
6069
- run: echo BUNDLE_GEMFILE=${{ matrix.gemfile }} > $GITHUB_ENV
70+
- run: echo GRAPHQL_REJECT_NUMBERS_FOLLOWED_BY_NAMES=1 > $GITHUB_ENV
71+
if: ${{ !!matrix.graphql_reject_numbers_followed_by_names }}
72+
- run: echo ISOLATION_LEVEL_FIBER=1 > $GITHUB_ENV
73+
if: ${{ !!matrix.isolation_level_fiber }}
74+
- uses: shogo82148/actions-setup-redis@v1
75+
with:
76+
redis-version: "7.x"
77+
if: ${{ !!matrix.redis }}
78+
- run: redis-cli ping
79+
if: ${{ !!matrix.redis }}
6180
- uses: actions/checkout@v4
6281
- uses: ruby/setup-ruby@v1
6382
with:
6483
ruby-version: ${{ matrix.ruby }}
6584
bundler-cache: true
66-
bundler: ${{ matrix.bundler || 'default' }}
6785
- run: bundle exec rake compile
6886
- run: bundle exec rake test
6987
javascript_test:
7088
runs-on: ubuntu-latest
7189
steps:
7290
- uses: actions/checkout@v4
73-
- uses: ruby/setup-ruby@v1
91+
- uses: actions/setup-node@v4
7492
with:
75-
ruby-version: 2.7
76-
bundler-cache: true
77-
- run: bundle exec rake js:all
93+
node-version: '21'
94+
- run: npm ci
95+
working-directory: ./javascript_client
96+
- run: npm test
97+
working-directory: ./javascript_client
7898
postgres_test:
7999
runs-on: ubuntu-latest
100+
strategy:
101+
matrix:
102+
include:
103+
- gemfile: gemfiles/rails_master.gemfile
104+
ruby: 3.3
105+
isolation_level_fiber: 1
106+
- gemfile: gemfiles/rails_7.1_postgresql.gemfile
107+
ruby: 3.3
80108
services:
81109
postgres:
82110
image: postgres:latest
@@ -93,23 +121,25 @@ jobs:
93121
--health-timeout 5s
94122
--health-retries 5
95123
steps:
96-
- run: echo BUNDLE_GEMFILE='gemfiles/rails_6.1_postgresql.gemfile' > $GITHUB_ENV
124+
- run: echo BUNDLE_GEMFILE='' > $GITHUB_ENV
97125
- run: echo DATABASE='POSTGRESQL' > $GITHUB_ENV
98126
- run: echo PGPASSWORD='postgres' > $GITHUB_ENV
99127
- run: echo GRAPHQL_CPARSER=1 > $GITHUB_ENV
128+
- run: echo ISOLATION_LEVEL_FIBER=1 > $GITHUB_ENV
129+
if: ${{ !!matrix.isolation_level_fiber }}
100130
- uses: actions/checkout@v4
101131
- uses: ruby/setup-ruby@v1
102132
with:
103-
ruby-version: 2.7
133+
ruby-version: "3.3"
104134
bundler-cache: true
105135
- run: bundle exec rake compile test
106136
mongodb_test:
107137
strategy:
108138
fail-fast: false
109139
matrix:
110140
gemfile:
111-
- gemfiles/mongoid_6.gemfile
112-
- gemfiles/mongoid_7.gemfile
141+
- gemfiles/mongoid_9.gemfile
142+
- gemfiles/mongoid_8.gemfile
113143
runs-on: ubuntu-latest
114144
services:
115145
mongodb:
@@ -121,6 +151,6 @@ jobs:
121151
- uses: actions/checkout@v4
122152
- uses: ruby/setup-ruby@v1
123153
with:
124-
ruby-version: 2.7
154+
ruby-version: 3.4
125155
bundler-cache: true
126156
- run: bundle exec rake compile test

Diff for: .github/workflows/pronto.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Pronto
2+
on:
3+
- pull_request_target
4+
5+
jobs:
6+
pronto:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- run: echo BUNDLE_GEMFILE=gemfiles/pronto.gemfile > $GITHUB_ENV
10+
- name: Checkout code
11+
uses: actions/checkout@v4
12+
- run: git fetch --no-tags --prune --unshallow origin +refs/heads/*:refs/remotes/origin/*
13+
- name: Setup Ruby
14+
uses: ruby/setup-ruby@v1
15+
with:
16+
ruby-version: 3.4
17+
bundler-cache: true
18+
- name: Run Pronto
19+
run: bundle exec pronto run -f github_pr -c origin/${{ github.base_ref }}
20+
env:
21+
PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
22+
PRONTO_GITHUB_ACCESS_TOKEN: "${{ github.token }}"

Diff for: .gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,25 @@ Gemfile.lock
77
gemfiles/*.lock
88
# Test database
99
*.db
10+
*.db-shm
11+
*.db-wal
12+
*.sqlite3
13+
.byebug_history
1014
.bundle/
1115
vendor/
1216
.idea/
17+
coverage/
1318

1419
_site
1520
.sass-cache
1621
.jekyll-metadata
1722
.jekyll-cache
1823
gh-pages/
1924
tmp/*
20-
__*.db
2125
node_modules/
2226
yarn.lock
2327
OperationStoreClient.js
28+
DumpPayloadExample.json
2429
spec/integration/tmp
2530
.vscode/
2631
*.swp

Diff for: .rubocop.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
require:
22
- ./cop/development/none_without_block_cop
3+
- ./cop/development/no_eval_cop
34
- ./cop/development/no_focus_cop
45
- ./lib/graphql/rubocop/graphql/default_null_true
56
- ./lib/graphql/rubocop/graphql/default_required_true
67
- ./cop/development/context_is_passed_cop
8+
- ./cop/development/trace_methods_cop.rb
79

810
AllCops:
911
DisabledByDefault: true
1012
SuggestExtensions: false
11-
TargetRubyVersion: 2.4
13+
TargetRubyVersion: 2.7
1214
Exclude:
1315
- 'lib/graphql/language/lexer.rb'
1416
- 'lib/graphql/language/parser.rb'
@@ -22,20 +24,9 @@ Development/ContextIsPassedCop:
2224
Exclude:
2325
- 'spec/**/*'
2426
- 'cop/**/*'
25-
# Legacy-related:
26-
- 'lib/graphql/*_type.rb'
27-
- 'lib/graphql/define/**/*.rb'
28-
- 'lib/graphql/relay/**/*'
29-
- 'lib/graphql/function.rb'
30-
- 'lib/graphql/directive.rb'
31-
- 'lib/graphql/field.rb'
32-
- 'lib/graphql/schema/traversal.rb'
33-
- 'lib/graphql/schema/possible_types.rb'
3427
- 'lib/graphql/schema/validation.rb'
35-
- 'lib/graphql/compatibility/**/*'
3628
- 'lib/graphql/static_validation/literal_validator.rb'
3729
- 'lib/graphql/static_validation/rules/**/*.rb'
38-
- 'lib/graphql/internal_representation/**/*.rb'
3930
# AST-related:
4031
- 'lib/graphql/schema/build_from_definition.rb'
4132
- 'lib/graphql/language/printer.rb'
@@ -51,10 +42,19 @@ Development/NoneWithoutBlockCop:
5142
- "lib/**/*"
5243
- "spec/**/*"
5344

45+
Development/NoEvalCop:
46+
Include:
47+
- "lib/**/*"
48+
5449
Development/NoFocusCop:
5550
Include:
5651
- "spec/**/*"
5752

53+
Development/TraceMethodsCop:
54+
Include:
55+
- "lib/graphql/tracing/perfetto_trace.rb"
56+
- "lib/graphql/tracing/notifications_trace.rb"
57+
5858
# def ...
5959
# end
6060
Layout/DefEndAlignment:

Diff for: CHANGELOG-enterprise.md

+45-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,51 @@
88

99
### Bug Fix
1010

11-
# 1.3.3 (30 Jan 2024
11+
# 1.5.6 (13 Dec 2024)
12+
13+
- ObjectCache: Add `CacheableRelation` helper for top-level ActiveRecord relations
14+
15+
# 1.5.5 (10 Dec 2024)
16+
17+
- Changesets: Add missing `ensure_loaded` call for class-based changesets
18+
19+
# 1.5.4 (31 Oct 2024)
20+
21+
- ObjectCache: Add `reauthorize_cached_objects: false`
22+
23+
# 1.5.3 (1 Oct 2024)
24+
25+
- Limiters: Add expiration to rate limit data (to reduce Redis footprint)
26+
27+
# 1.5.2 (6 Sept 2024)
28+
29+
- Limiters: Add `connection_pool:` support
30+
31+
# 1.5.1 (30 Aug 2024)
32+
33+
- ObjectCache: Add `connection_pool:` support
34+
35+
# 1.5.0 (26 Jul 2024)
36+
37+
- ObjectCache: Add Dalli backend for Memcached
38+
39+
# 1.4.2 (11 Jun 2024)
40+
41+
- ObjectCache: Add `Schema.fingerprint` hook and `context[:refresh_object_cache]`
42+
43+
# 1.4.1 (30 May 2024)
44+
45+
- ObjectCache: properly handle when object fingerprints are evicted but the cached result wasn't
46+
47+
# 1.4.0 (11 Apr 2024)
48+
49+
- ObjectCache: add support for `redis_cluster: ...` backend
50+
51+
# 1.3.4 (18 Mar 2024)
52+
53+
- ObjectCache: use new `trace_with` API for instrumentation
54+
55+
# 1.3.3 (30 Jan 2024)
1256

1357
- ObjectCache: fix compatibility with `run_graphql_field` test helper #4816
1458

0 commit comments

Comments
 (0)