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.71.0 #1213

Merged
merged 16 commits into from
Mar 14, 2024
Merged

release v0.71.0 #1213

merged 16 commits into from
Mar 14, 2024

Conversation

dcshzj
Copy link
Contributor

@dcshzj dcshzj commented Mar 14, 2024

New

  • chore(commitService): add logging #1211
  • chore(telemetry): report runtime metrics #1210
  • feat: get diff from git instead of GitHub #1172
  • fix(redir): add in other 2 records #1199
  • feat(pino): add logger #1207
  • fix(tracer): fix tag setting on span #1208
  • feat(auditlogs): add relevant GitHub link for each audit log entry #1200
  • tests: fix failing auth test #1205
  • fix: send updated data back to client from all update pages endpoints #1193
  • 0.70.0 #1201
  • fix: send updated data back to client, from all update pages endpoints 75f513a

Dev-Dependencies

  • build(deps-dev): bump husky from 6.0.0 to 9.0.11 #1127
  • build(deps-dev): bump eslint-plugin-jest from 26.9.0 to 27.9.0 #1135
  • build(deps-dev): bump jest-extended from 2.0.0 to 4.0.2 #959
  • build(deps-dev): bump eslint-plugin-prettier from 3.4.1 to 4.2.1 #855

Tests

feat: get diff from git instead of GitHub #1172 - @dcshzj

Tested in staging

  • Toggle feature flag is_local_diff_enabled for account being tested https://app.growthbook.io/features/is_local_diff_enabled
  • Create a page
  • Edit a page
  • Delete a page
  • Move a page
  • Try to create an RR and check that the diff shown is correct for all files (this tests that /compare works)
  • After creating the RR, navigate to the RR page and check that the diff shown is correct (this tests that /listFullReviewRequest works)
  • Approve and publish the RR
  • Check that diff is empty now (tests that master has been fastforwarded)
  • Finally, last sanity check that the diff still works after making another edit

fix(tracer): fix tag setting on span #1208 - @alexanderleegs

  • Find traces in isomer's APM like this one, and verify that the tags are present

feat(auditlogs): add relevant GitHub link for each audit log entry #1200 - @alexanderleegs

  • Fill in the form for staging to get the audit logs for a valid test site
  • Verify that the link columns show up links to the respective GitHub commit or PR

tests: fix failing auth test #1205

No tests, just make sure CI passes.

fix(redir): add in other 2 records #1199 - @dcshzj

  • add these lines of code in your server.js
const formResponses = [
  {
    submissionId: "",
    requesterEmail: "kishore@open.gov.sg",
    repoName: "kishore-test",
    primaryDomain: "yahoo.com",
    redirectionDomain: "isomer.gov.sg",
    agencyEmail: "kishore@open.gov.sg",
  },
]

formsgSiteLaunchRouter.handleSiteLaunchResults(formResponses, "test")

Screenshot 2024-03-12 at 8 28 56 AM

fix: send updated data back to client from all update pages endpoints #1193 - @dcshzj

  1. Go to Prod CMS, edit a page to leave trailing whitespace then save changes
  2. Click Back on the navbar -> should see the unsaved changes modal
  3. Go to Staging CMS, edit a page to leave trailing whitespace then save changes
  4. After saving, should see that trailing whitespace is removed from the editor (to match backend)
  5. Click Back on the navbar -> should not see the modal

Full Changelog: https://github.com/isomerpages/isomercms-backend/compare/v0.70.0..v0.71.0

jacobkwan and others added 16 commits March 7, 2024 16:27
…urning-new-data

fix: send updated data back to client from all update pages endpoints
…1200)

* feat: add relevant link to GitHub for each item

* tests: add basic unit tests for AuditLogsService
* build(package): install pino

* feat(pino): add pino logger + logs injection

* build(package): install pino pretty

* fix(logger): combine 2 if to if/else
## Problem

