Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into pay-1860-mobile-pay-e…
Browse files Browse the repository at this point in the history
…xtra-2

* origin/main:
  [PROTO-1293] Reverse proxy to healthz from mediorum server (#6193)
  Optimize trending requests (#6199)
  [INF-499] Update paths for uploading prober artifacts (#6197)
  Bump version to 0.4.22
  Readall when serving image. (#6201)
  [PAY-1884] Audio matching challenges for buyer and seller (#6175)
  [PAY-1917] Add parens around seconds (#6198)
  FollowsYou badge uses trpc (#6195)
  [INF-479] [INF-494] Move identity to packages, improve audius-compose dev performance (#6160)
  • Loading branch information
schottra committed Oct 3, 2023
2 parents 2685a32 + d74e905 commit 5695ca3
Show file tree
Hide file tree
Showing 425 changed files with 63,994 additions and 87,888 deletions.
7 changes: 4 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
mv /tmp/.version.json discovery-provider/.version.json
git add discovery-provider/.version.json
GIT_DIFF=$(git log --pretty=format:'%an - %s [<https://github.com/AudiusProject/audius-protocol/commit/%H|%h>]' --abbrev-commit origin/release-v$OLD_VERSION..HEAD -- mediorum discovery-provider identity-service comms monitoring/healthz | sed 's/"/\\"/g' | tr -d '\r' | sed ':a;N;$!ba;s/\n/=DELIM@/g')
GIT_DIFF=$(git log --pretty=format:'%an - %s [<https://github.com/AudiusProject/audius-protocol/commit/%H|%h>]' --abbrev-commit origin/release-v$OLD_VERSION..HEAD -- mediorum discovery-provider packages/identity-service comms monitoring/healthz | sed 's/"/\\"/g' | tr -d '\r' | sed ':a;N;$!ba;s/\n/=DELIM@/g')
# Ensure GIT_DIFF ends with the delimiter so the final commit is included
if [ ! -z "$GIT_DIFF" ] && [ "${GIT_DIFF: -7}" != "=DELIM@" ]; then
Expand Down Expand Up @@ -428,8 +428,9 @@ workflows:
comms/.* run-gcp-workflow true
mediorum/.* run-creator-workflow true
mediorum/.* run-gcp-workflow true
identity-service/.* run-identity-workflow true
identity-service/.* run-gcp-workflow true
packages/identity-service/.* run-identity-workflow true
packages/identity-service/.* run-integration-workflow true
packages/identity-service/.* run-gcp-workflow true
eth-contracts/.* run-eth-contracts-workflow true
eth-contracts/.* run-gcp-workflow true
contracts/.* run-contracts-workflow true
Expand Down
4 changes: 2 additions & 2 deletions .circleci/src/jobs/@web-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ web-test-staging:
cypress-command: 'cd packages/probers && npx cypress run --browser chrome'
start-command: 'npx serve -l 3001 -s packages/web/build-staging'
- store_artifacts:
path: /home/circleci/audius-client/packages/probers/cypress/videos
path: /home/circleci/audius-protocol/packages/probers/cypress/videos
- store_artifacts:
path: /home/circleci/audius-client/packages/probers/cypress/screenshots
path: /home/circleci/audius-protocol/packages/probers/cypress/screenshots

web-build-production:
working_directory: ~/audius-protocol
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/build-gcp-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ steps:
command: |
. ~/.profile
cd audius-protocol
audius-compose build
audius-compose build --prod
audius-compose pull
audius-compose prune -y
- run:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/push-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ steps:
name: Docker login
command: echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
- run: AUDIUS_DEV=false bash ~/audius-protocol/dev-tools/setup.sh
- run: . ~/.profile; audius-compose build "<< parameters.service >>"
- run: . ~/.profile; audius-compose build --prod "<< parameters.service >>"
- run: . ~/.profile; audius-compose push "<< parameters.service >>"
6 changes: 3 additions & 3 deletions .circleci/src/jobs/test-audius-cmd.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
parameters:
instance-name:
description: "Name of gcp instance to use for the test"
description: 'Name of gcp instance to use for the test'
type: string
resource_class: small
docker:
Expand All @@ -24,7 +24,7 @@ steps:
echo "export IMAGE_FLAG='$IMAGE_FLAG'" >> "$BASH_ENV"
- gcp-run:
instance-name: "<< parameters.instance-name >>"
instance-name: '<< parameters.instance-name >>'
create-instance-args: >-
$IMAGE_FLAG
--preemptible
Expand All @@ -38,4 +38,4 @@ steps:
- run:
name: audius-cmd test
no_output_timeout: 15m
command: . ~/.profile; audius-compose up && audius-cmd test
command: . ~/.profile; audius-compose up --prod && audius-cmd test
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/node_modules
npm-debug.log

packages/mobile/ios/Pods
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -200,3 +200,6 @@ app-keypair.json

# CI
combined-patch-file.txt

# Identity
packages/identity-service/emailCache
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"request": "attach",
"port": 9229,
"address": "localhost",
"localRoot": "${workspaceFolder}/identity-service/",
"localRoot": "${workspaceFolder}/packages/identity-service/",
"remoteRoot": "/usr/src/app",
"protocol": "inspector"
},
Expand All @@ -21,4 +21,4 @@
"type": "node-terminal"
}
]
}
}
31 changes: 22 additions & 9 deletions dev-tools/audius-compose
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ def get_git_commit(protocol_dir):

# TODO: Maybe clean up later to handle comms config (currently using explicit env vars in docker-compose.comms.yml)
def generate_env(
protocol_dir,
discovery_provider_replicas,
elasticsearch_replicas,
protocol_dir, discovery_provider_replicas, elasticsearch_replicas, prod=False
):
config = {}
if (protocol_dir / "dev-tools/config.json").exists():
Expand Down Expand Up @@ -149,6 +147,13 @@ def generate_env(
aao_wallets.append(value)
env["AAO_WALLET_ADDRESSES"] = ",".join(aao_wallets)

if prod:
env["IDENTITY_DOCKERCOMPOSE"] = "docker-compose.identity.prod.yml"
env["DEVTOOLS_DOCKERCOMPOSE"] = "docker-compose.dev-tools.prod.yml"
else:
env["IDENTITY_DOCKERCOMPOSE"] = "docker-compose.identity.dev.yml"
env["DEVTOOLS_DOCKERCOMPOSE"] = "docker-compose.dev-tools.dev.yml"

for key, value in config.get("extra-env", {}).items():
env[key] = value

Expand Down Expand Up @@ -190,19 +195,23 @@ def cli(ctx, protocol_dir):
@click.option("-d", "--discovery-provider-replicas", default=1, type=int)
@click.option("-e", "--elasticsearch-replicas", default=0, type=int)
@click.option("-a", "--args", type=str, multiple=True)
@click.option(
"--prod",
is_flag=True,
help="Use production containers which have all dependencies built in",
)
@click.argument("services", nargs=-1)
@click.pass_obj
def build(
protocol_dir,
discovery_provider_replicas,
elasticsearch_replicas,
prod,
args,
services,
):
generate_env(
protocol_dir,
discovery_provider_replicas,
elasticsearch_replicas,
protocol_dir, discovery_provider_replicas, elasticsearch_replicas, prod
)

proc = subprocess.run(
Expand Down Expand Up @@ -344,6 +353,11 @@ def load_env(protocol_dir, service, environment):
)
@click.option("--comms", is_flag=True, help="Bring up comms/dms containers")
@click.option("-a", "--args", type=str, multiple=True)
@click.option(
"--prod",
is_flag=True,
help="Use production containers which have all dependencies built in",
)
@click.argument("services", nargs=-1)
@click.pass_obj
def up(
Expand All @@ -356,12 +370,11 @@ def up(
pedalboard,
comms,
args,
prod,
services,
):
generate_env(
protocol_dir,
discovery_provider_replicas,
elasticsearch_replicas,
protocol_dir, discovery_provider_replicas, elasticsearch_replicas, prod
)

AAO_DIR = pathlib.Path(os.getenv("AAO_DIR", protocol_dir / "../anti-abuse-oracle"))
Expand Down
10 changes: 0 additions & 10 deletions dev-tools/commands/Dockerfile

This file was deleted.

Loading

0 comments on commit 5695ca3

Please sign in to comment.