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

Add regression testing for channel update deletion behaviour #5960

Closed
rtibbles opened this issue Sep 27, 2019 · 31 comments · Fixed by #11896
Closed

Add regression testing for channel update deletion behaviour #5960

rtibbles opened this issue Sep 27, 2019 · 31 comments · Fixed by #11896
Assignees
Labels
DEV: backend Python, databases, networking, filesystem... good first issue Self-contained, straightforward, low-complexity help wanted Open source contributors welcome P2 - normal Priority: Nice to have TAG: tech update / debt Change not visible to user TAG: unit tests Add or update tests

Comments

@rtibbles
Copy link
Member

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 rtibbles mentioned this issue Sep 27, 2019
9 tasks
@indirectlylit indirectlylit added TAG: tech update / debt Change not visible to user TAG: unit tests Add or update tests DEV: backend Python, databases, networking, filesystem... TAG: beginner friendly labels Mar 23, 2020
@indirectlylit indirectlylit added this to the upcoming patch milestone May 23, 2020
@indirectlylit indirectlylit added the P2 - normal Priority: Nice to have label May 23, 2020
@YashJipkate
Copy link
Contributor

YashJipkate commented Mar 24, 2021

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?

@jonboiser
Copy link
Contributor

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

@muhammadalics
Copy link

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

@YashJipkate
Copy link
Contributor

@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.

@Pursottam6003
Copy link
Contributor

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

@MisRob
Copy link
Member

MisRob commented Apr 5, 2023

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 MisRob added help wanted Open source contributors welcome good first issue Self-contained, straightforward, low-complexity and removed TAG: beginner friendly labels Aug 18, 2023
@nikkuAg
Copy link
Contributor

nikkuAg commented Sep 8, 2023

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

@rtibbles
Copy link
Member Author

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

@nikkuAg
Copy link
Contributor

nikkuAg commented Sep 25, 2023

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

@MisRob
Copy link
Member

MisRob commented Sep 28, 2023

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

@nikkuAg
Copy link
Contributor

nikkuAg commented Oct 24, 2023

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

@LianaHarris360
Copy link
Member

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!

@nikkuAg nikkuAg removed their assignment Dec 1, 2023
@jredrejo jredrejo assigned jredrejo and unassigned jredrejo Dec 5, 2023
@jredrejo jredrejo assigned jredrejo and unassigned jredrejo Dec 5, 2023
@aarishshahmohsin
Copy link

Can I be assigned this issue?

@marcellamaki
Copy link
Member

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.

@yashpandey002
Copy link

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.

@AlexVelezLl
Copy link
Member

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

@yashpandey002
Copy link

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

@yashpandey002
Copy link

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.

@ozer550
Copy link
Member

ozer550 commented Jan 16, 2024

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

@yashpandey002
Copy link

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?

@ozer550
Copy link
Member

ozer550 commented Jan 16, 2024

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

@yashpandey002
Copy link

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: pyenv/pyenv#1723 where it seems like they have closed it already

@rtibbles
Copy link
Member Author

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

@yashpandey002
Copy link

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?

@rtibbles
Copy link
Member Author

Seems so!

@yashpandey002
Copy link

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.

@jredrejo
Copy link
Member

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.

@yashpandey002 yashpandey002 removed their assignment Feb 6, 2024
@thesujai
Copy link
Contributor

thesujai commented Feb 8, 2024

can i be assigned to this?

@AlexVelezLl
Copy link
Member

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

@thesujai
Copy link
Contributor

thesujai commented Feb 10, 2024

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

@rtibbles
Copy link
Member Author

Yes, all looks correct. For (2) just to clarify that doing a partial import over a full import should not trigger a deletion, but doing a full import over a partial import should.

This work should be targeted to develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DEV: backend Python, databases, networking, filesystem... good first issue Self-contained, straightforward, low-complexity help wanted Open source contributors welcome P2 - normal Priority: Nice to have TAG: tech update / debt Change not visible to user TAG: unit tests Add or update tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.