Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Build using Nix (Ubuntu & macOS) #20

Closed
wants to merge 365 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
365 commits
Select commit Hold shift + click to select a range
53b3143
chore(version): v0.5.0 [skip ci]
Sep 6, 2023
a37f5d2
fix: trimming newline character from version string
ShubhranshuSanjeev Sep 6, 2023
47b615e
ci: deleting postgres's docker image on every test
ritickMadaanJuspay Sep 6, 2023
cd0cb60
chore(version): v0.5.1 [skip ci]
Sep 6, 2023
48fc4ad
feat: Schema addition for Dimension values
PrasannaJuspay Jul 31, 2023
dd17746
fix: fixed random timeouts in internal http calls to CAC
ShubhranshuSanjeev Sep 7, 2023
c249efc
fix: failed build due to untracked schema.rs file changes
ShubhranshuSanjeev Sep 8, 2023
7cda606
ci: added 20 minutes timeout on pipeline
ShubhranshuSanjeev Sep 8, 2023
b63c753
feat: Adding generic eval
Sep 7, 2023
4637fd9
added audit_log_uuid in response header for get_config api
sauraww Aug 23, 2023
a2fde06
feat: cac eval return update
Sep 11, 2023
a9c5b04
fix: eval param fix
Sep 12, 2023
a5f8757
chore(version): v0.6.0 [skip ci]
Sep 12, 2023
8e311c7
fix: patching overrides on default-config instead of merge
ritickMadaanJuspay Sep 18, 2023
5c471b2
chore(version): v0.6.1 [skip ci]
Sep 20, 2023
f14f9de
Stabilize & Revert API
mahatoankitkumar Sep 4, 2023
df0adf0
ci(flake.nix): pin nodejs version to 18 in flake
knutties Sep 25, 2023
6a5fe1f
feat: cors middleware attached
ritickMadaanJuspay Oct 3, 2023
6e01ead
Stabilize & Revert API
mahatoankitkumar Sep 4, 2023
47b20da
Diff API
mahatoankitkumar Sep 28, 2023
5ca8766
feat: added dashboard auth middleware
Datron Sep 25, 2023
150a7be
chore(version): v0.7.0 [skip ci]
Oct 5, 2023
3da23da
fix: ssh.bitbucket.juspay.net added to known hosts in docker bulid
ritickMadaanJuspay Oct 5, 2023
1ac80c4
fix: add user struct in delete context API
Datron Oct 5, 2023
a9e50be
chore(version): v0.7.1 [skip ci]
Oct 5, 2023
1337d34
chore: database migration for dimensions table
ritickMadaanJuspay Oct 5, 2023
585a15c
feat: server's keep-alive time and db connection pool max size made c…
ritickMadaanJuspay Oct 9, 2023
ee5e00c
chore(version): v0.8.0 [skip ci]
Oct 9, 2023
7b6ae82
fix: add migration for changing default_configs_keys
pratikmishra356 Oct 9, 2023
189c369
chore(version): v0.8.1 [skip ci]
Oct 10, 2023
71c7a25
feat: support to update experiment override_keys and variants
ShubhranshuSanjeev Aug 28, 2023
7a60eea
test: added tests for experiment helper fnxs
ShubhranshuSanjeev Sep 4, 2023
38bc0e9
test: added postman test for update override_keys api
ShubhranshuSanjeev Sep 4, 2023
400f3f0
fix: validating override_keys for unique entries
ShubhranshuSanjeev Sep 12, 2023
4422c83
refactor: resolved comments
ShubhranshuSanjeev Sep 14, 2023
dc2db17
chore(version): v0.9.0 [skip ci]
Oct 10, 2023
ef7a37d
fix: add all variants in manifest
pratikmishra356 Oct 4, 2023
eddd8a4
chore(version): v0.9.1 [skip ci]
Oct 13, 2023
be2ddd2
validation for input override key
mahatoankitkumar Oct 13, 2023
3e9fd4a
removed override from move context api
sauraww Aug 23, 2023
2c810f7
feat: - Dimension value schema validation on context-addition
PrasannaJuspay Jul 25, 2023
6d09f90
chore(version): v0.10.0 [skip ci]
Oct 20, 2023
2fa26dd
refactor!: moved tables and types out of cac_v1 schema
ShubhranshuSanjeev Sep 15, 2023
df2edb6
feat: added middleware and FromRequest for tenant and app scope info
ShubhranshuSanjeev Sep 18, 2023
44e9b47
feat: added multi-tenant support
ShubhranshuSanjeev Oct 11, 2023
7c429a7
chore(version): v0.11.0 [skip ci]
Oct 25, 2023
ae8c9be
fixed priority in the move api
sauraww Oct 26, 2023
f524388
feat: multi-tenant support for client libraries
ShubhranshuSanjeev Oct 19, 2023
3a604b0
fix: fixed failing health check (x-tenant header not set)
ShubhranshuSanjeev Oct 27, 2023
1612123
chore(version): v0.12.0 [skip ci]
Oct 27, 2023
cb5a92f
fix: x-tenant header mandate removed for OPTIONS calls
ritickMadaanJuspay Oct 31, 2023
9f18f58
chore(version): v0.12.1 [skip ci]
Oct 31, 2023
bbecd7b
fix: x-tenant header added for /config/resolve call in diff
ritickMadaanJuspay Nov 3, 2023
900fbb8
fix: added external crate to cocogitto config
ritickMadaanJuspay Nov 6, 2023
5aafc72
chore(version): v0.13.0 [skip ci]
Nov 6, 2023
507e08c
fix: make sure envs with defaults prevent failure
Datron Oct 25, 2023
eccf091
feat: integrate authorize middleware
Datron Oct 10, 2023
01d94ae
chore(version): v0.14.0 [skip ci]
Nov 8, 2023
8ad81c3
fix: cac service to set last_modified header
mahatoankitkumar Oct 19, 2023
c7fae30
CAC Filter API
mahatoankitkumar Oct 7, 2023
ac5fe3c
fix: Removing acceptance of override_keys in experiment create/update
mahatoankitkumar Nov 8, 2023
00137db
chore(version): v0.14.1 [skip ci]
Nov 9, 2023
345b4af
feat: added frontend crate,combined frontend and backend binaries ()
sauraww Oct 5, 2023
3611ef3
feat: added format check in the JenkinsFile()
sauraww Oct 12, 2023
bb87c89
chore: move dependencies to workspaces
Datron Oct 10, 2023
da2a4e3
fix: failing build due to update of schema.rs file
ShubhranshuSanjeev Nov 10, 2023
3afb567
chore(version): v0.15.0 [skip ci]
Nov 11, 2023
7730c41
fix: add different auth types for exp requests to CAC
Datron Nov 14, 2023
9cac541
chore(version): v0.15.1 [skip ci]
Nov 16, 2023
c13b140
feat: update default keys
mahatoankitkumar Oct 26, 2023
c33b445
fix: fixed deployment ConfigNotFound failure
ShubhranshuSanjeev Nov 16, 2023
3d037dc
chore(version): v0.16.0 [skip ci]
Nov 16, 2023
78a03e2
fix: sort json while context creation
pratikmishra356 Nov 8, 2023
ba87783
chore(version): v0.16.1 [skip ci]
Nov 22, 2023
892f29c
fix: allow ramp 0
Datron Nov 29, 2023
ce7e53e
chore(version): v0.16.2 [skip ci]
Nov 30, 2023
bec2f1b
fix: - Cac client library changes to consume backend api response
PrasannaJuspay Sep 25, 2023
6a68f71
fix: fix json schema validation
mahatoankitkumar Dec 18, 2023
8e7db1f
fix: array validation for in condition
pratikmishra356 Dec 21, 2023
e4d4ef8
chore(version): v0.16.3 [skip ci]
Dec 27, 2023
7e87921
feat: ui for cac and exp
ShubhranshuSanjeev Nov 16, 2023
1f4bd77
feat: experiment UI
Datron Nov 20, 2023
d00db1c
feat: added experiment-list page
ShubhranshuSanjeev Nov 22, 2023
24b4cbf
feat: dimensions
mahatoankitkumar Dec 5, 2023
3a6036c
feat: override and context form
ShubhranshuSanjeev Nov 29, 2023
bf94e31
feat: working experiments page
Datron Nov 20, 2023
c8bcfcc
feat: added default config page
sauraww Nov 24, 2023
27f1236
feat: added default config and override screen
sauraww Nov 30, 2023
3ce29f0
feat: experiment UI
Datron Nov 20, 2023
ba2eb38
feat: working experiments page
Datron Nov 21, 2023
c697e4d
feat: testing create form
Datron Dec 6, 2023
3843763
feat: added state changes in the form
sauraww Dec 7, 2023
b04d3f5
fix: dimensions page updates
mahatoankitkumar Dec 8, 2023
c651e4a
feat: working resolve page
Datron Dec 8, 2023
6376194
feat: fixed theme + ui changes + form validation + context validation…
sauraww Dec 12, 2023
588d15a
feat: experiment create form
ShubhranshuSanjeev Dec 13, 2023
93a3abd
feat: fixed experiment suspense block , added generic button
sauraww Dec 14, 2023
27fbb99
feat: working resolve page
Datron Dec 8, 2023
83d0f03
feat: resolve page with unified UI
Datron Dec 14, 2023
8b0d0a3
fix: resolve UI bugs
Datron Dec 18, 2023
97f7f1b
feat: added validation inside default config form , formatted dates ,…
sauraww Dec 18, 2023
ba2d33b
fix: context parsing
Datron Dec 18, 2023
41905a6
fix: fixed experiment list page feedback
ShubhranshuSanjeev Dec 15, 2023
adafb49
fix: frontend multi-tenancy support + config and dimension page
ShubhranshuSanjeev Dec 18, 2023
caa9739
fix: UI fixes for demo
Datron Dec 19, 2023
4db1f16
chore: formatted frontend code
ShubhranshuSanjeev Dec 20, 2023
0ee0618
refactor: fixed warnings, added redirection for home page and script …
sauraww Dec 21, 2023
1d710f3
refactor: fixed warnings, added redirection for home page and script …
sauraww Dec 21, 2023
6e9b329
fix: minor docs update
Datron Dec 22, 2023
00c36a6
fix: cleanup code
Datron Dec 22, 2023
cad8e7f
fix: fixed ci-test to support multi-tenant setup
ShubhranshuSanjeev Jan 2, 2024
3311c5e
fix: fixed tenant hydration bug
sauraww Jan 4, 2024
ec7aecc
chore: formatted code + cleanup
ShubhranshuSanjeev Jan 4, 2024
5759a15
chore(version): v0.17.0 [skip ci]
Jan 4, 2024
55ac190
fix: fixed build failure due to rust-version
ShubhranshuSanjeev Jan 4, 2024
c937b68
fix: frontend build process
ShubhranshuSanjeev Jan 8, 2024
06bcd1a
chore(version): v0.17.1 [skip ci]
Jan 12, 2024
8a5b1b1
refactor: using snake case for component fxn names
ShubhranshuSanjeev Jan 11, 2024
a297aca
fix: fixed dimension form edit flow + fixed table component CellForma…
ShubhranshuSanjeev Jan 11, 2024
dfd8abb
fix: refactored DefaultConfig component + fixed edit flow
ShubhranshuSanjeev Jan 11, 2024
46ca970
fix: error resolving pages with internal call to server
ShubhranshuSanjeev Jan 17, 2024
cf9ab88
chore(version): v0.17.2 [skip ci]
Jan 18, 2024
5c0ebc3
fix: fixed host resolve issue for internal calls in SSR.
ShubhranshuSanjeev Jan 18, 2024
c0f69aa
chore(version): v0.17.3 [skip ci]
Jan 22, 2024
917aa73
fix: added partitions for 2025 and 2026 for audit table
ShubhranshuSanjeev Jan 18, 2024
cebd182
chore(version): v0.17.4 [skip ci]
Jan 22, 2024
8141696
fix: getting api hostname from env for frontend
ShubhranshuSanjeev Jan 22, 2024
4bf9ac8
feat: added between in frontend
Jan 5, 2024
be4b637
chore(version): v0.18.0 [skip ci]
Jan 22, 2024
0ca6832
ci: added NY ECR registry push to Jenkins
ShubhranshuSanjeev Jan 29, 2024
7d9c5fe
fix: added partitions for audit_log table in cac schema
ShubhranshuSanjeev Jan 23, 2024
811bbae
ci: removing test tenant sqls after ci-test
ShubhranshuSanjeev Jan 29, 2024
c52344e
chore(version): v0.18.1 [skip ci]
Jan 29, 2024
1c678b9
fix: refactored experiment page and fixed experiment edit flow
ShubhranshuSanjeev Jan 21, 2024
e1ab466
feat: added authentication header for frontend apis
sauraww Jan 23, 2024
d407b5a
chore(version): v0.19.0 [skip ci]
Jan 31, 2024
adad811
feat: added bool, i64 and decimal in default config form
sauraww Feb 2, 2024
e528e10
docs: () added setup instruction
sauraww Feb 8, 2024
f0993c7
feat: client-integration-doc
pratikmishra356 Feb 8, 2024
e3a338d
docs: context aware config docs
Datron Feb 8, 2024
2b54792
chore: experimentation docs first cut
ShubhranshuSanjeev Feb 8, 2024
5a0f48a
docs: add intro doc and features
knutties Feb 8, 2024
eb1fba3
docs: add intro doc and features
knutties Feb 8, 2024
28e0694
docs: add intro doc and features
knutties Feb 8, 2024
7f21af5
chore: autodeploy to sbx
Datron Feb 12, 2024
ee2254f
fix: jenkinsfile now sends build alerts in channel
Datron Feb 15, 2024
3d64762
fix: fixing error message for experiment create and bulk context api
Jan 22, 2024
ce58f47
ci: pushing cac image to NY sbx ECR
ShubhranshuSanjeev Feb 15, 2024
975ecf7
chore(version): v0.20.0 [skip ci]
Feb 15, 2024
660c642
fix: better logging
Datron Feb 12, 2024
9915af9
chore(version): v0.20.1 [skip ci]
Feb 19, 2024
19223be
feat: support for service prefix
ShubhranshuSanjeev Feb 12, 2024
2ac33ed
chore(version): v0.21.0 [skip ci]
Feb 20, 2024
b018117
fix: using SERVICE_NAME in is_server instead of SERVER_NAME(wrong var…
ShubhranshuSanjeev Feb 21, 2024
f4e4a31
chore(version): v0.22.0 [skip ci]
Feb 21, 2024
3786b69
feat: js eval with node exec
pratikmishra356 Feb 9, 2024
267dc4a
chore(version): v0.23.0 [skip ci]
Feb 22, 2024
0bb238e
feat: CRUD APIs for function validator
mahatoankitkumar Feb 22, 2024
06974f1
fix: Do not remove keys with null value on merge
ayushjain17 Feb 21, 2024
372c9de
chore(version): v0.24.0 [skip ci]
Feb 22, 2024
f039558
fix: fix copy of experiment ID
Datron Feb 23, 2024
f2a437b
chore(version): v0.24.1 [skip ci]
Feb 26, 2024
8ccb942
fix: returning error response if CAC call not 200
ShubhranshuSanjeev Feb 27, 2024
aa56d9b
chore(version): v0.24.2 [skip ci]
Feb 27, 2024
a270dee
fix: add traffic percentage to experiments table
Datron Feb 26, 2024
f3bfcc0
fix: transpose columns in single experiment page for variants
Datron Feb 26, 2024
fb5bb46
feat: autodeploy
Datron Feb 27, 2024
6667206
chore(version): v0.25.0 [skip ci]
Feb 28, 2024
a5e50d6
fix: autodeploy
Datron Feb 28, 2024
3910299
feat: added test,publish api for functions
pratikmishra356 Feb 14, 2024
e6d8ed2
chore(version): v0.26.0 [skip ci]
Feb 29, 2024
5b51c63
feat: add node to app directory
pratikmishra356 Mar 1, 2024
c678efe
chore(version): v0.27.0 [skip ci]
Mar 4, 2024
032dc3a
feat: Replace merge-strategy option for resolve/eval
ayushjain17 Feb 22, 2024
75396e5
chore(version): v0.28.0 [skip ci]
Mar 4, 2024
6553e30
feat: url click and text wrap fixes
SauravCVJuspay Mar 4, 2024
50c8a96
fix: added drawer, improved UX & single click override addition to va…
ShubhranshuSanjeev Feb 29, 2024
fa09a96
fix: added frontend crate to cog.toml
ShubhranshuSanjeev Mar 6, 2024
53a20b5
chore(version): v0.29.0 [skip ci]
Mar 6, 2024
096d683
feat: added CAC language support
Datron Nov 10, 2023
2c3d0dc
feat: support more operations
Datron Nov 16, 2023
038c898
chore(version): v0.30.0 [skip ci]
Mar 6, 2024
6f70186
fix: adding min-width settings for table component
Datron Mar 7, 2024
fd38192
chore(version): v0.30.1 [skip ci]
Mar 7, 2024
b3ad959
feat: Added function validation for context and default_config
mahatoankitkumar Mar 4, 2024
c602b93
chore(version): v0.31.0 [skip ci]
Mar 8, 2024
39bd090
docs: add intro doc and features
knutties Feb 8, 2024
0ce569b
feat: haskell client for superposition
Datron Feb 2, 2024
7067b36
fix: moved to AWS Public ECR for docker images
ShubhranshuSanjeev Mar 15, 2024
6897659
fix: update cargo.lock
Datron Mar 18, 2024
ae88083
chore(version): v0.32.0 [skip ci]
Mar 18, 2024
290b326
fix: added routes without service prefix for b/w compatibility
ShubhranshuSanjeev Mar 13, 2024
b177bc9
chore(version): v0.32.1 [skip ci]
Mar 19, 2024
d868254
fix: auto-create variantIds dimension
mahatoankitkumar Mar 14, 2024
396c68d
fix: Functions bug fixes
mahatoankitkumar Mar 14, 2024
f4dba31
chore(version): v0.32.2 [skip ci]
Mar 20, 2024
3005cfc
feat: refactor resolve page
Datron Mar 8, 2024
693a023
chore(version): v0.33.0 [skip ci]
Mar 21, 2024
0c61362
feat: Filter Config by prefix
mahatoankitkumar Mar 11, 2024
7856b95
fix: ui bug fix for contexts
SauravCVJuspay Mar 15, 2024
fb14036
fix: added type for condition
SauravCVJuspay Mar 20, 2024
bd807ec
chore(version): v0.34.0 [skip ci]
Mar 21, 2024
6201a2d
fix: filter config fix
mahatoankitkumar Mar 21, 2024
9a458c6
chore(version): v0.34.1 [skip ci]
Mar 21, 2024
aad2b7a
fix: JS validator functions to take config value and key
mahatoankitkumar Mar 27, 2024
7b3c3e7
chore(version): v0.34.2 [skip ci]
Mar 27, 2024
85751e0
docs: add intro doc and features
knutties Feb 8, 2024
af6ea75
feat: haskell client for superposition
Datron Feb 2, 2024
4e2be48
chore: rename superposition to experimentation
Datron Feb 16, 2024
659d384
feat: client interface improvements
Datron Feb 20, 2024
7e859fc
feat: function ui
pratikmishra356 Mar 12, 2024
e5164de
feat: added support for dynamic json schema in frontend
sauraww Apr 1, 2024
de71bb2
fix: empty key filters should return all keys
Datron Apr 5, 2024
53af262
feat: -js-secure-sandbox
pratikmishra356 Mar 28, 2024
233bf7d
chore(version): v0.35.0 [skip ci]
Apr 5, 2024
c86b89a
feat: added decimal support in context and override form and fixed d…
sauraww Mar 11, 2024
cdc46ce
chore(version): v0.36.0 [skip ci]
Apr 5, 2024
606947c
fix: add path to node_modules
pratikmishra356 Apr 5, 2024
ebba320
chore(version): v0.36.1 [skip ci]
Apr 8, 2024
d170727
feat: added new result, error type and error macros
ShubhranshuSanjeev Mar 21, 2024
a99f4af
refactor: refactored service to use new error type and better error …
ShubhranshuSanjeev Mar 30, 2024
4f9f9a6
chore(version): v0.37.0 [skip ci]
Apr 10, 2024
59ecc4c
feat: Add function support in dimension and default config form
mahatoankitkumar Apr 5, 2024
9208b3e
chore(version): v0.38.0 [skip ci]
Apr 10, 2024
42881c8
fix: added service-prefix to functions endpoints
mahatoankitkumar Apr 10, 2024
ea982bf
chore(version): v0.38.1 [skip ci]
Apr 10, 2024
6735635
fix: function route fix
pratikmishra356 Apr 12, 2024
64560fb
chore(version): v0.38.2 [skip ci]
Apr 12, 2024
0cc2e6d
feat: Add filter support to client
mahatoankitkumar Apr 8, 2024
5db1ba4
fix: fixed error in client
mahatoankitkumar Apr 15, 2024
3405b5d
chore(version): v0.39.0 [skip ci]
Apr 16, 2024
bdfdaed
fix: removed audit log middleware and reduced max db connection pool…
sauraww Apr 15, 2024
9cf8f81
chore(version): v0.39.1 [skip ci]
Apr 17, 2024
f1dca84
feat: created new types crate for superposition movement
Datron Apr 17, 2024
4ae27f2
feat: add auth_type so this can be used when making API calls
Datron Apr 17, 2024
5f7af15
feat: ready for open source!
Datron Apr 17, 2024
cdfe3f4
chore(version): v0.40.0 [skip ci]
Apr 18, 2024
cbd5b6f
chore: open source superposition
Datron Apr 18, 2024
6085588
chore: add PR testing workflows (#6)
Datron Apr 22, 2024
15840e7
chore: update merge workflow to work (#8)
Datron Apr 22, 2024
3b7e262
fix: post merge release tagging
Datron Apr 23, 2024
b1462bc
chore(version): v0.41.0 [skip ci]
Apr 24, 2024
6c9eccf
fix: run github merge action only on PR merge
Datron Apr 24, 2024
7af4542
fix: Do not lowercase dmension inputs while resolving (#11)
ayushjain17 Apr 26, 2024
5ac099d
feat: Added grouping in default_config page (#9)
mahatoankitkumar Apr 26, 2024
761a69b
fix: merge build setup
Datron Apr 26, 2024
1a9861c
fix: fixed function template (#16)
mahatoankitkumar May 2, 2024
8f0db34
chore: trigger semver workflow manually (#18)
Datron May 2, 2024
a00ff7e
chore(nix): Disable clippy
srid May 2, 2024
0ffcf3e
chore(ci): Build using Nix
srid May 2, 2024
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
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
target
node-modules
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = false
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false

[makefile]

charset = utf-8
indent_style = tab
indent_size = 2
1 change: 0 additions & 1 deletion .env

This file was deleted.

26 changes: 26 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
DATABASE_URL=postgres://postgres:docker@localhost:5432/config?sslmode=disable
RUST_LOG=debug
AWS_ACCESS_KEY_ID=test
AWS_SECRET_ACCESS_KEY=test
AWS_SESSION_TOKEN=test
AWS_REGION=ap-south-1
DB_USER=postgres
DB_HOST=dockerdns:5432
DB_NAME=config
APP_ENV=DEV
AWS_REGION_ENDPOINT=http://localhost:4566
ALLOW_SAME_KEYS_OVERLAPPING_CTX=true
ALLOW_DIFF_KEYS_OVERLAPPING_CTX=true
ALLOW_SAME_KEYS_NON_OVERLAPPING_CTX=true
CAC_HOST="http://localhost:8080"
API_HOSTNAME="http://localhost:8080"
CONTEXT_AWARE_CONFIG_VERSION="v0.1.0"
HOSTNAME="<application_name>-<deployment_id>-<replicaset>-<pod>"
MJOS_ALLOWED_ORIGINS=https://potato.in,https://onion.in,http://localhost:8080
ACTIX_KEEP_ALIVE=120
MAX_DB_CONNECTION_POOL_SIZE=3
ENABLE_TENANT_AND_SCOPE=true
TENANTS=dev,test
TENANT_MIDDLEWARE_EXCLUSION_LIST="/health,/assets/favicon.ico,/pkg/frontend.js,/pkg,/pkg/frontend_bg.wasm,/pkg/tailwind.css,/pkg/style.css,/assets,/admin,/"
SERVICE_PREFIX=""
SERVICE_NAME="CAC"
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @juspay/sdk-backend
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Problem
Describe the problem you are trying to solve here

## Solution
Provide a brief summary of your solution so that reviewers can understand your code

## Environment variable changes

What ENVs need to be added or changed

## Pre-deployment activity
Things needed to be done before deploying this change (if any)

## Post-deployment activity
Things needed to be done after deploying this change (if any)

## API changes
| Endpoint | Method | Request body | Response Body |
| ------------- |:-------------:| -----:| ----------------:|
| API | GET/POST, etc | request | response |

## Possible Issues in the future
Describe any possible issues that could occur because of this change
132 changes: 132 additions & 0 deletions .github/workflows/ci_check_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: CI Checks on PRs

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# Disable incremental compilation.
#
# Incremental compilation is useful as part of an edit-build-test-edit cycle,
# as it lets the compiler avoid recompiling code that hasn't changed. However,
# on CI, we're not making small edits; we're almost always building the entire
# project from scratch. Thus, incremental compilation on CI actually
# introduces *additional* overhead to support making future builds
# faster...but no future builds will ever occur in any given CI environment.
#
# See https://matklad.github.io/2021/09/04/fast-rust-builds.html#ci-workflow
# for details.
CARGO_INCREMENTAL: 0
# Allow more retries for network requests in cargo (downloading crates) and
# rustup (installing toolchains). This should help to reduce flaky CI failures
# from transient network timeouts or other issues.
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
# Don't emit giant backtraces in the CI logs.
RUST_BACKTRACE: short
# Use cargo's sparse index protocol
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_SESSION_TOKEN: test
AWS_REGION: ap-south-1
APP_ENV: "TEST"

jobs:
formatting:
name: Check formatting
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

# - name: Check git settings
# shell: bash
# run: |
# echo "${{ github.event.pull_request.head.ref }}"
# git log --pretty=oneline --abbrev-commit
# echo "----------------"
# git tag "abc_tag" ${{github.event.pull_request.head.sha}}
# git tag

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.76.0
targets: wasm32-unknown-unknown
components: rustfmt, clippy

- name: Check formatting
shell: bash
run: cargo fmt --all --check

- name: install cocogitto
uses: baptiste0928/[email protected]
with:
crate: cocogitto

- name: Check conventional commit
shell: bash
run: |
git config --global user.name "${{ github.event.pull_request.user.login }}"
git config --global user.email "[email protected]"
commit=$(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }})
cog verify "$commit"

test:
name: Testing
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12-alpine
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: "docker"
POSTGRES_DB: "config"
restart: on-failure

localstack:
image: localstack/localstack:1.3.0
ports:
- 4510-4559:4510-4559 # external service port range
- 4566:4566 # LocalStack Edge Proxy
- 4571:4571
env:
LOCALSTACK_SERVICES: kms
AWS_DEFAULT_REGION: ap-south-1
EDGE_PORT: 4566
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.76.0
targets: wasm32-unknown-unknown
components: rustfmt, clippy

- name: install node
uses: actions/setup-node@v4
with:
node-version: 18.19.0

- name: Install wasm-pack
shell: bash
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

- name: run tests
shell: bash
run: |
export DB_PASSWORD=`./docker-compose/localstack/get_db_password.sh | base64 --decode` && echo $DB_PASSWORD
make ci-test
env:
APP_ENV: "TEST"
49 changes: 49 additions & 0 deletions .github/workflows/ci_merge_main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Create release tags

permissions:
contents: write

on: workflow_dispatch

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tag-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.SUPERPOSITION_TOKEN }}

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.76.0
targets: wasm32-unknown-unknown
components: rustfmt, clippy

- name: install cargo-edit to perform set-version
uses: baptiste0928/[email protected]
with:
crate: cargo-edit

- name: install cocogitto
uses: baptiste0928/[email protected]
with:
crate: cocogitto

- name: Semver release
shell: bash
run: |
git config user.email "[email protected]"
git config user.name "Superposition Bot"
cog bump --auto --skip-ci-override "[skip ci]"

- name: Push code to main
shell: bash
run: |
git push origin --tags
24 changes: 24 additions & 0 deletions .github/workflows/nix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "CI Nix"
on:
# Run only when pushing to main branch, and making PRs
push:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srid can this be manually triggered instead of on every pull request and merge to main?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Datron CI should generally run on every PR and on commits to main. Why do you want to run it manually? The latter is risky that people may merge broken PRs into main.

Also, I think I should re-open the PR because someone seemed to have force-pushed to main branch.

Copy link
Collaborator

@Datron Datron May 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srid You can just rebase, should get rid of the conflicts. Sorry for the trouble, I force pushed to main.

CI should generally run on every PR and on commits to main. Why do you want to run it manually? The latter is risky that people may merge broken PRs into main.

We already have a code check and build with cargo and tests, would nixci build do the same thing?

Copy link
Member Author

@srid srid May 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It builds the Rust package (via cargo), runs tests (cargo tests) and effectively makes sure that flake.nix remains not-broken for the user.

Other checks in the existing action like the one below can also be eventually moved to Nix, so that all of our checks run in CI via Nix. Just like it is in nammayatri. If there's consensus for that, I can help with doing it.

- name: Check formatting
shell: bash
run: cargo fmt --all --check

branches:
- main
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-14]
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
trusted-public-keys = cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://cache.garnix.io?priority=41 https://cache.nixos.org/
- uses: yaxitech/nix-install-pkgs-action@v3
with:
packages: "github:srid/nixci"
- run: nixci build
70 changes: 21 additions & 49 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,61 +1,33 @@
# These are some examples of commonly ignored file patterns.
# You should customize this list as applicable to your project.
# Learn more about .gitignore:
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore

# Node artifact files
node_modules/
dist/
build/



/backend/target

# Compiled Java class files
*.class



*Cargo.lock

# Compiled Python bytecode
*.py[cod]

# Log files
*.log

# Package files
*.jar

# Maven
# cargo
target/
dist/

# JetBrains IDE
.idea/

# Unit test reports
TEST*.xml

# Generated by MacOS
.DS_Store

# Generated by Windows
Thumbs.db

# Applications
*.app
*.exe
*.war

# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv

.package-lock.json

.env

# nix build outputs
backend/result
backend/.tmp
backend/logfile
backend/*PGSQL*
backend/.env
.direnv
/result
/result-*
clients/haskell/result
clients/haskell/dist-newstyle
# dev
bacon.toml
docker-compose/localstack/export_cyphers.sh
test_logs
.keep
.vscode
*.session.sql
2 changes: 2 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
edition="2018"
max_width=90
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

Loading
Loading