ops has been doing this manually, we want to add this as part of sl process for a more resilient redirection service

## Solution

add in the two records
this also changes the shape of the site launch message, this has been updated in the infra pr [here](opengovsg/isomer-infra#66) 

- [ ] Yes - this PR contains breaking changes
  - Details ...
- [X] No - this PR is backwards compatible with ALL of the following feature flags in this [doc](https://www.notion.so/opengov/Existing-feature-flags-518ad2cdc325420893a105e88c432be5)


- Details ...

## Before & After Screenshots

**BEFORE**:
<img width="869" alt="Screenshot 2024-03-12 at 8 17 56 AM" src="https://github.com/isomerpages/isomercms-backend/assets/42832651/189c0f46-c2f5-41fa-9dbc-0247dbbebf0f">



**AFTER**:
![Screenshot 2024-03-12 at 8 16 58 AM](https://github.com/isomerpages/isomercms-backend/assets/42832651/9cfea64d-e5f5-40ad-9df2-7e89611ac78d)



## Manual Local Tests
- [ ] add these lines of code in your server.js
```
const formResponses = [
  {
    submissionId: "",
    requesterEmail: "kishore@open.gov.sg",
    repoName: "kishore-test",
    primaryDomain: "yahoo.com",
    redirectionDomain: "isomer.gov.sg",
    agencyEmail: "kishore@open.gov.sg",
  },
]

formsgSiteLaunchRouter.handleSiteLaunchResults(formResponses, "test")
```

![Screenshot 2024-03-12 at 8 28 56 AM](https://github.com/isomerpages/isomercms-backend/assets/42832651/8d255194-7dc5-4303-9e97-1fc793ba952f)
* feat: get diff from git instead of GitHub

Also update merge review request flow to merge staging into master locally

* chore: remove unused code and imports

* fix: remove duplicate method for checking local branch existence

* chore: reduce nesting in arrow function

* chore: rename getGitDiff to getFilesChanged and merge helper fn in

* fix: pull master on RR merge instead of merging staging to master locally

* fix: always log and return GitFileSystemError for git pull errors

* chore: improve comments

* chore: add missing function return types

* fix: improve error handling and logging

* fix: restrict flexibility of getFilesChanged to only diff master and staging

* chore: remove unused functions

* fix: fast forward master via fetch instead of pull

* fix: test

* chore: improve comments

* fix: feature flag getting diff locally vs from github

* fix: create master if does not exist, before fastforward, also make it error-recoverable

* fix: ReviewRequestService merge RR test

* chore: move feature flag logic into ReviewRequestService

* chore: use path.join
## Problem

we lack observability here. we experienced a silent failure in terms of divergence, and not a clue on how to debug since we cannot replicate this + no unusual errors around that time. 
this is a last ditch effort to see if we can get more info on this issue, but personally am not too optimistic about this pr since by right the top level handlers should log errors
Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.4.1 to 4.2.1.
- [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-plugin-prettier/commits/v4.2.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [jest-extended](https://github.com/jest-community/jest-extended) from 2.0.0 to 4.0.2.
- [Release notes](https://github.com/jest-community/jest-extended/releases)
- [Changelog](https://github.com/jest-community/jest-extended/blob/main/CHANGELOG.md)
- [Commits](jest-community/jest-extended@v2.0.0...v4.0.2)

---
updated-dependencies:
- dependency-name: jest-extended
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 26.9.0 to 27.9.0.
- [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases)
- [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md)
- [Commits](jest-community/eslint-plugin-jest@v26.9.0...v27.9.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-jest
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [husky](https://github.com/typicode/husky) from 6.0.0 to 9.0.11.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](typicode/husky@v6.0.0...v9.0.11)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@dcshzj dcshzj merged commit 53fdfe4 into master Mar 14, 2024
42 checks passed
@mergify mergify bot deleted the release_v0.71.0 branch March 14, 2024 08:13
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.

6 participants