Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Rebase with master #23

Merged
merged 655 commits into from
Jul 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
655 commits
Select commit Hold shift + click to select a range
ca60980
Fix variable spelling error
JoeWrightss Apr 10, 2019
ae2bee2
Merge pull request #1326 from JoeWrightss/patch-1
tomwilkie Apr 10, 2019
507aad1
Include metric name, label name, number of entries and limit in cardi…
tomwilkie Apr 10, 2019
0612ccf
Whitespace.
tomwilkie Apr 10, 2019
11ec426
Sort imports.
tomwilkie Apr 10, 2019
57db2ff
Make sure the deprecation points to right flag
gouthamve Apr 12, 2019
0d6a95e
ingester: Nuke deprecated flags.
gouthamve Apr 12, 2019
f3d70e1
querier: Nuke deprecated flags
gouthamve Apr 12, 2019
0054129
Merge pull request #1327 from gouthamve/default-eval-interval
gouthamve Apr 15, 2019
8809669
Nuke index cache deprecated flags.
gouthamve Apr 15, 2019
988e821
Remove a very spammy debug line
gouthamve Apr 16, 2019
93686f7
Merge pull request #1331 from gouthamve/debug-no-debug
gouthamve Apr 16, 2019
586e8f7
Update prometheus
gouthamve Apr 17, 2019
607149c
Update circle integration image to go 1.12
gouthamve Apr 17, 2019
cbfdbdb
Merge pull request #1335 from gouthamve/update-prom
gouthamve Apr 17, 2019
76a672f
split the query validation in two (time/limit and matcher)
cyriltovena Apr 19, 2019
c979eaa
Updated weaveworks/common vendor dependency
Apr 22, 2019
183b65a
Checking in updated vendor files after dep update
Apr 22, 2019
d091637
Updated table deletes to ignore empty prefixes
Apr 22, 2019
a4afefb
Put Distributor hash algorithm back the way it was before 922a3b989a
bboreham Apr 23, 2019
264b91a
Flip the ordering of schema, store and query so tests run faster
bboreham Apr 23, 2019
6c0451a
Fix comment typos
bboreham Apr 23, 2019
b8bb258
Merge pull request #1343 from cortexproject/revert-hash-change
bboreham Apr 23, 2019
a30d32f
Adds the ability the fetch label values from the store
cyriltovena Apr 19, 2019
5be81b0
Merge pull request #1339 from nrjpoddar/updateWeaveworksCommon
gouthamve Apr 24, 2019
590e72c
Merge pull request #1344 from cortexproject/store-tests-reuse-store
bboreham Apr 24, 2019
8bf46b1
Take UserID from chunk instead of context
bboreham Apr 24, 2019
9fd7caa
Refactor: do table names in just one place
bboreham Apr 25, 2019
0f86eb9
Merge pull request #1328 from grafana/1325-cardinality-limit
gouthamve Apr 29, 2019
79bba2f
Merge pull request #1341 from nrjpoddar/fixTableDeletes
gouthamve Apr 29, 2019
99d6715
minor: Better buckets for GCS latency
gouthamve Apr 30, 2019
435b228
Remove cortex_dynamo_query_retry_count histogram
bboreham Apr 27, 2019
335100c
Merge pull request #1312 from cortexproject/log-request-details
bboreham May 1, 2019
1e7c024
Merge pull request #1348 from cortexproject/dry-itoa
bboreham May 1, 2019
0070d45
Add SpanLogger.Error method
bboreham Mar 27, 2019
b9d1224
Wrap chunk errors to provide context when something breaks
bboreham May 1, 2019
7ade86d
Use spanlogger to trace more info in dynamodb client
bboreham Mar 27, 2019
122a19b
Re-use Set() method in URLValue.UnmarshalYAML()
bboreham May 1, 2019
6d17a1b
Extract Tags struct from table_manager.go
bboreham May 1, 2019
8ec9732
Support setting table tags in yaml
bboreham May 1, 2019
2af327c
Update dep metadata
bboreham May 1, 2019
f73e25a
Merge pull request #1363 from cortexproject/trace-ddb-query-errors
bboreham May 2, 2019
31d3be1
Merge pull request #1364 from cortexproject/wrap-chunk-errors
bboreham May 2, 2019
79cb7a6
Merge pull request #1365 from cortexproject/dry-yaml
bboreham May 2, 2019
d5a3c5f
Merge pull request #1357 from gouthamve/fix-gcs-buckets
gouthamve May 2, 2019
e8757ef
Merge pull request #1329 from gouthamve/flag-typo
gouthamve May 2, 2019
e1b192b
Merge pull request #1330 from gouthamve/nuke-flags
gouthamve May 2, 2019
eb6a61e
Merge pull request #1366 from cortexproject/yaml-tags
gouthamve May 2, 2019
dbb91c0
Merge pull request #1362 from cortexproject/remove-retry-histogram
gouthamve May 2, 2019
2c5518f
Merge pull request #1347 from cortexproject/chunk-userid
gouthamve May 2, 2019
68f2837
ensure overide metric defaults to 1
jtlisi May 2, 2019
891419f
add configs api docs
Jan 31, 2019
51e9bcb
address reviewer comments
Apr 23, 2019
16d1f31
Updated examples and added more references
bboreham May 3, 2019
fec6b50
Remove internal APIs from doc
bboreham May 3, 2019
365b9b5
Fix my JSON typos
bboreham May 3, 2019
19d2d51
consolidate configs format and add return codes to docs
May 3, 2019
576313f
fix spelling error
May 3, 2019
787679f
Simplify logic by outdenting logic.
gouthamve May 5, 2019
69269a2
Merge pull request #1215 from agrahamlincoln/configs-api-docs
bboreham May 5, 2019
c4180aa
Merge pull request #1374 from gouthamve/driveby-refactor
gouthamve May 6, 2019
51919b6
Expose the chunk config as YAML
gouthamve Apr 30, 2019
cd07e26
Update the vendor directory with the changes
gouthamve May 6, 2019
b92b0b1
Make sure there are no differences in vendor
gouthamve May 6, 2019
88db4e8
Merge branch 'master' into mod
gouthamve May 6, 2019
9103d01
fix go.sum
gouthamve May 7, 2019
ed4ec98
Nuke the final dep bits
gouthamve May 7, 2019
c47f117
Merge pull request #1356 from gouthamve/expose-cache-config-yaml
tomwilkie May 7, 2019
7e2103e
Merge pull request #1367 from grafana/20190501_register_limit_metric_…
tomwilkie May 7, 2019
d42a235
fix language issue
daixiang0 May 7, 2019
b1777a5
Merge pull request #1337 from Kuqd/chunkstore-labels
tomwilkie May 7, 2019
408e409
Revert "update test tool"
daixiang0 May 9, 2019
e2154c4
Merge pull request #1303 from daixiang0/mod
tomwilkie May 9, 2019
5623606
Run all proto generation in a single container
bboreham Apr 9, 2019
214ec10
Spelling
bboreham Apr 19, 2019
e847ffb
Update to go 1.12.5
tomwilkie May 9, 2019
174a438
Merge pull request #1338 from cortexproject/make-generation
tomwilkie May 9, 2019
f752b84
Merge pull request #1378 from grafana/update-go
tomwilkie May 9, 2019
78f1d92
Update CI image to go 1.12.5
tomwilkie May 9, 2019
8ab38ee
Update booth images.
tomwilkie May 9, 2019
4cf7b9f
Merge pull request #1380 from cortexproject/update-ci-image
tomwilkie May 9, 2019
e6a3e96
Single binary, single process Cortex.
tomwilkie Mar 6, 2019
8a019d3
Unify the config client between the alertmanager and the ruler.
tomwilkie Mar 25, 2019
5238d2c
Prefix frontend memcache flags with 'frontend.'
tomwilkie Mar 25, 2019
4fa102b
Don't register the config DB flags twice.
tomwilkie Mar 25, 2019
ea98df4
Remove the FromStr parsing hack in schema config, do it with a custom…
tomwilkie Mar 25, 2019
a3a7538
Add yaml struct tags to more config fields; Manage lifecycle of overi…
tomwilkie Mar 25, 2019
067009e
Add -print.config flag, which causes Cortex to print config and exit.
tomwilkie Apr 7, 2019
a5dee71
Add getting started guide and example config for running as a single …
tomwilkie Apr 7, 2019
f8c9ac1
Review feedback & minor fixups.
tomwilkie Apr 7, 2019
453443e
Update modules.txt
tomwilkie May 9, 2019
f43d891
Fixes from testing as microservices.
tomwilkie May 9, 2019
310897b
Review feedback.
tomwilkie May 13, 2019
7cb7de9
Update CI for moved migrations.
tomwilkie May 13, 2019
cee654f
Review feedback
tomwilkie May 13, 2019
0378daf
Make sure only series with chunks are sent
gouthamve May 13, 2019
d7d4ddf
Filter empty series client side too.
gouthamve May 13, 2019
21a0556
Merge pull request #1385 from gouthamve/dont-send-empty-series
gouthamve May 13, 2019
491fb2a
Register alertmanager config.
tomwilkie May 14, 2019
4ac3bf5
Allow alertmanager to start speaking directly to the DB.
tomwilkie May 14, 2019
34cb9d3
Write chunks to DynamoDB in the same request as index entries
bboreham May 14, 2019
d089a96
Extract two LabelsToMetric() functions to util package
bboreham May 8, 2019
8dfca62
Change Chunk.Metric from a map to a slice, for performance
bboreham May 8, 2019
871716c
Refactor tests to avoid going via Matrix
bboreham May 8, 2019
da65580
Move ChunksToMatrix() into test-only file
bboreham May 8, 2019
4bdde4d
Add jsoniter helpers for labels.Labels
bboreham May 8, 2019
219e6fa
Add a benchmark for index caching
bboreham May 8, 2019
5a3d2cc
Refactor: extract labelsForDummyChunks to avoid duplication
bboreham May 12, 2019
f0f99a3
Check chunk decode for backwards-compatibility
bboreham May 12, 2019
3599b72
Sort labels after JSON decode
bboreham May 12, 2019
54f6aec
Make sure ObjectClient also support bigtable-hashed
gouthamve May 15, 2019
ccd9362
Add /user_stats handler
tomwilkie May 15, 2019
3afa323
Merge pull request #1389 from cortexproject/combine-dynamo-writes
bboreham May 15, 2019
4bf1dcf
Merge pull request #1262 from grafana/single-binary
tomwilkie May 16, 2019
a9439b5
The lazy loading stuff
gouthamve Mar 27, 2019
5553e5f
review feedback
gouthamve Apr 29, 2019
647b4bc
Expose the limits override config fields to YAML
gouthamve May 16, 2019
826f004
Merge pull request #1392 from gouthamve/expose-override-file-config
tomwilkie May 16, 2019
d6bcc66
Update README with more description and links.
tomwilkie May 16, 2019
3535fb1
Consolidate further reading into the README.
tomwilkie May 16, 2019
97968f0
Add PromCon 2018 panel.
tomwilkie May 16, 2019
84b81e6
Add various blog posts.
tomwilkie May 16, 2019
7797773
Add another blog post.
tomwilkie May 16, 2019
88d5eda
Consistency
tomwilkie May 16, 2019
12aec3d
Add the ability to coordinate the ruler into a ring that shards the e…
jtlisi Feb 19, 2019
be63a81
Merge pull request #1345 from grafana/lazy-load-chunks
gouthamve May 17, 2019
975f5bb
Merge pull request #1390 from gouthamve/minor-fix
gouthamve May 17, 2019
dcce1ef
Apply suggestions from code review
tomwilkie May 17, 2019
11f7aea
Merge pull request #1393 from cortexproject/docs
tomwilkie May 17, 2019
44eb738
boltdb retention
sandeepsukhani May 9, 2019
1b52d80
tests for boltdb reload and some fixes
sandeepsukhani May 10, 2019
ea9219a
retention changes for filesystem as chunk store and relevant tests
sandeepsukhani May 10, 2019
8534c2a
Added BucketClient interface for chunk retention and relevant tests
sandeepsukhani May 15, 2019
2023706
improvements in boltdb reload code
sandeepsukhani May 16, 2019
ff6fc0a
some code refactoring in filesystem client
sandeepsukhani May 16, 2019
a50412e
Merge pull request #1258 from grafana/20190219_distributed_ruler
tomwilkie May 17, 2019
5982297
Support receiving samples from HA Prometheus pairs.
cstyan Feb 8, 2019
bac5e9c
Merge pull request #1226 from cstyan/callum-ha-instances
tomwilkie May 17, 2019
421333c
Merge pull request #1383 from sandlis/retention-changes
tomwilkie May 17, 2019
d0f8944
Merge pull request #1377 from cortexproject/chunk-labels
tomwilkie May 17, 2019
ebcd2d0
All should buld the docker images (and therefore the binaries and pro…
tomwilkie May 18, 2019
5097444
Commit the generated protos so Cortex can be used as a dependancy.
tomwilkie May 18, 2019
547353d
Expose table manager config for yaml
gouthamve May 18, 2019
729f6b3
Make sure we assign the ringname properly.
gouthamve May 18, 2019
a1e5c64
adding `kvstore` field to the ring config yaml to address #1403
khaines May 19, 2019
d29fcb2
add context as parameter to functions in DB interface
jtlisi May 19, 2019
e50af2f
Merge pull request #1404 from khaines/khaines/fix-singleContainer-config
tomwilkie May 20, 2019
61ddee7
Merge pull request #1401 from gouthamve/set-ringname
tomwilkie May 20, 2019
cc141c3
Check protos are consistent as part of CI.
tomwilkie May 20, 2019
1035fa1
Limiting chunks query start time with config
sandeepsukhani May 20, 2019
d092b20
Make sure we track all protos
gouthamve May 20, 2019
345a280
Merge pull request #1399 from cortexproject/makefile
tomwilkie May 20, 2019
acd24cf
Allow Cassandra config to be passed as YAML.
tomwilkie May 20, 2019
49303be
Remove flaky TestQueryTimeout test.
tomwilkie May 20, 2019
feb7951
Merge pull request #1408 from cortexproject/flaky-legacy
tomwilkie May 20, 2019
507683a
Update k8s manifests with target flags (#1398)
weeco May 21, 2019
64e394c
Merge pull request #1406 from sandlis/chunks-max-look-back
khaines May 21, 2019
dee54bf
Merge pull request #1400 from gouthamve/expose-tm-config
khaines May 21, 2019
88541de
Merge pull request #1407 from cortexproject/1342-cassandra-config-yaml
khaines May 21, 2019
67c13c8
Add an option to spread ingester flushes evenly over time
bboreham May 24, 2019
f1695ea
Use single image for demo manifests
csmarchbanks May 24, 2019
d6aa67a
Use ingester prefix for LifecyclerConfig
csmarchbanks May 24, 2019
97de9f4
Revert "Use ingester prefix for LifecyclerConfig"
csmarchbanks May 24, 2019
dad15af
Default Lifecycler flags to have the ingester prefix
csmarchbanks May 24, 2019
4412894
Add kubecon talks.
tomwilkie May 25, 2019
8aeaa83
Merge pull request #1415 from cortexproject/update-manifests
tomwilkie May 25, 2019
2adbf79
Merge pull request #1413 from cortexproject/lifecycle-ingester-prefix
tomwilkie May 25, 2019
bec610f
Merge pull request #1417 from cortexproject/kubecon
khaines May 25, 2019
f8172e5
New architecture drawing with alertmanager and ruler
weeco May 27, 2019
233131e
Add query path for chunk cache
weeco May 27, 2019
0fd829e
Cassandra Client miss ConnectTimeout config
mizeng May 28, 2019
601163d
fix rulers exiting the ring
jtlisi May 28, 2019
99ee1ff
Use a rate-limiter to back off on DynamoDB throttling
bboreham Apr 27, 2019
8bbd015
Add a counter for DynamoDB throttled events
bboreham Apr 27, 2019
a717415
Use throttling metric in DynamoDB write autoscaling
bboreham Apr 27, 2019
de58451
Deprecate but still obey -metrics.error-rate-query
bboreham May 15, 2019
a6c95e1
Encode write-dedupe keys as they are created
bboreham May 29, 2019
c5333d8
Pass userID explicitly to lookup functions
bboreham May 29, 2019
52745fd
Merge pull request #1394 from grafana/20190516_add_context_db_interface
tomwilkie May 29, 2019
7a6a202
fix(chunk/cache): Remove diskcache
tombrk May 29, 2019
9e34955
chore: vendor modules
tombrk May 29, 2019
16dc176
Add instructions for demoing HA Cortex.
tomwilkie May 27, 2019
03a7d6a
Add space between Grafana and Cloud.
tomwilkie May 27, 2019
761811b
Set replication factor to 1 for initial config.
tomwilkie May 27, 2019
1aa3845
Spelling.
tomwilkie May 27, 2019
e63b231
Update docs/getting_started.md
tomwilkie May 29, 2019
7b09fdd
Review feedback.
tomwilkie May 29, 2019
6ea9aa1
Merge pull request #1430 from cortexproject/move-key-encode
csmarchbanks May 29, 2019
bdd9854
Merge pull request #1361 from cortexproject/ratelimit-dynamodb-retries
bboreham May 30, 2019
133151c
Add GCS object client specific timeout
gouthamve May 29, 2019
0e83b55
refactor ruler to initialize workers and not store them in the struct
jtlisi May 30, 2019
bbc7a5b
Make series IDs backwards-compatible again
bboreham May 30, 2019
7bb4900
Merge pull request #1420 from cortexproject/getting-started
tomwilkie May 30, 2019
5f3a227
Merge pull request #1429 from cortexproject/explicit-userid
csmarchbanks May 30, 2019
8663244
Merge pull request #1423 from grafana/20190528_fix_ruler_ring_exit
csmarchbanks May 30, 2019
af1bb6e
Merge pull request #1426 from gouthamve/add-gcs-timeout
gouthamve May 31, 2019
1279347
frontend: Make sure no samples are repeating
gouthamve May 31, 2019
5534e39
Merge pull request #1434 from gouthamve/fix-repeated-samples
gouthamve May 31, 2019
d548ff6
Merge pull request #1432 from cortexproject/backwards-compatible-seri…
tomwilkie Jun 2, 2019
d24f481
Fix the bucket bounds
gouthamve Jun 3, 2019
53328b2
Pin the versions of the tools in the build container.
tomwilkie Jun 3, 2019
3ffcf52
Try even harder to build the protos in a single docker container.
tomwilkie Jun 3, 2019
7ae2979
Regenerate the protos with the new version.
tomwilkie Jun 3, 2019
b55746a
Use new build image.
tomwilkie Jun 3, 2019
15de516
Merge pull request #1431 from sh0rez/remove-diskcache
tomwilkie Jun 3, 2019
5612c6f
Merge pull request #1422 from mizeng/master
csmarchbanks Jun 4, 2019
e4ea483
Fix more metrics, make comments more explict
gouthamve Jun 4, 2019
c9b4e4c
Fix wait time on DynamoDB throttling
bboreham Jun 4, 2019
2275709
Simplify
bboreham Jun 5, 2019
b7f3d98
Merge pull request #1443 from cortexproject/fix-throttle-wait
bboreham Jun 5, 2019
53988eb
Merge pull request #1414 from cortexproject/spread-flushes
bboreham Jun 5, 2019
a491c4a
Merge pull request #1440 from gouthamve/bump-buckets
gouthamve Jun 5, 2019
a860d08
Update getting_started.md
paliwalpriyank Jun 4, 2019
d4867e2
Add user_stats handler back on querier
bboreham Jun 7, 2019
7689980
Merge pull request #1444 from paliwalpriyank/patch-1
bboreham Jun 7, 2019
2d189b0
Merge pull request #1451 from cortexproject/fix-user-stats
bboreham Jun 7, 2019
650f59d
Merge pull request #1442 from cortexproject/1370-pin-protoc
tomwilkie Jun 9, 2019
c1fa025
Extend TestForSeriesMatchingBatching() with both matchers and filters
bboreham Jun 10, 2019
e80e4bf
Batch series by number sent, not by number checked
bboreham Jun 10, 2019
53438df
Merge pull request #1458 from cortexproject/fix-querystream-batching
bboreham Jun 10, 2019
3cccb54
Avoid duplicate label index writes by combining LabelEntryCacheKeys a…
bboreham Jun 4, 2019
6ba9315
Merge pull request #1435 from cortexproject/optimise-label-entries
bboreham Jun 10, 2019
166427c
Add documentation for how to configure Jaeger
csmarchbanks Jun 5, 2019
5d867bc
Merge pull request #1445 from cortexproject/jaeger-docs
csmarchbanks Jun 10, 2019
9c376de
Remove redundant op name middleware.
gouthamve Jun 11, 2019
f218ddb
Make sure we send a 400 for large responses.
gouthamve Jun 10, 2019
fc6d055
Merge pull request #1421 from weeco/update-architecture-drawing
bboreham Jun 11, 2019
0225086
Return a NopIterator when bigchunk is empty
bboreham Jun 11, 2019
330d729
Merge pull request #1460 from gouthamve/fix-trace-ops
gouthamve Jun 11, 2019
47c631a
Merge pull request #1459 from gouthamve/limit-max
gouthamve Jun 11, 2019
70da0e7
Leave Server module running until end of shutdown
bboreham Jun 12, 2019
ad12700
Refactor: migrateRing() does not need to be a member function
bboreham Jun 12, 2019
473b333
Elide stop() function into its caller
bboreham Jun 12, 2019
fe16b2b
Merge pull request #1463 from cortexproject/stop-server-later
csmarchbanks Jun 12, 2019
5ca8c11
getting started: correcting remove docker network command
paliwalpriyank Jun 16, 2019
eb51f1f
migrateRing() should not mutate its argument
bboreham Jun 17, 2019
a8d01c6
Refactor: extract functions from lifecycler test
bboreham Jun 17, 2019
eebca6d
Add a test for ring lifecycle on restart
bboreham Jun 17, 2019
de92875
Handle normalised ring in TokensFor()
bboreham Jun 17, 2019
fc59490
Merge pull request #1466 from paliwalpriyank/master
csmarchbanks Jun 17, 2019
0224dc1
Merge pull request #1461 from cortexproject/nop-iterator
bboreham Jun 18, 2019
a7cedef
Merge pull request #1464 from cortexproject/normalised-ingester-startup
bboreham Jun 18, 2019
25feb75
Add BenchmarkChunkQueryableFromTar
Jun 25, 2019
107b7a9
Avoid writing duplicate chunks by checking the cache first
bboreham Jun 25, 2019
b04f55d
Merge pull request #1475 from cortexproject/dedupe-chunk-writes
bboreham Jun 26, 2019
e0c8232
Fix review comments
Jun 26, 2019
e6df7ed
avoid dead loop in boltdb_index_client when obtain file lock (#1471)
mizeng Jun 27, 2019
a544ff3
Merge pull request #1473 from codesome/tar-bench
tomwilkie Jun 28, 2019
e1ab549
Support custom endpoint for S3 (#1476)
mizeng Jun 28, 2019
8710a22
Merge remote-tracking branch 'upstream/master' into wal
Jul 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 16 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
# https://circleci.com/blog/circleci-hacks-reuse-yaml-in-your-circleci-config-with-yaml/
defaults: &defaults
docker:
- image: cortexproject/build-image:switch-imports-f7f4e51d7
- image: cortexproject/build-image:1370-pin-protoc-7ae297930
working_directory: /go/src/github.com/cortexproject/cortex

workflows:
Expand Down Expand Up @@ -34,7 +34,10 @@ jobs:
command: make BUILD_IN_CONTAINER=false lint
- run:
name: Check vendor directory is consistent.
command: make BUILD_IN_CONTAINER=false dep-check
command: make BUILD_IN_CONTAINER=false mod-check
- run:
name: Check protos are consistent.
command: make BUILD_IN_CONTAINER=false check-protos

test:
<<: *defaults
Expand All @@ -46,7 +49,7 @@ jobs:

integration:
docker:
- image: cortexproject/build-image:switch-imports-f7f4e51d7
- image: cortexproject/build-image:1370-pin-protoc-7ae297930
- image: circleci/postgres:9.6.2-alpine
environment:
POSTGRES_DB: configs_test
Expand All @@ -56,7 +59,7 @@ jobs:
- checkout
- run:
name: Integration Test
command: MIGRATIONS_DIR=$(pwd)/cmd/configs/migrations make BUILD_IN_CONTAINER=false configs-integration-test
command: MIGRATIONS_DIR=$(pwd)/cmd/cortex/migrations make BUILD_IN_CONTAINER=false configs-integration-test

build:
<<: *defaults
Expand All @@ -79,6 +82,15 @@ jobs:
touch build-image/.uptodate
make BUILD_IN_CONTAINER=false

- store_artifacts:
path: pkg/querier/frontend/frontend.pb.go
- store_artifacts:
path: pkg/chunk/storage/caching_index_client.pb.go
- store_artifacts:
path: pkg/ring/ring.pb.go
- store_artifacts:
path: pkg/ingester/client/cortex.pb.go

- run:
name: Save Images
command: make BUILD_IN_CONTAINER=false save-images
Expand Down
10 changes: 1 addition & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
cmd/alertmanager/alertmanager
cmd/configs/configs
cmd/distributor/distributor
cmd/ingester/ingester
cmd/querier/querier
cmd/query-frontend/query-frontend
cmd/ruler/ruler
cmd/table-manager/table-manager
cmd/lite/lite
cmd/test-exporter/test-exporter
cmd/cortex/cortex
.uptodate
.pkg
.cache
Expand Down
1 change: 1 addition & 0 deletions .lintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
./.git*
./tools*
./vendor*
./pkg/configs/legacy_promql*
68 changes: 68 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,71 @@ git commit -s -m "Here is my signed commit"
```

You can find further instructions [here](https://github.com/probot/dco#how-it-works).

## Building Cortex

To build:
```
make
```

(By default, the build runs in a Docker container, using an image built
with all the tools required. The source code is mounted from where you
run `make` into the build container as a Docker volume.)

To run the test suite:
```
make test
```

## Playing in `minikube`

First, start `minikube`.

You may need to load the Docker images into your minikube environment. There is
a convenient rule in the Makefile to do this:

```
make prime-minikube
```

Then run Cortex in minikube:
```
kubectl apply -f ./k8s
```

(these manifests use `latest` tags, i.e. this will work if you have
just built the images and they are available on the node(s) in your
Kubernetes cluster)

Cortex will sit behind an nginx instance exposed on port 30080. A job is deployed to scrape itself. Try it:

http://192.168.99.100:30080/api/prom/api/v1/query?query=up

If that doesn't work, your Minikube might be using a different ip address. Check with `minikube status`.

### Dependency management

We uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages.
This requires a working Go environment with version 1.11 or greater, git and [bzr](http://wiki.bazaar.canonical.com/Download) installed.

To add or update a new dependency, use the `go get` command:

```bash
# Pick the latest tagged release.
go get example.com/some/module/pkg

# Pick a specific version.
go get example.com/some/module/[email protected]
```

Tidy up the `go.mod` and `go.sum` files:

```bash
go mod tidy
go mod vendor
git add go.mod go.sum vendor
git commit
```

You have to commit the changes to `go.mod` and `go.sum` before submitting the pull request.
Loading