kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

Add regression testing for channel update deletion behaviour

Open rtibbles opened this issue 5 years ago • 31 comments

Ref: https://github.com/learningequality/kolibri/pull/5853/files/b0104f3ef0e978f41beddf090240c4f1b5cafe04..94c5800705a4f5f5b5295de4fb75b9d7e4a75c6e#r329181611

Add a test to ensure that deleting during an upgrade proceeds properly.

rtibbles avatar Sep 27 '19 17:09 rtibbles

Hi @indirectlylit @rtibbles I would like to take this up.

I had a doubt as to where should I place the tests. Should it be in a new file (something like test_channel_update_deletion.py) or in the test_channel_import.py?

YashJipkate avatar Mar 24 '21 06:03 YashJipkate

@YashJipkate I think if it's more convenient, you can just add a new test case to an existing module like test_channel_import

jonboiser avatar Mar 25 '21 21:03 jonboiser

@YashJipkate Are you working on this issue? If not, can I work on it?

muhammadalics avatar Apr 09 '21 05:04 muhammadalics

@muhammadalics currently no, but I was planning to resume it post the GSoC application period. But if you want to work on it, then feel free to go ahead. And let us know if you are up for it.

YashJipkate avatar Apr 09 '21 05:04 YashJipkate

Hii i would like to work on this issue please assign me the issue @marcellamaki

Pursottam6003 avatar Mar 31 '23 13:03 Pursottam6003

Hello @Pursottam6003, thank you for your interest. As you volunteered for more issues and already have some of them assigned, I'm leaving this unassigned for now in case someone else wanted to tackle it as you're working on other issues. When your plate is empty, if this issue is still available, please remind yourself here and we can assign it to you.

MisRob avatar Apr 05 '23 10:04 MisRob

Hi, is this issue still open? I would like to work on it.

nikkuAg avatar Sep 08 '23 11:09 nikkuAg

Yes, these tests have not been written yet! I will assign you.

rtibbles avatar Sep 11 '23 15:09 rtibbles

Hey, Can you help me with how to write the regression test.

nikkuAg avatar Sep 25 '23 14:09 nikkuAg

Hi @nikkuAg, what exactly would you need to know at this point?

MisRob avatar Sep 28 '23 11:09 MisRob

@MisRob, I wanted to know how to write the test. Could you share some resources?

nikkuAg avatar Oct 24 '23 08:10 nikkuAg

Hi @nikkuAg There are some available tests for the deletion of channel related metadata during an upgrade. The first step would involve looking over these tests to identify any additional areas that have not been covered. You may also find helpful information about running automated tests in Kolibri here. I hope this helps!

LianaHarris360 avatar Oct 24 '23 19:10 LianaHarris360

Can I be assigned this issue?

aarishshahmohsin avatar Dec 15 '23 08:12 aarishshahmohsin

Hi @aarishshahmohsin - yes, thank you for your interest. I will assign you. Let us know if you have any questions.

Learning Equality will be closed for the end of the year from December 22 - January 2. Our team may be slower to respond during this time.

marcellamaki avatar Dec 15 '23 15:12 marcellamaki

Hey @marcellamaki, I went through the whole conversation of the issue and it seems to me that the task still remains to work as I also didn't find any linked PR with the issue. If it's still open can you please assign it to me? I would love to contribute.

yashpandey002 avatar Jan 14 '24 09:01 yashpandey002

Hi @yashpandey002! Sure! I have assigned the issue to you. Thanks for your interest in contributing to Kolibri :open_hands: Please let us know if you have any questions.

AlexVelezLl avatar Jan 15 '24 13:01 AlexVelezLl

Thanks, @AlexVelezLl, and ya I will let you know if I have any queries👐

yashpandey002 avatar Jan 15 '24 13:01 yashpandey002

Hey @AlexVelezLl, actually I am having difficulty setting up the repository locally, it's showing me some errors related to some Python libraries not found.

