codewars / codewars.com

Issue tracker for Codewars
https://www.codewars.com
BSD 2-Clause "Simplified" License
2.09k stars 219 forks source link

Translations approval sometimes doesn't update the kata #1793

Open Blind4Basics opened 5 years ago

Blind4Basics commented 5 years ago

Describe the bug

for the last hours, it seems that at least some of the approved translations aren't actually "applied" to the kata.

Happened here:

To Reproduce

No idea, unless it's general behavior. Then, just create a translation and approve it should show the problem.

Expected Behavior

the modifications/translations should replace the current version/be added to the kata.

cheers

┆Issue is synchronized with this Clickup by Unito

Blind4Basics commented 5 years ago

note: @Chrono79 did a PHP fork too (still for "who likes it") and this one seems to work correctly, so that might be an isolated problem.

Chrono79 commented 5 years ago

Well, the fork of an unapproved PHP translation worked fine, the previous translation was marked as deprecated and mine as approved, then I realized I forgot to change the sample tests and forked my fork. This time the changes were made but it seemed strange both forks are marked as approved.

kazk commented 5 years ago

To summarize:

image

Translation was approved, but it's not actually merged into the kata. Most likely the background job to merge the data failed for some reason.

image image

Change was applied, but previous version is not marked as deprecated. Most likely the background job failed to find the previous versions.

I'm not sure what exactly happened. For the first one, forking and trying to approve again should make Java available faster than me figuring this out. For the second issue, I wouldn't worry too much. I'm sure there's more like that so I might run some script to correct them.


In general, Codewars is too optimistic. It thinks everything will be alright so there's minimal error checks and almost no recovery so the data is left in some weird state when something goes wrong.

When translation is approved, the following happens:

  1. mark translation as approved (!)
  2. start background job to merge it into the kata

The background job will:

  1. deprecate other translations
  2. merge the translation into kata
  3. validate language versions in another background job to populate enabled versions. (I think #1666 happens if you open the page while the background job is still in progress)

Also, all of these steps assumes previous one succeeded and nothing is reverted when it failed.

Blind4Basics commented 5 years ago

okay, thanks for the input.

RS5 forked and successfully published \o/ Do we keep the issue opened? (I guess so?)

kazk commented 5 years ago

Yeah, I'll keep this open

g964 commented 5 years ago

Scala translation < https://www.codewars.com/kumite/5ce720ea495f740025a7cd61?sel=5ce720ea495f740025a7cd61 > doesn't appear in the list of languages of the kata.

kazk commented 5 years ago

@g964 can you try the workaround mentioned above (fork and approve)?

g964 commented 5 years ago

The translator has edited a new translation, I approved it and it works.

error256 commented 4 years ago

https://www.codewars.com/kumite/5eb5f2c580e7b80028d38584?sel=5ee0fb6b44c2ea0014a8bea4 Forking and approving didn't help here, is it a coincidence or is this case special somehow?

kazk commented 4 years ago

I found that a validation error is raised for that one. Something about the language fields that's copied into the kata seems invalid. I'll look into it further tomorrow.