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

fix: Silence several TS errors from plugin-server tests #29200

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

rafaeelaudibert
Copy link
Member

Problem

CI is broken because we're typechecking this
The problem is that a lot of these types are actually wrong, so let's fix the easy ones and silence the harder ones - I just need master to be mergeable once again

@rafaeelaudibert rafaeelaudibert enabled auto-merge (squash) February 25, 2025 17:42
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR addresses TypeScript errors in the plugin-server tests to make the master branch mergeable again.

  • Added @types/kafkajs-snappy as a dev dependency to fix missing type definitions
  • Made processPerson parameter optional with default value false in EventsProcessor.processEvent()
  • Added non-null assertions (!) to properties and methods that TypeScript couldn't guarantee exist
  • Added @ts-expect-error comments with TODOs for more complex type issues that need future fixes
  • Fixed incorrect type assertions by properly importing and using types like ProjectId and InternalPerson
  • Corrected function parameters by adding missing required arguments or replacing null with appropriate values
  • Removed the unused WaitEvent class from promises.ts helper file

41 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

@rafaeelaudibert rafaeelaudibert force-pushed the fix-plugin-test-types branch 3 times, most recently from 2572777 to 328be24 Compare February 25, 2025 18:00
@@ -4,7 +4,6 @@ import { mkdirSync, readdirSync, rmSync } from 'node:fs'
import { Message, TopicPartitionOffset } from 'node-rdkafka'
import path from 'path'

import { waitForExpect } from '../../../../functional_tests/expectations'
Copy link
Member Author

Choose a reason for hiding this comment

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

TS can't find this file, don't ask me why, just inlined it

Copy link
Contributor

Size Change: 0 B

Total Size: 9.72 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 9.72 MB

compressed-size-action

@rafaeelaudibert rafaeelaudibert merged commit eda494e into master Feb 25, 2025
89 checks passed
@rafaeelaudibert rafaeelaudibert deleted the fix-plugin-test-types branch February 25, 2025 18:46
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.

3 participants