forked from foursquare/fsqio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pants.ini
529 lines (421 loc) · 13.2 KB
/
pants.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
# Pants config for Foursquare Fsq.io
[GLOBAL]
print_exception_stacktrace: True
enable_pantsd: False
# We use os.environ in a few RPM BUILD files that want to consume the shared version from env.sh.
# TODO(mateo): Consider a macro for environmental variables upstream.
build_file_imports: allow
kill_nailguns: True
# cc-shapefile hosting for Fsq.io users.
binaries_baseurls: +[
'https://github.com/foursquare/cc-shapefiles/raw/master/blobs/',
]
# The pants_version value is only used in Fsq.io, although checked on each run everywhere.
# TODO(mateo): Move just the version declaration to a deployed file so we can unit test the
# rest of this config against prod.
pants_version: 1.7.0
backend_packages: +[
'pants.contrib.go',
'pants.contrib.node',
'fsqio.pants.buildgen.core',
'fsqio.pants.buildgen.jvm',
'fsqio.pants.buildgen.python',
'fsqio.pants.buildgen.spindle',
'fsqio.pants.export',
'fsqio.pants.ivy',
'fsqio.pants.mypy',
'fsqio.pants.node',
'fsqio.pants.publish',
'fsqio.pants.rpmbuild',
'fsqio.pants.spindle',
'fsqio.pants.tags',
]
# Mixed into all cache keys. Bump this to invalidate all existing artifacts.
# We are using timestamps for cache keys. To bump it run `date +%Y-%m-%d:%H:%M:%S` and paste in the output.
cache_key_gen_version: '2018-09-05:21:44:04'
# The build_ignore_patterns uses .gitignore syntax.
build_ignore: [
'.*/',
'/.pants.d',
'.git',
'*.orig',
'*.rej',
'*.pyc',
'.local_artifact_cache',
'.pants.bootstrap',
'.pants.d',
'.pantsenv',
'.pids',
'.pvenvs',
'.wheelhouse',
'environ.sh',
'/api',
'/dependencies',
'/dist',
'/etc',
'/log',
'/mongo-testdb',
'/out',
'/scripts',
'/target',
'/yourkit',
'node_modules/',
'python_cache/',
]
[DEFAULT]
pants_workdir: %(buildroot)s/.pants.d
pants_supportdir: %(buildroot)s/build-support
pants_distdir: %(buildroot)s/dist
_base_jvm_options: [
'-Duser.timezone=UTC',
'-Dfile.encoding=UTF-8',
'-Djava.awt.headless=true',
'-XX:+AggressiveOpts',
'-XX:+UseCompressedOops',
'-Xss4096k',
'-server',
]
# Effectively runtime options.
_dev_jvm_options: %(_base_jvm_options)s + [
'-XX:ReservedCodeCacheSize=512m',
'-noverify',
'-Dmongo.connectionsPerHost=10',
'-Dmongo.threadsAllowedToBlockForConnectionMultiplier=10',
]
###
#
# Default Values for Pants Options
# These redefine the default value for all Pants options with the same name, regardles of scope.
#
###
# NOTE: These are matched by option *name* and it is easy to accidentally override more than you expected!
# Overrides *all* options named "option" - this was the only effective way to override the defaults.
jvm_options: %(_base_jvm_options)s + ['-Xmx2g']
#### Pants Task Options
[scala-platform]
version: custom
suffix_version: 2.11
[jvm-distributions]
minimum_version: 1.8.0
maximum_version: 1.8.999
[jvm-platform]
default_platform: java8
platforms: {
'java8': {'source': '8', 'target': '8', 'args': [] },
}
[jvm]
options: %(_base_jvm_options)s + ['-Xmx2g']
[jvm.run.jvm]
options: %(_dev_jvm_options)s + [
'-Xmx4g',
]
[jvm.repl.scala]
options: %(_dev_jvm_options)s + [
'-Xmx4g',
'-Dscala.usejavacp=true',
'-DconsoleMode=true',
]
[jvm.test.junit]
options: %(_dev_jvm_options)s + [
"-Xmx4g",
"-Drun.mode=test",
'-Dscala.usejavacp=true',
"-Djava.security.manager",
"-Djava.security.policy=%(buildroot)s/test/jvm/fsqio.tests.policy",
]
[compile.zinc]
worker_count: 4
# Unneeded since we use buildgen.
unused_deps: ignore
jvm_options: %(_base_jvm_options)s + [
'-XX:+UseConcMarkSweepGC',
'-XX:ParallelGCThreads=4',
'-XX:+PrintGCDetails',
'-XX:+PrintGCTimeStamps',
'-Dzinc.analysis.cache.limit=5000',
'-Xmx6g',
]
warning_args: []
no_warning_args: [
'-S-nowarn',
]
args: [
'-S-encoding', '-SUTF-8',
'-S-deprecation',
'-S-unchecked',
'-S-feature',
'-S-Xfatal-warnings',
'-S-g:vars',
'-S-language:existentials',
'-S-language:implicitConversions',
'-S-language:reflectiveCalls',
'-S-language:postfixOps',
'-S-language:higherKinds',
]
incremental: True
fail_fast: True
[repl.scala]
main: ammonite.Main
[binary.dup]
skip: True
[test.junit]
parallel_threads: 4
use_experimental_runner: True
output_mode: FAILURE_ONLY
default_concurrency: PARALLEL_CLASSES_AND_METHODS
use_experimental_runner: True
fail_fast: True
chroot: True
fast: False
[clean-all]
async: True
[reporting]
# This cuts down on the verbosity of pants output
# Comment out these lines to see warnings and other output
console_label_format: {
'COMPILER' : 'SUPPRESS',
}
console_tool_output_format: {
'COMPILER' : 'SUPPRESS',
}
[bundle.jvm]
use_basename_prefix: True
[go-distribution]
version: 1.10.3
[thrift.gen.go-thrift]
version: 0.9.3
[goals]
logdir: /tmp/%(user)s/goals
[ivy]
# NOTE(mateo): These settings are also hardcoded in a python mixin, a hack we needed in order to test Pants tasks
# that invoke JVM tools. Changes to Ivy config often requires migrating the mixin, look under test/python/**/pants.
ivy_profile: %(pants_supportdir)s/ivy/fsqio/fsqio.ivy.xml
ivy_settings: %(pants_supportdir)s/ivy/fsqio/fsqio.ivysettings.xml
cache_dir: %(homedir)s/.pom2
[thrift]
version: 0.9.1
[node-distribution]
version: v8.8.1
[build-spindle]
jvm_options: %(_base_jvm_options)s + ['-Xmx4g']
spindle_codegen_binary: src/jvm/io/fsq/spindle/codegen:spindle
[gen.spindle]
jvm_options: %(_base_jvm_options)s + ['-Xmx4g']
scala_ssp_template: src/resources/io/fsq/ssp/codegen/scala
java_ssp_template: src/resources/io/fsq/ssp/codegen/javagen
spindle_codegen_binary: src/jvm/io/fsq/spindle/codegen:spindle
runtime_dependency: [
'3rdparty:finagle',
'3rdparty:thrift',
'src/jvm/io/fsq/spindle/runtime',
]
write_annotations_json: true
[ide-gen.spindle-stubs]
jvm_options: %(_base_jvm_options)s + ['-Xmx4g']
scala_ssp_template: src/resources/io/fsq/ssp/codegen/scalainterface
spindle_codegen_binary: src/jvm/io/fsq/spindle/codegen:spindle
runtime_dependency: [
'3rdparty:finagle',
'3rdparty:thrift',
'src/jvm/io/fsq/spindle/runtime',
]
# NOTE(mateo): This is the Fsq.io path, should work with internal users to migrate to this and deprecate surplus path.
stub_output_path: %(buildroot)s/scripts/fsqio/IntelliJ/spindle_stubs/
[lint.scalafmt]
skip=True
[fmt.scalafmt]
configuration: %(buildroot)s/build-support/fsqio/scalafmt/config
[fmt.scalafix]
skip=True
[pytest]
# NOTE(mateo): Keep this in sync with the version in requirements.txt.
requirements: pytest==3.6.4
[test.pytest]
timeouts: true
fail_fast: True
# Need this timeout for some luigi auto tests.
timeout_default: 110
# Overridden here because we define a jvm-related 'options' in our default section.
options=[]
chroot: True
fast: False
[jar-dependency-management]
default_target: 3rdparty:fsqio-management
[publish.jar]
ivy_settings: %(pants_supportdir)s/ivy/fsqio/fsqio.publish.ivysettings.xml
# This is a dummy repo and is unused by Foursquare.
repos = {
'oss_sonatype_repo': {
'resolver': 'oss.sonatype.org-publish',
'confs': ['default', 'sources'],
'auth': 'build-support:oss.sonatype.org'
}
}
restrict_push_branches: master
restrict_push_urls: [email protected]:foursquare/fsqio.git
[repl.py]
# NOTE(mateo): Please keep the ipython version in sync with 3rdparty/python/requirements.txt.
ipython_requirements: ['ipython==5.0.0']
ipython: True
[mypy]
config_file: %(buildroot)s/build-support/fsqio/mypy/mypy.ini
[buildgen]
source_dirs: [
'src',
'3rdparty',
]
test_dirs: [
'test',
]
target_whitelist: [
'java_tests',
'jsonc_config',
'jsonc_library',
'junit_tests',
'python_library',
'python_tests',
'scala_library',
'scala_record_library',
'scala_soy_library',
'scalac_plugin',
'spindle_thrift_library'
]
managed_dependency_aliases: [
'jar_library',
'jsonc_config',
'jsonc_library',
'python_library',
'python_requirement_library',
'scala_library',
'scala_soy_library',
'scala_record_library',
]
buildgen_target_bags: [
'src/thrift/io/fsq:all_thrift',
]
[buildgen.python]
fatal: True
first_party_packages = [
'fsqio',
'fsqio_test,'
]
ignored_prefixes: [
'argparse', # builtin, excluded because the 3rdparty version is installed transitively.
'geojson', # twofishes script in src/jvm.
'lvm', # linuxonly
'shapely', # twofishes script - requires c headers and not in virtualenv
]
# Surprised to see that py-zipkin is required here.
third_party_map: {
'gen': {
'apache': {
'aurora': '3rdparty/python:apache.aurora.thrift',
'thermos': '3rdparty/python:apache.aurora.thermos',
},
},
'github3': {
'DEFAULT': '3rdparty/python:github3.py',
},
'pants': {
'DEFAULT': '3rdparty/python:pantsbuild.pants',
'contrib': {
'node': '3rdparty/python:pantsbuild.pants.contrib.node',
'go': '3rdparty/python:pantsbuild.pants.contrib.go',
},
},
'pants_test': {
'DEFAULT': '3rdparty/python:pantsbuild.pants.testinfra',
},
'py_zipkin': {
'DEFAULT': '3rdparty/python:py-zipkin',
},
'twitter': {
'common': {
'thrift': '3rdparty/python:twitter.common.service-thrift',
},
},
}
[tag]
# Currently overridden internally, possible bug in dict_option.
by_prefix: +{
'3rdparty': ['exempt'],
'test': ['tests'],
'verification': ['tests'],
'src': ['dependencies_cannot_have:tests'],
'build-support/fsqio': ['opensource', 'dependencies_must_have:opensource'],
'src/jvm/io/fsq': ['opensource', 'dependencies_must_have:opensource'],
'src/resources/io/fsq': ['opensource', 'dependencies_must_have:opensource'],
'src/python/fsqio': ['opensource', 'dependencies_must_have:opensource'],
'src/thrift/io/fsq': ['opensource', 'dependencies_must_have:opensource'],
'test/jvm/io/fsq': ['opensource', 'dependencies_must_have:opensource'],
'test/python/fsqio': ['opensource', 'dependencies_must_have:opensource'],
'test/thrift/io/fsq': ['opensource', 'dependencies_must_have:opensource'],
# Tests can rely on the spindle_codegen, but src dependencies are banned.
'test': ['spindle_codegen'],
'src/jvm/io/fsq/fhttp': ['fscommon'],
'src/jvm/io/fsq/spindle/rogue': ['fscommon'],
'src/jvm/io/fsq/spindle/runtime': ['fscommon'],
'src/jvm/io/fsq/spindle/common/thrift': ['fscommon'],
'src/jvm/io/fsq/rogue': ['fscommon'],
'src/thrift/io/fsq/common': ['fscommon'],
# NOTE(mateo): Another isolation case, where this is a proxy for 'dependencies_must_have_one_of: rogue, fscommon'.
'src/jvm/io/fsq/common': ['fscommon', 'rogue'],
'src/jvm/io/fsq/field': ['fscommon', 'rogue'],
}
[resolve.ivy]
disable_reports: True
resolution_report_outdir: 3rdparty/reports/jvm
global_excludes: [
{"org": "org.slf4j", "name": "slf4j-jdk14"},
{"org": "org.slf4j", "name": "slf4j-log4j12"},
{"org": "org.slf4j", "name": "slf4j-simple"},
{"org": "log4j", "name": "log4j"},
{"org": "log4j", "name": "apache-log4j-extras"},
{"org": "org.apache.logging.log4j", "name": "log4j-core"},
{"org": "org.apache.logging.log4j", "name": "log4j-api"},
{"org": "org.mongodb", "name": "mongo-java-driver"},
{"org": "com.esotericsoftware.kryo", "name": "kryo"},
{"org": "com.esotericsoftware", "name": "reflectasm"},
{"org": "org.apache.hadoop", "name": "hadoop-client"},
{"org": "org.apache.hadoop", "name": "hadoop-core"},
{"org": "io.netty", "name": "netty-buffer"},
{"org": "io.netty", "name": "netty-codec"},
{"org": "io.netty", "name": "netty-codec-dns"},
{"org": "io.netty", "name": "netty-codec-haproxy"},
{"org": "io.netty", "name": "netty-codec-http"},
{"org": "io.netty", "name": "netty-codec-http2"},
{"org": "io.netty", "name": "netty-codec-memcache"},
{"org": "io.netty", "name": "netty-codec-mqtt"},
{"org": "io.netty", "name": "netty-codec-smtp"},
{"org": "io.netty", "name": "netty-codec-socks"},
{"org": "io.netty", "name": "netty-codec-stomp"},
{"org": "io.netty", "name": "netty-common"},
{"org": "io.netty", "name": "netty-handler"},
{"org": "io.netty", "name": "netty-handler-proxy"},
{"org": "io.netty", "name": "netty-resolver"},
{"org": "io.netty", "name": "netty-resolver-dns"},
{"org": "io.netty", "name": "netty-transport"},
{"org": "io.netty", "name": "netty-transport-rxtx"},
{"org": "io.netty", "name": "netty-transport-sctp"},
{"org": "io.netty", "name": "netty-transport-ut"},
{"org": "org.jruby", "name": "jruby-complete"},
]
[cache.bundle]
# These are huge artifacts, but if bundle is upstream of your target, a few artifacts makes a difference.
max_entries_per_target = 1
[cache.binary]
# These are huge artifacts, but if bundle is upstream of your target, a few artifacts makes a difference.
max_entries_per_target = 1
[cache.test.junit]
ignore: False
read: True
write: True
[cache.test.pytest]
ignore: False
read: True
write: True
[cache.webpack.webpack-resolve]
# NOTE(mateo): This option is rolled into the task fingerprint - if it doesn't match the CI's config, the resulting
# artifacts will have mismatched cache_keys.
# Symlinks are not followed because node allows hanging symlinks as part of its fault-tolerant resolution process.
dereference_symlinks: False