Skip to content

Enable CPEx on non-production environments#4063

Merged
jloh02 merged 5 commits intonusmodifications:masterfrom
gnimnix:enable-cpex-on-staging-and-development
May 25, 2025
Merged

Enable CPEx on non-production environments#4063
jloh02 merged 5 commits intonusmodifications:masterfrom
gnimnix:enable-cpex-on-staging-and-development

Conversation

@gnimnix
Copy link
Copy Markdown
Contributor

@gnimnix gnimnix commented May 17, 2025

Context

Closes #4051.

Implementation

Added CPEx to config and filter for staging or development environment (automatically enabling CPEx for staging and dev). Loads this config in CPEx view.

Other Information

I have not written tests as I see that test environment is explicitly set to test but please correct me if this value can be modified during tests.

@vercel
Copy link
Copy Markdown

vercel bot commented May 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nusmods-export ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 25, 2025 10:15am
nusmods-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 25, 2025 10:15am

@vercel
Copy link
Copy Markdown

vercel bot commented May 17, 2025

@gnimnix is attempting to deploy a commit to the modsbot's projects Team on Vercel.

A member of the Team first needs to authorize it.

@codecov
Copy link
Copy Markdown

codecov bot commented May 17, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 54.81%. Comparing base (988c6fd) to head (64625a1).
Report is 101 commits behind head on master.

Files with missing lines Patch % Lines
website/src/serverless/mpe.ts 0.00% 1 Missing ⚠️
website/src/views/mpe/MpeContainer.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4063      +/-   ##
==========================================
+ Coverage   54.52%   54.81%   +0.29%     
==========================================
  Files         274      276       +2     
  Lines        6076     6352     +276     
  Branches     1455     1557     +102     
==========================================
+ Hits         3313     3482     +169     
- Misses       2763     2870     +107     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gnimnix
Copy link
Copy Markdown
Contributor Author

gnimnix commented May 17, 2025

Edit: realised I linked to the wrong ticket, closes #4051

jloh02 added 2 commits May 25, 2025 17:58
This makes the variable for enableCPExforProd clearer, as well as to allow easy UI testing. Nonetheless, backend testing with API is still not possible other than on prod and cpex-staging
@jloh02 jloh02 changed the title Enable cpex on staging and development Enable CPEx on non-production environments May 25, 2025
Copy link
Copy Markdown
Member

@jloh02 jloh02 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the updates! It satisfies lots of the considerations and requirements I had in mind too while abstracting it cleanly in config!

@jloh02 jloh02 merged commit 3c2c1e1 into nusmodifications:master May 25, 2025
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable CPEx on staging and development branches

2 participants