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

release v0.88.0 #1395

Merged
merged 10 commits into from
May 30, 2024
Merged

release v0.88.0 #1395

merged 10 commits into from
May 30, 2024

Conversation

seaerchin
Copy link
Contributor

@seaerchin seaerchin commented May 30, 2024

New

  • chore: log all sites retrieved #1394
  • fix(cache): cached results on the same request #1393
  • chore: delete eb stuff #1387
  • fix: upgrade joi from 17.13.0 to 17.13.1 #1390
  • fix: upgrade winston-cloudwatch from 6.2.0 to 6.3.0 #1389
  • fix: upgrade dd-trace from 5.11.0 to 5.12.0 #1388
  • fix: upgrade yaml from 2.4.1 to 2.4.2 #1386
  • feat: create form to send email to all site collaborators #1368
  • backport v0.87.0 #1385

Tests

fix(cache): cached results on the same request #1393

in local:

go to SitesCacheService.ts and modify the function getAllRepoData()

export async function getAllRepoData(
  accessToken: string | undefined
): Promise<RepositoryData[]> {
  console.log({ accessToken }) // this one is local dev hor dont push to production

  // wait until time is a mutliple of 5 seconds
  const now = Date.now()
  const waitTime = 5000 - (now % 5000)
  await new Promise((resolve) => setTimeout(resolve, waitTime))
  const { repos: firstPageRepos, links } = await fetchPageOfRepositories({
    accessToken,
    page: 1,
    getLinks: true,
  })

  console.log(firstPageRepos)

  if (!links?.last || links.last.pagenum <= 1) {
    // There are no links, or no last link specifically, which is the behaviour when the page returned is the last page
    // (In the same manner has the links for the first page do not prev and first links)
    return firstPageRepos
  }

  // There are more pages to retrieve! Fetch all pages 2 to N in parallel, as was done before
  const pageNums = _.range(2, links.last.pagenum + 1)

  const pages2ToLast = await Promise.all(
    pageNums.map((page) => fetchPageOfRepositories({ accessToken, page }))
  )
  pages2ToLast.map((res) => console.log(res.repos))

  return firstPageRepos.concat(...pages2ToLast.map((res) => res.repos))
}

Create 2 different Github users with two different access permissions (on two different browers) and spam the /sites page.
assert that the pages returned are accurate to what the user expects.

In staging:
1.Login via github for a NON admin user, assert that you do not see any sites

  1. Login via github for a admin user, assert that you do see all sites

feat: create form to send email to all site collaborators #1368

  • Log in to the Staging CMS and go to the jacob-staging site
  • Add yourself as a collaborator (provided that you are an Isomer Admin), remove the others if needed
  • Fill in the staging form here: https://form.gov.sg/6640dc87dd10e94f6bd4ae40 (use "DNS records are incorrect (apex domain)" option)
  • Fill in the DNS Records table as you wish (this will be shown verbatim inside the email)
  • Submit the form and wait for the email to come into your inbox.
  • Repeat for the other 2 options ("DNS records are incorrect (main domain)" and "Others"), verify that the emails are sent to your mailbox correctly.
    • Note: This will also create 3 separate emails to Isomer support, make sure to let Ops know that these are testing emails.

Deploy Notes

feat: create form to send email to all site collaborators #1368

New environment variables:

  • NOTIFY_SITE_COLLABORATORS_FORM_KEY : Form secret key for the notify site collaborators form
    • added env var to 1PW + SSM script (fetch_ssm_parameters.sh)

Full Changelog: https://github.com/isomerpages/isomercms-backend/compare/v0.87.0..v0.88.0

dcshzj and others added 10 commits May 17, 2024 15:14
* feat: create form to send email to all site collaborators

* chore: remove extra console.log statement

* chore: update error message
Snyk has created this PR to upgrade yaml from 2.4.1 to 2.4.2.

See this package in npm:
yaml

See this project in Snyk:
https://app.snyk.io/org/isomer/project/676b9e26-cebf-4964-b7b3-d9843e3339ff?utm_source=github&utm_medium=referral&page=upgrade-pr

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Snyk has created this PR to upgrade dd-trace from 5.11.0 to 5.12.0.

See this package in npm:
dd-trace

See this project in Snyk:
https://app.snyk.io/org/isomer/project/676b9e26-cebf-4964-b7b3-d9843e3339ff?utm_source=github&utm_medium=referral&page=upgrade-pr

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Snyk has created this PR to upgrade winston-cloudwatch from 6.2.0 to 6.3.0.

See this package in npm:
winston-cloudwatch

See this project in Snyk:
https://app.snyk.io/org/isomer/project/676b9e26-cebf-4964-b7b3-d9843e3339ff?utm_source=github&utm_medium=referral&page=upgrade-pr

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
Snyk has created this PR to upgrade joi from 17.13.0 to 17.13.1.

See this package in npm:
joi

See this project in Snyk:
https://app.snyk.io/org/isomer/project/676b9e26-cebf-4964-b7b3-d9843e3339ff?utm_source=github&utm_medium=referral&page=upgrade-pr

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
these are all eb specific stuff which has since been deprecated
@seaerchin seaerchin requested a review from a team May 30, 2024 05:30
@seaerchin seaerchin mentioned this pull request May 30, 2024
@seaerchin seaerchin merged commit 3f2e27d into master May 30, 2024
43 of 44 checks passed
@seaerchin seaerchin deleted the release_v0.88.0 branch May 30, 2024 06:54
This was referenced Jun 27, 2024
@dcshzj dcshzj mentioned this pull request Jun 27, 2024
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.

5 participants