-
-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes a client-side bug with users' avatars missing resources.
Sometimes, a user-patched message is getting sent to the client where the nested avatar object does not have modelResource or thumbnailResource. This was causing errors due to assuming modelResource would always exist. Workaround is to not assume that, and to attempt to fetch the avatar manually if it is missing modelResource. It will then spawn the avatar from this, and only if this failed to get the necessary information is an error thrown about the avatar missing its model.
- Loading branch information
Showing
4 changed files
with
269 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: test-deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
[missing-avatar-resources-fix] | ||
jobs: | ||
secrets-gate-run: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
ok: ${{ steps.check-secrets-run.outputs.ok }} | ||
steps: | ||
- name: check for secrets needed to run workflows | ||
id: check-secrets-run | ||
run: | | ||
if [ ${{ secrets.DEPLOYMENTS_ENABLED }} == 'true' ]; then | ||
echo "ok=enabled" >> $GITHUB_OUTPUT | ||
fi | ||
secrets-gate-webhook: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
ok: ${{ steps.check-secrets-webhook.outputs.ok }} | ||
steps: | ||
- name: check for secrets needed to run workflows | ||
id: check-secrets-webhook | ||
run: | | ||
if [ ${{ secrets.SEND_FINISHED_WEBHOOK }} == 'true' ]; then | ||
echo "ok=enabled" >> $GITHUB_OUTPUT | ||
fi | ||
dev-deploy: | ||
needs: | ||
- secrets-gate-run | ||
if: ${{ needs.secrets-gate-run.outputs.ok == 'enabled' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- name: Setup Helm | ||
run: scripts/setup_helm_builder.sh | ||
- name: Setup AWS | ||
run: scripts/setup_aws_builder.sh $AWS_ACCESS_KEY $AWS_SECRET $AWS_REGION $CLUSTER_NAME | ||
env: | ||
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} | ||
AWS_SECRET: ${{ secrets.AWS_SECRET }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
CLUSTER_NAME: ${{ secrets.CLUSTER_NAME }} | ||
- name: Space debug | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
- name: Build Docker Image | ||
run: bash scripts/build_docker_builder.sh dev $DOCKER_LABEL $PRIVATE_ECR $AWS_REGION | ||
env: | ||
DOCKER_LABEL: ${{ secrets.DOCKER_LABEL }} | ||
REPO_NAME: ${{ secrets.DEV_REPO_NAME }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
ECR_URL: ${{ secrets.ECR_URL }} | ||
PRIVATE_ECR: ${{ secrets.PRIVATE_ECR }} | ||
- name: delete package.json | ||
run: rm package.json | ||
- name: npm-install 'cli' and 'aws-sdk' | ||
run: npm install cli aws-sdk | ||
- name: Publish to Elastic Container Registry | ||
run: bash scripts/publish_ecr_builder.sh dev $GITHUB_SHA $DOCKER_LABEL $PRIVATE_ECR $AWS_REGION | ||
env: | ||
DOCKER_LABEL: ${{ secrets.DOCKER_LABEL }} | ||
REPO_NAME: ${{ secrets.DEV_REPO_NAME }} | ||
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
ECR_URL: ${{ secrets.ECR_URL }} | ||
PRIVATE_ECR: ${{ secrets.PRIVATE_ECR }} | ||
- name: Deploy to EKS | ||
run: bash scripts/deploy_builder.sh dev $GITHUB_SHA | ||
- name: Publish to Docker Hub | ||
run: bash scripts/publish_dockerhub_builder.sh $GITHUB_SHA $DOCKER_LABEL | ||
env: | ||
DOCKER_LABEL: ${{ secrets.DOCKER_LABEL }} | ||
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }} | ||
PUBLISH_DOCKERHUB: ${{ secrets.PUBLISH_DOCKERHUB }} | ||
- name: Job succeeded | ||
if: ${{ needs.secrets-gate-webhook.outputs.ok == 'enabled' }} | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 # Not needed with a .ruby-version file | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
env: | ||
JOB_STATUS: ${{ job.status }} | ||
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} | ||
HOOK_OS_NAME: ${{ runner.os }} | ||
WORKFLOW_NAME: ${{ github.workflow }} | ||
run: | | ||
git clone https://github.com/DiscordHooks/github-actions-discord-webhook.git webhook | ||
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters