Skip to content

Introduce a Calypso environment for hosts.automattic.com#92874

Closed
rcoll wants to merge 1 commit intotrunkfrom
try/a8c-hosts-environment
Closed

Introduce a Calypso environment for hosts.automattic.com#92874
rcoll wants to merge 1 commit intotrunkfrom
try/a8c-hosts-environment

Conversation

@rcoll
Copy link
Copy Markdown
Member

@rcoll rcoll commented Jul 22, 2024

Proposed Changes

  • Adds new config files for the following environments: a8c-for-hosts-development, a8c-for-hosts-stage, a8c-for-hosts-production.
  • Adds new section and and router which renders "Hello world" in the appropriate place.
  • Mimics A4A environment badges on the new environments.
  • Adds scripts to do the docker build, start the server, etc.
  • Adds hosts.automattic.com and hosts.localhost as allowed origins.

Testing Instructions

  1. Apply D156071-code and sandbox the API.
  2. Switch to this branch and start the server with start-a8c-for-hosts.
  3. Use the live links to verify that all the other Calypso branches start and load correctly (A4A, WPCOM, and Jetpack Cloud).
  4. Visit http://hosts.localhost:3000 and verify you see Hello, world.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@rcoll rcoll added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. DO NOT MERGE labels Jul 22, 2024
@rcoll rcoll requested a review from a team July 22, 2024 14:58
@matticbot
Copy link
Copy Markdown
Contributor

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~80 bytes added 📈 [gzipped])

Details
name                   parsed_size           gzip_size
entry-stepper               +334 B  (+0.0%)      +58 B  (+0.0%)
entry-main                  +334 B  (+0.0%)      +56 B  (+0.0%)
entry-subscriptions         +153 B  (+0.0%)      +34 B  (+0.0%)
entry-login                 +153 B  (+0.0%)      +34 B  (+0.0%)
entry-domains-landing       +153 B  (+0.0%)      +34 B  (+0.0%)
entry-browsehappy            +39 B  (+0.0%)      +19 B  (+0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~346 bytes added 📈 [gzipped])

Details
name           parsed_size         gzip_size
a8c-for-hosts       +562 B  (new)     +346 B  (new)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Copy Markdown
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

This looks good @rcoll, nice work 👍

If you wish to use calypso.live branches, you might need some dserve changes, similar to Automattic/dserve#224.

cc @yashwin since you also worked on some of those initial setup tasks and might have additional tips.

"a8c-for-hosts": true
},
"site_filter": [],
"theme": "a8c-for-agencies",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are we going to use the same theme as a4a?

Copy link
Copy Markdown
Contributor

@yashwin yashwin left a comment

Choose a reason for hiding this comment

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

Overall, it looks good.

I just left a few comments.

}

if ( calypsoEnv === 'a8c-for-hosts-stage' ) {
context.badge = 'a8c-for-agencies-staging';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we want to use the same badge as A4A?

Comment thread client/sections.js
group: 'a8c-for-agencies',
},
{
name: 'a8c-for-hosts',
Copy link
Copy Markdown
Contributor

@yashwin yashwin Jul 24, 2024

Choose a reason for hiding this comment

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

It is better to set the section to false here:

"sections": {

This could cause some issues because all the sections in WP.com are enabled by default.

pedEI5-1pD-p2

@rcoll rcoll closed this Aug 7, 2024
@rcoll rcoll deleted the try/a8c-hosts-environment branch August 7, 2024 15:16
@github-actions github-actions Bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants