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(renovate): pin monaco-editor expressions and entities-routes #1354

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sumimakito
Copy link
Member

@sumimakito sumimakito commented Apr 19, 2024

Summary

This PR tries to pin monaco-editor by excluding it for @kong-ui-public/expressions and @kong-ui-public/entities-routes via packageRules in renovate.json.

Why?

monaco-editor is currently only used for the Expressions routes support in @kong-ui-public/expressions and @kong-ui-public/entities-routes. We encountered several issues while consuming the latest monaco-editor in the host app during the development. To deliver the Expressions routes support in time, we decided to downgrade it to v0.21.3–which we used previously in Kong Manager to prevent the Renovate bot from bumping it.

We will try to update it to the latest possible minor release after Kong Gateway 3.7's release.

renovate.json Outdated
@@ -7,5 +7,6 @@
],
"constraints": {
"pnpm": "8.6.11"
}
},
"ignoreDeps": ["monaco-editor"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we just bump it for your specific package rather than for the entire repository?

It may be used in other places in the near future

Copy link
Member Author

Choose a reason for hiding this comment

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

@adamdehaven Yes, that sounds legit to me. Would it be better if we only let the Renovate bot ignore monaco-editor for @kong-ui-public/expressions and @kong-ui-public/entities-routes? (Would that be achievable via packageRules?)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, sounds good to me

Copy link
Contributor

@mptap mptap left a comment

Choose a reason for hiding this comment

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

Could we expedite this PR?
Seems it's needed to unblock upgrading @kong-ui-public/entities-routes
See example renovate pr failure https://github.com/Kong/konnect-ui-apps/actions/runs/8758729274

@sumimakito
Copy link
Member Author

@mptap Sure. I've updated this PR to use packageRules to scope the rule to @kong-ui-public/expressions and @kong-ui-public/entities-routes only.

Meanwhile, I don't feel the CI failure in the recent Renovate bumping PR (https://github.com/Kong/konnect-ui-apps/pull/3018) was caused by this change. Instead, it was because the Expressions editor component in @kong-ui-public/entities-routes imports monaco-editor, but we made monaco-editor a peer dependency instead of bundling it. To fix this, I've pushed a commit (https://github.com/Kong/konnect-ui-apps/pull/3018/commits/c65e71509076678a6566649ccb55a7662706f55a) to the Renovate PR to add monaco-editor as external in the Rollup config, as it is optional for us as of now (we don't show/use the Expressions editor at the moment), and I also updated several type imports from @kong-ui-public/entities-routes.

@sumimakito sumimakito changed the title chore(renovate): add monaco-editor to ignoreDeps chore(renovate): pin monaco-editor @kong-ui-public/expressions and @kong-ui-public/entities-routes Apr 20, 2024
@sumimakito sumimakito changed the title chore(renovate): pin monaco-editor @kong-ui-public/expressions and @kong-ui-public/entities-routes chore(renovate): pin monaco-editor expressions and entities-routes Apr 20, 2024
Copy link
Member

@Leopoldthecoder Leopoldthecoder left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@kaiarrowood kaiarrowood left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

Comment on lines +11 to +17
"packageRules": [
{
"matchPackageNames": ["@kong-ui-public/expressions", "@kong-ui-public/entities-routes"],
"groupName": "exclude monaco-editor from @kong-ui-public/expressions and @kong-ui-public/entities-routes",
"excludeDepNames": ["monaco-editor"]
}
]
Copy link
Collaborator

Choose a reason for hiding this comment

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

issue: matchPackageNames is for the matched dependency package names, not the packages within the repository

I think what you actually want here is something like matchFileNames whereby you provide the path to the package.json of these packages, e.g.

{
  "packageRules": [
    {
      "description": "Pin monaco-editor dependency for the expressions package",
      "matchFileNames": ["packages/core/expressions/package.json"],
      "groupName": "expressions-monaco-editor",
      "matchPackageNames": ["monaco-editor"],
      "enabled": false
    }
  ]
}

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.

None yet

5 participants