kaltura / server

The Kaltura Platform Backend. To install Kaltura, visit the install packages repository.
https://github.com/kaltura/platform-install-packages
GNU Affero General Public License v3.0
368 stars 175 forks source link

Usage of "falvor" instead of "flavor" in 1 visible place and multiple other files in code #9550

Open bluikko opened 4 years ago

bluikko commented 4 years ago

Bug report

Please provide a detailed description of the issue and the steps to reproduce: One of the conversion profiles has what seems to be a typo: "falvors" - shouldn't this be "flavors"? It is visible in the management console.

Afterwards I noticed that the same "falvor" is present in:

Since there are so many occurrences of the "typo", it cannot just be a simple typo. Either:

If it is the former then question is is it safe to change the templates or would this affect already existing installations that are updated? Most likely the code could be fixed without issues.

I opened a PR at #9536 but quickly saw that the initial PR is wrong since it is enough to just change "INGESTED_FALVORS" to "INGESTED_FLAVORS" without fixing other files also. So the PR must not be merged!

Kaltura ENV

Please fill out this section if you are hosting the Kaltura platform on your own servers [as opposed to using Kaltura SaaS]. In the event of SaaS, the below should be deleted.

*Relevant errors from /opt/kaltura/log/kaltura_api_v3.log, /opt/kaltura/log/kaltura_apache_errorslog and /opt/kaltura/log/kaltura_prod.log:** irrelevant

Linux distribution name and version: git MASTER

Are you using the RPM or deb packages?

When using RPM, paste the output for:

# rpm -qa "kaltura-*"
irrelevant

For deb based systems:

# dpkg -l "kaltura-*"
irrelevant

Is this an all in one instance [single server] or a cluster?

If applicable, please provide the MySQL version: irrelevant

If you're having an issue with a specific media asset, please provide a link from which it can be downloaded/played: irrelevant

jessp01 commented 4 years ago

Hello @bluikko ,

Yes, it's true, someone did have a typo, in all these files. The typo in alpha/apps/kaltura/lib/KDLWrap.php is only in a comment as far as I can see:

NOT COMMITED, to check with KDLFalvor

Same goes for alpha/apps/kaltura/lib/myEntryUtils.class.php.

In alpha/apps/kaltura/modules/system/actions/flavorParamsAction.class.php, it's clearly a copy paste sort of error, starting with the initialisation here:

$newFalvorParams = $this->editFlavorParam->copy();

And carried out wherever the var is referenced. That typo has been there since day one but it doesn't have an actual effect (coding style aside, that is), that var could have been called $a and the code would still work. So yes, a typo, but not the worst thing in the world and, IMHO, not worth changing after all this time.

Frankly, to me, flavor also feels like a typo because, in the UK, we spell it flavour. Anyway, I don't think it's a very confusing typo myself. Would I rather we didn't have it? Definitely. But is it very important? Not in my opinion.

./plugins/monitor/nagios/config/cluster_commands.cfg.template and ./plugins/monitor/nagios/config/cluster_commands.cfg.template are both optional templates for Nagios monitoring. Optional and frankly, no longer maintained. The typo is in the conversion profile name [INGESTED_FALVORS] declared in deployment/base/scripts/init_content/01.conversionProfile.-4.template.xml:

                <request service="conversionProfile" action="add">
                        <conversionProfile objectType="KalturaConversionProfile">
                                <name>Ingested Falvors</name>
                                <systemName>INGESTED_FALVORS</systemName>
                                <description>Light set of flavors to be ingested</description>
                                <flavorParamsIds>0,1,2,3</flavorParamsIds>
                        </conversionProfile>
                </request>

-4 is the system monitoring partner. If you use these monitoring scripts, you are welcome to rename that profile on your own ENV; you can do so by directly updating the DB record, see:

mysql> select system_name from conversion_profile_2 where partner_id=-4;
+------------------+
| system_name      |
+------------------+
| Default          |
| INGESTED_FALVORS |
+------------------+

And then the Nagios config files.

Cheers,

bluikko commented 4 years ago

There is only one occurrence visible (in the management console). In my opinion that should be fixed even if the database etc. is not?

I won't comment on US vs UK issue...