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: fix stackdriver page #3124

Merged
merged 3 commits into from
Nov 2, 2021
Merged

Conversation

williamhbaker
Copy link
Contributor

Closes #3068

This is a backport PR; it is backporting some changes from the master branch into OSS-2.1 to fix a bug that has already been fixed on master. We don't want to branch off of the latest master at this point because for the 2.1 OSS release (imminent) we aren't planning to release with the clockface updates.

Primarily a clean cherry pick of #3039. The file src/buckets/components/context/lineProtocol.tsx was updated based on #2919 to take care of a typescript check error.

joelfried and others added 3 commits November 1, 2021 10:34
* chore: upgrade react-markdown to 6.0.3 and optimize-css-assets-webpack-plugin, move to custom renderer for OSS and fix OSS test syntax
@williamhbaker williamhbaker requested a review from a team as a code owner November 2, 2021 16:11
@williamhbaker williamhbaker changed the title Wb fix stackdriver page 3068 fix: fix stackdriver page Nov 2, 2021
@@ -68,6 +68,20 @@ export const LineProtocolProvider: FC<Props> = React.memo(({children}) => {
setWriteError('')
}

/**
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file updated based on #2919 to clear up a typescript check error since we are using the most recent version of the openapi spec in OSS-2.1. All the other files are cherry-picked from #3039

Copy link
Contributor

@hoorayimhelping hoorayimhelping left a comment

Choose a reason for hiding this comment

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

looks good to me, but a question on converting a type hint of Renderer to any since we're losing information.


// Styles
import 'src/writeData/components/ClientCodeCopyPage/InstallPackageHelper.scss'

interface Props {
text: string
codeRenderer: Renderer<HTMLPreElement>
codeRenderer: any
Copy link
Contributor

Choose a reason for hiding this comment

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

only concern here is that we're losing type information going from Renderer to any. Is there any way to avoid this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hrmm a valid concern for sure but I'm going to have to punt on it and defer to #3039 which is where this code is from, and matches the impl on master:

interface Props {
text: string
codeRenderer: any
}

I'd guess that there were some changes in the new version of react-markdown that made Rendered no longer compatible, but I can't say for sure. For now I'll keep this code consistent with master, and if it gets changed there in the future we'll pick it up when we create new OSS release branches off of master.

@williamhbaker williamhbaker merged commit cc65325 into OSS-2.1 Nov 2, 2021
@williamhbaker williamhbaker deleted the wb-fix-stackdriver-page-3068 branch November 2, 2021 18:23
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.

2 participants