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

chore(ts): fix typescript type-checking errors #1087

Merged
merged 3 commits into from
Aug 15, 2023

Conversation

tthvo
Copy link
Member

@tthvo tthvo commented Aug 14, 2023

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits using a GPG signature

To recreate commits with GPG signature git fetch upstream && git rebase --force --gpg-sign upstream/main


Related to #689

Description of the change:

Added Typescript type-checking to ensure correct typings. Also, run this type checking in CI on pull request.

As for Mirage JS, I kept the type as any to represent unknown shapes of parsed objects returned from API server.

Motivation for the change:

Help catch mismatched types when defining interfaces, types and creating object. This helps avoiding potential bugs (i.e. a field missing or extra fields are added).

@tthvo tthvo added chore Refactor, rename, cleanup, etc. build labels Aug 14, 2023
@github-actions github-actions bot added the needs-triage Needs thorough attention from code reviewers label Aug 14, 2023
@mergify mergify bot added the safe-to-test label Aug 14, 2023
@tthvo tthvo removed the needs-triage Needs thorough attention from code reviewers label Aug 14, 2023
@tthvo
Copy link
Member Author

tthvo commented Aug 14, 2023

Also, sorta odd that Mbean Metrics snapshots were removed in the source code. Added back now.

@github-actions
Copy link

Test image available:

CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-web:pr-1087-5369927e58ce3abbbf9c0af4206260df5242888b sh smoketest.sh

@tthvo tthvo force-pushed the ts-typecheck branch 3 times, most recently from f96cdab to 0d680b7 Compare August 15, 2023 04:04
@tthvo tthvo marked this pull request as ready for review August 15, 2023 04:07
@tthvo tthvo requested a review from maxcao13 August 15, 2023 04:07
@tthvo
Copy link
Member Author

tthvo commented Aug 15, 2023

References: patternfly/patternfly-react-seed#94

@tthvo tthvo requested a review from aali309 August 15, 2023 04:11
@github-actions
Copy link

Test image available:

CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-web:pr-1087-0d680b7d5f55269e257b69673e2163dc9213560d sh smoketest.sh

@github-actions
Copy link

Test image available:

CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-web:pr-1087-8c16cd0653bd72a5af746651f4d47fbf2a4a81ce sh smoketest.sh

@github-actions
Copy link

Test image available:

CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-web:pr-1087-5cbdc8a1a5f667bdfabdb214252b1e50b8dfab3e sh smoketest.sh

@github-actions
Copy link

Test image available:

CRYOSTAT_IMAGE=ghcr.io/cryostatio/cryostat-web:pr-1087-c54e6b5a4560b96b2e1ef7eae0ad6628047da4cc sh smoketest.sh

@andrewazores andrewazores merged commit 5aa3f5c into cryostatio:main Aug 15, 2023
21 checks passed
@tthvo tthvo deleted the ts-typecheck branch August 15, 2023 20:44
mergify bot pushed a commit that referenced this pull request Aug 31, 2023
Signed-off-by: Thuan Vo <[email protected]>
(cherry picked from commit 5aa3f5c)

# Conflicts:
#	.github/workflows/ci.yaml
#	package.json
#	src/app/Settings/SettingsUtils.ts
#	src/app/Topology/Shared/utils.tsx
#	src/test/Rules/CreateRule.test.tsx
andrewazores pushed a commit that referenced this pull request Aug 31, 2023
Signed-off-by: Thuan Vo <[email protected]>
(cherry picked from commit 5aa3f5c)

# Conflicts:
#	.github/workflows/ci.yaml
#	package.json
#	src/app/Settings/SettingsUtils.ts
#	src/app/Topology/Shared/utils.tsx
#	src/test/Rules/CreateRule.test.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport build chore Refactor, rename, cleanup, etc. safe-to-test
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants