-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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(DB/Import) Support multiple styles of sql paths in DBUpdater #16157
Conversation
I would honestly prefer only one path ( |
I don't disagree, but unfortunately (as far as I can tell) there hasn't been a main standardization effort for the sql path. I'd say it's more of a good thing that the vast majority of modules fall into one of 2 paths, rather than more. Without doing the extra work of changing all modules, supporting both of the paths will just make the server easier to get started with and support in the long run. Regardless of what if multiple are supported or not I think that the naming scheme should be based on the module-skeleton (which is |
Up to maintainers at the end of the day I suppose, but not the route I would go.
Doubt the module would work properly whether or not the SQL was automated, but an effort to correct the path would at least reveal whether it works or not.
Never stopped me before. 😛 If maintainers want to go the 'one path to rule them all' route, I'd be willing to go through the catalogue and correct any offending modules, though no guarantee of correcting any issues brought along by core updates. |
I think this is fine, although maybe ultimately some SQL wasn't intended to be ran automatically |
Worth noting that this may also cause issues for existing users that have already applied the SQL for their modules manually. Not all module queries are created with the intention of being rerunnable, so having it be picked up from the automated updater may cause problems. |
I think people should just update their modules to use the proper pathing. This change doesn't really negatively affect me however. |
Doesn't affect me whatsoever, but I know that support for changes like this may be hard to deal with sometimes. |
what's the status of this? |
It didn't seem to be something that was supported by reviewers, which is fine. I agree that ensure that module authors/maintainers fix the path is a good option. I've had the intent to go through the Closing for now. |
Changes Proposed:
data/sql/db-world
. Other modules have sql files insql/world
.data/sql/db-world
was referenced in the code, meaning automatic imports would only work with some modules.data/sql
sql/
sql/
sql/
Issues Addressed:
SOURCE:
Tests Performed:
How to Test the Changes:
Download 2 modules that have sql in the different directories
make the DBimport a No-op.
a. Your yq implementation may need a different command. This is
community/yq
in the arch linux repositoryyq -iY '.services."ac-db-import".command |= "/bin/true"' docker-compose.yml
Build and start server
As the container runs, observe SQL from both mod-transmog and mod-item-level-up get imported
How to Test AzerothCore PRs
When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].
You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:
http://www.azerothcore.org/wiki/How-to-test-a-PR
REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).
For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.