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 invalid module import #1054

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Fix invalid module import #1054

merged 1 commit into from
Nov 12, 2024

Conversation

veidenberg
Copy link
Contributor

@veidenberg veidenberg commented Oct 29, 2024

Description

Remove invalid module import syntax that is generating server errors.
See this slack thread for context.

Sandbox

http://wp-np2-1d.ebi.ac.uk:1640

@azangru
Copy link
Contributor

azangru commented Oct 29, 2024

Actually, I am confused now.

If this is in webcode, and if this is for displaying the bottom panel in region overview, then wouldn't it have broken earlier and everywhere if it were truly broken?

Do we need a sandbox to test this code change, or is it already obvious that it couldn't have worked anyway?

@veidenberg
Copy link
Contributor Author

veidenberg commented Oct 29, 2024

I cannot see any difference between the sandbox and live (e.g. this and this), but at least no code errors in sandbox logs.

@azangru
Copy link
Contributor

azangru commented Oct 29, 2024

:shipit:

@veidenberg
Copy link
Contributor Author

veidenberg commented Oct 30, 2024

In the sandbox I can see this part of code being executed (when editing region overview menu entry and debug messages), but I still cannot see the difference with/without the /region suffix (no error messages in the logs). However, /region is invalid module path syntax anyway and the same ViewBottomNav module is imported without the suffix just few lines below, so I'd say it's safe to merge this PR.

@azangru
Copy link
Contributor

azangru commented Oct 30, 2024

All right.

Let's :shipit:

@azangru
Copy link
Contributor

azangru commented Nov 12, 2024

For history.

The reason we decided to make this change was because of this error in the logs:

REQUEST(P): [served at Wed Oct 23 14:07:21 2024 by 105398 in 13ms] /Ajax/accounts_dropdown
DynamicLoaderException Exception:
  Module 'EnsEMBL::Web::Component::Location::ViewBottomNav/region' could not be loaded: Bareword "region" not allowed while "strict subs" in use at (eval 13959) line 1.
  Thrown by EnsEMBL::Web::Utils::DynamicLoader::dynamic_require in module EnsEMBL::Web::Controller::Share at /nfs/public/ro/ensweb/live/plants/www_113/ensembl-webcode/modules/EnsEMBL/Web/Controller/Share.pm on line 221
  Called by EnsEMBL::Web::Controller::Share::_get_components in module EnsEMBL::Web::Controller::Share at /nfs/public/ro/ensweb/live/plants/www_113/ensembl-webcode/modules/EnsEMBL/Web/Controller/Share.pm on line 83
  Called by EnsEMBL::Web::Controller::Share::share_create in module EnsEMBL::Web::Controller::Share at /nfs/public/ro/ensweb/live/plants/www_113/public-plugins/tools/modules/EnsEMBL/Web/Controller/Share.pm on line 45
  Called by EnsEMBL::Web::Controller::Share::share_create in module EnsEMBL::Web::Controller::Share at /nfs/public/ro/ensweb/live/plants/www_113/ensembl-webcode/modules/EnsEMBL/Web/Controller/Share.pm on line 70
  Called by EnsEMBL::Web::Controller::Share::process in module EnsEMBL::Web::Apache::SpeciesHandler at /nfs/public/ro/ensweb/live/plants/www_113/ensembl-webcode/modules/EnsEMBL/Web/Apache/SpeciesHandler.pm on line 103
  Called by EnsEMBL::Web::Apache::SpeciesHandler::handler in module EnsEMBL::Web::Apache::Handlers at /nfs/public/ro/ensweb/live/plants/www_113/ensembl-webcode/modules/EnsEMBL/Web/Apache/Handlers.pm on line 531
  Called by EnsEMBL::Web::Apache::Handlers::handler in module main at -e on line 0
  Called by (eval) in module main at -e on line 0 at /nfs/public/ro/ensweb/live/plants/www_113/ensembl-webcode/modules/EnsEMBL/Web/Exception.pm line 70.

@azangru azangru merged commit 47fc14c into main Nov 12, 2024
@azangru azangru deleted the module-import-patch branch November 12, 2024 10:40
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