I went through the Github discussions but didn't find any solution to my problem and now I am confused about where to ask this query as it is related to the setup and not issue-specific. Please guide me about this.

yashpandey002 avatar Jan 16 '24 12:01 yashpandey002

Hi @yashpandey002! Did you follow the following step and install the Python dependencies?

ozer550 avatar Jan 16 '24 12:01 ozer550

Hey @ozer550 actually I was following the setup steps and when I tried setting up the virtual environment with pyenv(as it is recommended in docs) by following these instructions: https://kolibri-dev.readthedocs.io/en/develop/howtos/installing_pyenv.html I got some errors and not able to set up the virtual environment

  • I am using Fish shell so I did all the required steps for it and successfully installed the Pyenv.
  • But when I tried installing a Python version using pyenv by this command: pyenv install 3.9.9, it gave me a long error of some libraries not found.
  • The libraries this error pointing to are: bzip2, ncurses, libffi, and OpenSSL, but when I checked I found that all the libraries are already installed

If you want I can show you the exact error but I am not sure about how should I do it, like should I copy-paste the whole error here?

yashpandey002 avatar Jan 16 '24 13:01 yashpandey002

I was wondering if you installed all the pre-requisites mentioned by pyenv here?

ozer550 avatar Jan 16 '24 13:01 ozer550

Looks like after following the prerequisite instructions I have successfully installed the 3.9.9 version of Python with pyenv but now when I try to activate the virtual environment by this command: "pyenv activate kolibri-py3.9" it showing me: "pyenv-virtualenv: prompt changing not working for fish" and when I tried it again it showed: "pyenv-virtualenv: version `kolibri-py3.9' is already activated". So I am not sure if it is working fine or not?

I searched for the "prompt changing not working for fish" and found this thread: https://github.com/pyenv/pyenv/issues/1723 where it seems like they have closed it already

yashpandey002 avatar Jan 16 '24 14:01 yashpandey002

If you type python --version if it outputs 3.9.9 then the venv should be activated (unless that's your system Python version!).

rtibbles avatar Jan 16 '24 15:01 rtibbles

Thanks @rtibbles, when I executed the python --version command in Kolibri command it gave me 3.9.9(which I tried installing), and when I executed the same command in my global terminal it gave me 3.11.7, so now I am good to go right?

yashpandey002 avatar Jan 16 '24 18:01 yashpandey002

Seems so!

rtibbles avatar Jan 16 '24 18:01 rtibbles

image Can anyone please help me with this error, I can't exactly understand what it is trying to say, all I can understand is that the "yarn run build-base --mode=development --watch" command is failing.

yashpandey002 avatar Jan 18 '24 12:01 yashpandey002

The error is described in the line mentioning the git describe --tags command . For some reason you've tagged your version code in your repo and does not match current kolibri version schema.

https://git-scm.com/docs/git-describe shows the latest version tag in the git repository, I get v0.16.0-beta10-116-gbad3d07cf2 in my local repository . I guess you have added more tags that are not in sync with the version file of the repo.

jredrejo avatar Jan 18 '24 16:01 jredrejo

can i be assigned to this?

thesujai avatar Feb 08 '24 10:02 thesujai

Sure! @thesujai. I will assign this issue to you :).

AlexVelezLl avatar Feb 08 '24 17:02 AlexVelezLl

Hello 👋🏽 Just to clarify my approach and my understanding For a test case lets call it ChannelImportDeleteTestCase, I will have following methods(tests)(All centered arround check_and_delete_existing_channel()):

  1. Test case when channel already exists
  2. Test case to check and delete an existing channel during partial import
  3. Test case to check and delete an existing channel with an older version(verifies that the appropriate methods are called to delete the old channel data)
  4. Test case when the channel being imported has the same or newer version already present in the database.
  5. Test case to check if the existing channel is deleted when the channel does not exist.

@rtibbles If my approach seems okay, then also let me know which branch to target the PR, it is often unclear with the labels

thesujai avatar Feb 10 '24 19:02 thesujai