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 Cannot find module when import ResourceType in server from public folder #1705

Merged
merged 4 commits into from
Jan 3, 2024

Conversation

ruanyl
Copy link
Member

@ruanyl ruanyl commented Dec 23, 2023

Description

Solution:
Moved the shared enum ResourceType between server and public to common folder

Category

Bug fix

Why these changes are required?

What is the old behavior before changes and new behavior after changes?

Issues Resolved

Testing

[Please provide details of testing done: unit testing, integration testing and manual testing]

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Yulong Ruan <[email protected]>
@RyanL1997
Copy link
Collaborator

Hi @ruanyl , thanks for taking this on. Could you also fix the lint? https://github.com/opensearch-project/security-dashboards-plugin/actions/runs/7306997494/job/19912250179?pr=1705#step:5:22

Signed-off-by: Yulong Ruan <[email protected]>
Signed-off-by: Yulong Ruan <[email protected]>
Copy link

codecov bot commented Dec 25, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9c3ba49) 67.09% compared to head (88d30ac) 67.09%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1705   +/-   ##
=======================================
  Coverage   67.09%   67.09%           
=======================================
  Files          94       94           
  Lines        2404     2404           
  Branches      318      318           
=======================================
  Hits         1613     1613           
  Misses        713      713           
  Partials       78       78           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cwperks
Copy link
Member

cwperks commented Dec 26, 2023

Thank you @ruanyl. The reason this is showing now is because of an import added in server/routes/index.ts introduced in this PR: #1502

I will file an issue on this repo to run the CI with a build of OSD core + the security-dashboards-plugin so that these issues are caught when CI runs.

@cwperks
Copy link
Member

cwperks commented Dec 26, 2023

No custom admin password found. Please provide a password.

@derek-ho The CI for this PR is being impacted by the custom admin pw changes.

Copy link
Member

@peternied peternied left a comment

Choose a reason for hiding this comment

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

@cwperks I'm unclear if we should merge this change or not - please merge or request changes with details on how we can get this change in - thanks.

@cwperks
Copy link
Member

cwperks commented Jan 3, 2024

Merging this change. To catch these issue with CI, we should prioritize updating the Github worflows to create a build of OSD and run the build. #1709

@cwperks cwperks merged commit 09b2f59 into opensearch-project:main Jan 3, 2024
11 checks passed
@cwperks cwperks added the backport 2.x backport to 2.x branch label Jan 3, 2024
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-1705-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 09b2f59453b4b3d356ba7627d1e1af663fb075bd
# Push it to GitHub
git push --set-upstream origin backport/backport-1705-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-1705-to-2.x.

cwperks pushed a commit to cwperks/security-dashboards-plugin that referenced this pull request Jan 3, 2024
… folder (opensearch-project#1705)

* fix Cannot find module

Signed-off-by: Yulong Ruan <[email protected]>

* fix prettier error

Signed-off-by: Yulong Ruan <[email protected]>

* fix failed tests

Signed-off-by: Yulong Ruan <[email protected]>

---------

Signed-off-by: Yulong Ruan <[email protected]>
Co-authored-by: Craig Perkins <[email protected]>
(cherry picked from commit 09b2f59)
peternied pushed a commit that referenced this pull request Jan 4, 2024
…ver from public folder (#1705) (#1716)

Signed-off-by: Craig Perkins <[email protected]>
Co-authored-by: Yulong Ruan <[email protected]>
derek-ho added a commit to derek-ho/security-dashboards-plugin that referenced this pull request Jan 16, 2024
derek-ho added a commit to derek-ho/security-dashboards-plugin that referenced this pull request Jan 16, 2024
…rver from public folder (opensearch-project#1705)""

This reverts commit 2de58e3.

Signed-off-by: Derek Ho <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] FATAL Error: Cannot find module '../../public/apps/configuration/types'
4 participants