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

CONSOLE-4407: Update monaco and YAML language server #14663

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

logonoff
Copy link
Member

@logonoff logonoff commented Jan 7, 2025

CONSOLE Features and Fixes:

https://issues.redhat.com/browse/CONSOLE-4407

Solution description

This PR lays the foundation for switching to the PatternFly Code editor by doing the following:

Screen shots / gifs / design review:

Before:
image

After:
image

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 7, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jan 7, 2025

@logonoff: This pull request references CONSOLE-4407 which is a valid jira issue.

In response to this:

CONSOLE Features and Fixes:

https://issues.redhat.com/browse/CONSOLE-4407

Solution description

This PR lays the foundation for switching to the PatternFly Code editor by doing the following:

Screen shots / gifs / design review:

Before:
image

After:
image

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from kyoto and Lucifergene January 7, 2025 15:55
@openshift-ci openshift-ci bot added component/core Related to console core functionality component/dev-console Related to dev-console component/sdk Related to console-plugin-sdk component/shared Related to console-shared labels Jan 7, 2025
@logonoff logonoff force-pushed the CONSOLE-4407-monaco branch from 3b9e426 to 03796ad Compare January 7, 2025 15:56
@logonoff
Copy link
Member Author

logonoff commented Jan 7, 2025

debt, adding labels

/label px-approved
/label docs-approved

@openshift-ci openshift-ci bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR labels Jan 7, 2025
@logonoff
Copy link
Member Author

logonoff commented Jan 7, 2025

/retest

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

@logonoff Nice work!

Do we know if this impacts any public plugin APIs? It looks like we do expose Monaco options in the CodeEditor SDK component:

https://github.com/openshift/console/blob/master/frontend/packages/console-dynamic-plugin-sdk/docs/api.md#codeeditor

cc @vojtechszocs

import { openAPItoJSONSchema } from '@console/internal/module/k8s/openapi-to-json-schema';
import { getSwaggerDefinitions } from '@console/internal/module/k8s/swagger';

export const defaultEditorOptions = { readOnly: false, scrollBeyondLastLine: false };

const MODEL_URI = 'inmemory://model.yaml';
Copy link
Member

Choose a reason for hiding this comment

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

Love seeing all of this code removed

Copy link
Member Author

Choose a reason for hiding this comment

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

Hey! Yeah, it would likely impact plugins since the monaco API has changed a bit between versions. I've also changed how the ref object is stored in memory, I'll try making the ref backwards-compatible and will push a change if successful

@spadgett
Copy link
Member

spadgett commented Jan 7, 2025

And it looks like we expose the editor ref itself, so if there are breaking changes to the Monaco API, it can affect plugins. I think we have to bite the bullet if there are since not ever upgrading Monaco is not an option. We'll need to minimally release note this change, however.

@logonoff logonoff force-pushed the CONSOLE-4407-monaco branch 6 times, most recently from 6c6d8c8 to 92b628b Compare January 8, 2025 21:43
@openshift-ci openshift-ci bot added the component/pipelines Related to pipelines-plugin label Jan 8, 2025
@logonoff logonoff force-pushed the CONSOLE-4407-monaco branch from 92b628b to e832153 Compare January 8, 2025 21:46
@openshift-ci openshift-ci bot added the component/knative Related to knative-plugin label Jan 8, 2025
@logonoff
Copy link
Member Author

QE review:

/assign @yapei

Copy link
Contributor

openshift-ci bot commented Jan 14, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: logonoff
Once this PR has been reviewed and has the lgtm label, please assign invinciblejai for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@logonoff
Copy link
Member Author

/retest

@logonoff logonoff force-pushed the CONSOLE-4407-monaco branch from a50c157 to 8e2d1e0 Compare January 17, 2025 15:00
Copy link
Contributor

openshift-ci bot commented Jan 17, 2025

@logonoff: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-gcp-console 8e2d1e0 link true /test e2e-gcp-console

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/core Related to console core functionality component/dev-console Related to dev-console component/knative Related to knative-plugin component/pipelines Related to pipelines-plugin component/sdk Related to console-plugin-sdk component/shared Related to console-shared docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. px-approved Signifies that Product Support has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants