nonnative 2.21.0 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.circleci/config.yml +4 -4
- data/.gitignore +1 -0
- data/AGENTS.md +50 -0
- data/Gemfile.lock +10 -12
- data/lib/nonnative/configuration.rb +6 -1
- data/lib/nonnative/process.rb +8 -7
- data/lib/nonnative/version.rb +1 -1
- data/lib/nonnative.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c6a28ed00f9a9f438eb6bb7e8d22d35db3fb782cd474e9fb0208ea0995fb2095
|
|
4
|
+
data.tar.gz: 1f0e7dca06e10e39b8c85d6a0e6e72173e42e59247b50b125f7b8ef2ecf059f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b0c6743f7ea67383c12d28d613485eed2297518e28e39212da0c246a9bf1ad368b15dbeacf93946763ff241e9a5bbc179ac2a0493e5ea00d93ab7c6b1c06eeb0
|
|
7
|
+
data.tar.gz: 1bc6deab711706f351ff546ba776b2952c38452ad05c29897820a08dfede80267673e3bc50048f6ed525edee3025c558b2fb7dcdb1cf7cf50c124cfa86e3a312
|
data/.circleci/config.yml
CHANGED
|
@@ -3,7 +3,7 @@ version: 2.1
|
|
|
3
3
|
jobs:
|
|
4
4
|
build:
|
|
5
5
|
docker:
|
|
6
|
-
- image: alexfalkowski/ruby:3.
|
|
6
|
+
- image: alexfalkowski/ruby:3.12
|
|
7
7
|
working_directory: ~/nonnative
|
|
8
8
|
steps:
|
|
9
9
|
- checkout:
|
|
@@ -35,7 +35,7 @@ jobs:
|
|
|
35
35
|
resource_class: arm.large
|
|
36
36
|
sync:
|
|
37
37
|
docker:
|
|
38
|
-
- image: alexfalkowski/release:8.
|
|
38
|
+
- image: alexfalkowski/release:8.11
|
|
39
39
|
working_directory: ~/nonnative
|
|
40
40
|
steps:
|
|
41
41
|
- checkout:
|
|
@@ -46,7 +46,7 @@ jobs:
|
|
|
46
46
|
resource_class: arm.large
|
|
47
47
|
version:
|
|
48
48
|
docker:
|
|
49
|
-
- image: alexfalkowski/release:8.
|
|
49
|
+
- image: alexfalkowski/release:8.11
|
|
50
50
|
working_directory: ~/nonnative
|
|
51
51
|
steps:
|
|
52
52
|
- checkout:
|
|
@@ -58,7 +58,7 @@ jobs:
|
|
|
58
58
|
resource_class: arm.large
|
|
59
59
|
wait-all:
|
|
60
60
|
docker:
|
|
61
|
-
- image: alexfalkowski/ruby:3.
|
|
61
|
+
- image: alexfalkowski/ruby:3.12
|
|
62
62
|
steps:
|
|
63
63
|
- run: echo "all applicable jobs finished"
|
|
64
64
|
resource_class: arm.large
|
data/.gitignore
CHANGED
data/AGENTS.md
CHANGED
|
@@ -25,6 +25,56 @@ of dependencies.
|
|
|
25
25
|
- Benchmarks only: `make benchmarks`
|
|
26
26
|
- Cleanup: `make clean-dep`, `make clean-reports`
|
|
27
27
|
|
|
28
|
+
## Intentional Design Choices
|
|
29
|
+
|
|
30
|
+
- Root `make` compatibility is GNU Make 4+/`gmake` oriented through the shared
|
|
31
|
+
`bin/build/make/*.mak` fragments. Do not flag GNU Make 3.81 parsing failures
|
|
32
|
+
as code issues unless the task is explicitly about supporting GNU Make 3.81.
|
|
33
|
+
- The configured HTTP proxy feature intentionally uses the external
|
|
34
|
+
`www.afalkowski.com` host through `features/support/http_proxy_server.rb`.
|
|
35
|
+
Do not flag this external dependency as a code issue unless the task is
|
|
36
|
+
explicitly about making HTTP proxy fixtures fully hermetic.
|
|
37
|
+
- `test/Makefile` intentionally consumes the shared Buf make fragment as-is.
|
|
38
|
+
Do not flag its inherited `breaking` target's `subdir=api` comparison as a
|
|
39
|
+
code issue unless the task is explicitly about changing test proto breaking
|
|
40
|
+
checks.
|
|
41
|
+
- `nonnative` is a test-support gem used across many downstream projects.
|
|
42
|
+
Do not flag the absence of an isolated gem build/install smoke test as a
|
|
43
|
+
test gap unless the task is explicitly about release packaging or gem
|
|
44
|
+
publication validation.
|
|
45
|
+
- The Cucumber `@startup` lifecycle tag is exercised by downstream projects
|
|
46
|
+
that use this gem. Do not flag missing in-repository `@startup` acceptance
|
|
47
|
+
coverage as a test gap unless the task is explicitly about changing
|
|
48
|
+
Cucumber startup hook behavior.
|
|
49
|
+
- `Nonnative.go_argv` and `Nonnative.go_command` flag combinations are checked
|
|
50
|
+
by external/downstream usage. Do not flag missing in-repository exhaustive
|
|
51
|
+
`-test.*` flag or tool-filtering assertions as a test gap unless the task is
|
|
52
|
+
explicitly about changing Go command generation.
|
|
53
|
+
- Generated gRPC test stubs under `test/grpc/` are updated on demand when the
|
|
54
|
+
test proto changes. Do not flag the absence of an automatic generated-stub
|
|
55
|
+
freshness check as a test gap unless the task is explicitly about changing
|
|
56
|
+
test proto generation or generated-file validation.
|
|
57
|
+
- Buf linting for the test-only proto module is intentionally not part of the
|
|
58
|
+
required local validation surface. Do not flag missing root-level validation
|
|
59
|
+
for `test/buf.yaml` as a test gap unless the task is explicitly about test
|
|
60
|
+
proto linting or Buf validation.
|
|
61
|
+
- The public proxy reset Cucumber steps and `@reset` hook are tested by
|
|
62
|
+
external/downstream suites. Do not flag missing in-repository direct proxy
|
|
63
|
+
reset step coverage as a test gap unless the task is explicitly about
|
|
64
|
+
changing proxy reset behavior.
|
|
65
|
+
- `Nonnative.clear` configuration and pool reset behavior is covered by
|
|
66
|
+
external/downstream suites. Do not flag missing in-repository assertions for
|
|
67
|
+
configuration or pool clearing as a test gap unless the task is explicitly
|
|
68
|
+
about changing clear/reset lifecycle behavior.
|
|
69
|
+
- Full repository validation is expected to run both regular features and
|
|
70
|
+
benchmark-tagged lifecycle scenarios. Do not flag rollback/timeout lifecycle
|
|
71
|
+
coverage living under `features/benchmark.feature` as a test gap unless the
|
|
72
|
+
task is explicitly about changing validation target composition.
|
|
73
|
+
- Service proxy round-trip behavior is validated by downstream projects that
|
|
74
|
+
use `nonnative` against real dependencies. Do not flag the in-repository
|
|
75
|
+
service proxy success scenario's connection-only assertion as a test gap
|
|
76
|
+
unless the task is explicitly about changing service proxy forwarding.
|
|
77
|
+
|
|
28
78
|
## Runtime Model
|
|
29
79
|
|
|
30
80
|
Public entry point: `lib/nonnative.rb`.
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
nonnative (2.
|
|
4
|
+
nonnative (2.22.0)
|
|
5
5
|
concurrent-ruby (>= 1, < 2)
|
|
6
6
|
config (>= 5, < 6)
|
|
7
7
|
cucumber (>= 7, < 12)
|
|
@@ -24,7 +24,7 @@ GEM
|
|
|
24
24
|
benchmark-malloc (0.2.0)
|
|
25
25
|
benchmark-perf (0.6.0)
|
|
26
26
|
benchmark-trend (0.4.0)
|
|
27
|
-
bigdecimal (4.1.
|
|
27
|
+
bigdecimal (4.1.2)
|
|
28
28
|
builder (3.3.0)
|
|
29
29
|
concurrent-ruby (1.3.6)
|
|
30
30
|
config (5.6.1)
|
|
@@ -49,7 +49,7 @@ GEM
|
|
|
49
49
|
cucumber-tag-expressions (> 6, < 9)
|
|
50
50
|
cucumber-cucumber-expressions (18.1.0)
|
|
51
51
|
bigdecimal
|
|
52
|
-
cucumber-gherkin (39.
|
|
52
|
+
cucumber-gherkin (39.1.0)
|
|
53
53
|
cucumber-messages (>= 31, < 33)
|
|
54
54
|
cucumber-html-formatter (23.1.0)
|
|
55
55
|
cucumber-messages (> 23, < 33)
|
|
@@ -79,9 +79,9 @@ GEM
|
|
|
79
79
|
google-protobuf (>= 3.25, < 5.0)
|
|
80
80
|
googleapis-common-protos-types (~> 1.0)
|
|
81
81
|
http-accept (1.7.0)
|
|
82
|
-
http-cookie (1.1.
|
|
82
|
+
http-cookie (1.1.6)
|
|
83
83
|
domain_name (~> 0.5)
|
|
84
|
-
json (2.19.
|
|
84
|
+
json (2.19.5)
|
|
85
85
|
language_server-protocol (3.17.0.5)
|
|
86
86
|
lint_roller (1.1.0)
|
|
87
87
|
logger (1.7.0)
|
|
@@ -89,15 +89,14 @@ GEM
|
|
|
89
89
|
mime-types (3.7.0)
|
|
90
90
|
logger
|
|
91
91
|
mime-types-data (~> 3.2025, >= 3.2025.0507)
|
|
92
|
-
mime-types-data (3.2026.
|
|
92
|
+
mime-types-data (3.2026.0414)
|
|
93
93
|
mini_mime (1.1.5)
|
|
94
94
|
multi_test (1.1.0)
|
|
95
|
-
mustermann (3.
|
|
96
|
-
ruby2_keywords (~> 0.0.1)
|
|
95
|
+
mustermann (3.1.1)
|
|
97
96
|
netrc (0.11.0)
|
|
98
97
|
nio4r (2.7.5)
|
|
99
98
|
ostruct (0.6.3)
|
|
100
|
-
parallel (2.0
|
|
99
|
+
parallel (2.1.0)
|
|
101
100
|
parser (3.3.11.1)
|
|
102
101
|
ast (~> 2.4.1)
|
|
103
102
|
racc
|
|
@@ -114,7 +113,7 @@ GEM
|
|
|
114
113
|
base64 (>= 0.1.0)
|
|
115
114
|
rack (>= 3.0.0)
|
|
116
115
|
rainbow (3.1.1)
|
|
117
|
-
rake (13.
|
|
116
|
+
rake (13.4.2)
|
|
118
117
|
rbs (4.0.2)
|
|
119
118
|
logger
|
|
120
119
|
prism (>= 1.6.0)
|
|
@@ -147,7 +146,7 @@ GEM
|
|
|
147
146
|
rspec-support (3.13.7)
|
|
148
147
|
rspec-wait (1.0.2)
|
|
149
148
|
rspec (>= 3.4)
|
|
150
|
-
rubocop (1.86.
|
|
149
|
+
rubocop (1.86.2)
|
|
151
150
|
json (~> 2.3)
|
|
152
151
|
language_server-protocol (~> 3.17.0.2)
|
|
153
152
|
lint_roller (~> 1.1.0)
|
|
@@ -166,7 +165,6 @@ GEM
|
|
|
166
165
|
prism (>= 1.2, < 2.0)
|
|
167
166
|
rbs (>= 3, < 5)
|
|
168
167
|
ruby-progressbar (1.13.0)
|
|
169
|
-
ruby2_keywords (0.0.5)
|
|
170
168
|
simplecov (0.22.0)
|
|
171
169
|
docile (~> 1.1)
|
|
172
170
|
simplecov-html (~> 0.11)
|
|
@@ -151,7 +151,7 @@ module Nonnative
|
|
|
151
151
|
servers = cfg.servers || []
|
|
152
152
|
servers.each do |fd|
|
|
153
153
|
server do |s|
|
|
154
|
-
s.klass = Object.const_get(fd
|
|
154
|
+
s.klass = Object.const_get(server_class_name(fd))
|
|
155
155
|
runner_attributes(s, fd)
|
|
156
156
|
|
|
157
157
|
proxy s, fd.proxy
|
|
@@ -172,6 +172,11 @@ module Nonnative
|
|
|
172
172
|
end
|
|
173
173
|
end
|
|
174
174
|
|
|
175
|
+
def server_class_name(server)
|
|
176
|
+
values = server.to_h
|
|
177
|
+
values[:class] || values.fetch('class')
|
|
178
|
+
end
|
|
179
|
+
|
|
175
180
|
def runner_attributes(runner, loaded)
|
|
176
181
|
runner.name = loaded.name
|
|
177
182
|
runner.timeout = loaded.timeout
|
data/lib/nonnative/process.rb
CHANGED
|
@@ -41,14 +41,19 @@ module Nonnative
|
|
|
41
41
|
#
|
|
42
42
|
# The process is signalled using the configured signal (defaults to `INT` when not set).
|
|
43
43
|
#
|
|
44
|
-
# @return [Integer,
|
|
44
|
+
# @return [Array<(Integer, Boolean)>]
|
|
45
|
+
# a tuple of:
|
|
46
|
+
# - the pid that was stopped (or `nil` if the process was never started)
|
|
47
|
+
# - whether the process exited before the configured timeout
|
|
45
48
|
def stop
|
|
49
|
+
stopped = true
|
|
50
|
+
|
|
46
51
|
if process_exists?
|
|
47
52
|
process_kill
|
|
48
|
-
wait_stop
|
|
53
|
+
stopped = !wait_stop.nil?
|
|
49
54
|
end
|
|
50
55
|
|
|
51
|
-
pid
|
|
56
|
+
[pid, stopped]
|
|
52
57
|
ensure
|
|
53
58
|
proxy.stop
|
|
54
59
|
end
|
|
@@ -85,10 +90,6 @@ module Nonnative
|
|
|
85
90
|
environment = service.environment.to_h
|
|
86
91
|
environment = environment.transform_keys(&:to_s).transform_values(&:to_s)
|
|
87
92
|
|
|
88
|
-
environment.each_key do |k|
|
|
89
|
-
environment[k] = ENV.fetch(k, nil) || environment[k]
|
|
90
|
-
end
|
|
91
|
-
|
|
92
93
|
command = Array(service.command.call)
|
|
93
94
|
|
|
94
95
|
spawn(environment, *command, %i[out err] => [service.log, 'a']).tap do |pid|
|
data/lib/nonnative/version.rb
CHANGED
data/lib/nonnative.rb
CHANGED
|
@@ -238,8 +238,10 @@ module Nonnative
|
|
|
238
238
|
errors = []
|
|
239
239
|
return if @pool.nil?
|
|
240
240
|
|
|
241
|
-
errors.concat(@pool.stop do |name,
|
|
241
|
+
errors.concat(@pool.stop do |name, values, result|
|
|
242
|
+
id, stopped = Array(values).then { |v| [v.first, v.fetch(1, true)] }
|
|
242
243
|
errors << "Stopped #{name} with id #{id}, though did not respond in time" unless result
|
|
244
|
+
errors << "Stopped #{name} with id #{id}, though the process did not exit in time" unless stopped
|
|
243
245
|
end)
|
|
244
246
|
nil
|
|
245
247
|
rescue StandardError => e
|
|
@@ -302,8 +304,10 @@ module Nonnative
|
|
|
302
304
|
errors = []
|
|
303
305
|
return errors if @pool.nil?
|
|
304
306
|
|
|
305
|
-
errors.concat(@pool.rollback do |name,
|
|
307
|
+
errors.concat(@pool.rollback do |name, values, result|
|
|
308
|
+
id, stopped = Array(values).then { |v| [v.first, v.fetch(1, true)] }
|
|
306
309
|
errors << "Rollback failed for #{name} with id #{id}, because it did not stop in time" unless result
|
|
310
|
+
errors << "Rollback failed for #{name} with id #{id}, because the process did not exit in time" unless stopped
|
|
307
311
|
end)
|
|
308
312
|
rescue StandardError => e
|
|
309
313
|
errors << unexpected_lifecycle_error(:rollback, e)
|