Skip to content

Refactor tasks files #3775

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

Closed
8 tasks
humitos opened this issue Mar 12, 2018 · 27 comments
Closed
8 tasks

Refactor tasks files #3775

humitos opened this issue Mar 12, 2018 · 27 comments
Labels
Good First Issue Good for new contributors Needed: design decision A core team decision is required
Milestone

Comments

@humitos
Copy link
Member

humitos commented Mar 12, 2018

We have a lot of lines of code in projects/tasks.py and maybe some of them doesn't belong there or they can be moved to core/tasks.py.

Tasks we can consider moving,

  • fileify
  • send_notifications
  • email_notification
  • webhook_notification
  • remove_dir
  • clear_artifcats
  • clear_*_artifacts
  • finish_inactive_builds

We want to refactor these files and take a look if there are other task files than can be refactored also.

Ref: #3762

@shubham76
Copy link
Contributor

Hey! Can I take this issue?

@RichardLitt
Copy link
Member

@shubham76 Go ahead! Make sure to link back to this issue in your PR (I normally do this in the body), especially if the PR only affects one of the subtasks and not the entire issue.

@agjohnson
Copy link
Contributor

This probably needs a little more hashing out before someone can jump in.

@agjohnson agjohnson added the Needed: design decision A core team decision is required label Mar 15, 2018
@agjohnson
Copy link
Contributor

I raised this on the underlying PR comment already.

readthedocs.core is not an obvious spot for code, it doesn't mean much to me and has become a dumping ground for code. I'd prefer we look into a different pattern for moving these files around:

  • Break up readthedocs.projects.tasks into submodules: readthedocs.projects.tasks.build or readthedocs.projects.tasks.sync, etc
  • Move to an application where the tasks makes more sense -- if a task operates on versions, it should be in readthedocs.builds.tasks

I'd prefer either over readthedocs.core

@shubham76
Copy link
Contributor

Okay! So we shouldn't move the code to readthedocs.core and instead to other submodules as you are suggesting.
In that case, I think I have messed up the PR. I'll start from scratch and try making changes as you had suggested here.

@shubham76
Copy link
Contributor

shubham76 commented Mar 25, 2018

Hey! @agjohnson So how many submodules should we have to move above mentioned files into?

@Alig1493
Copy link
Contributor

Alig1493 commented Oct 7, 2018

Is this issue still open?

@stsewd
Copy link
Member

stsewd commented Oct 7, 2018

@Alig1493 there is an open PR for this #3943

@ericholscher
Copy link
Member

I closed #3943 because it is old and had many conflicts. If anyone else wants to attempt this, I'm all for it. Please do try and keep the refactor minimal though!

@Alig1493
Copy link
Contributor

Alig1493 commented Nov 7, 2018

@ericholscher If this requires a new PR I'd like to take a stab at it.

@stsewd
Copy link
Member

stsewd commented Nov 7, 2018

@Alig1493 go ahead!

@Alig1493
Copy link
Contributor

Alig1493 commented Nov 8, 2018

@stsewd Before proceeding I noticed that there are 5 failing tests in the updated upstream master, namely in rtd_tests/tests/test_backend.py(3) and rtd_tests/tests/test_celery.py(2) files. Will this be an issue moving forward?

@stsewd
Copy link
Member

stsewd commented Nov 8, 2018

@Alig1493 build is passing on master

@Alig1493
Copy link
Contributor

@stsewd I keep getting errors in tests which require for me to connect to a remote repository. Is there any chance that there certain tests that will fail in local?

@dojutsu-user
Copy link
Member

@Alig1493
I have just run all the tests and all are passing in local.

@Alig1493
Copy link
Contributor

@dojutsu-user I see. I can't seem to figure out the issue on my end though. Keeps telling me it has failed to connect to remote repositories.

@stsewd
Copy link
Member

stsewd commented Nov 11, 2018

Check that you have all the requirements for rtd, I guess it's your git version, it should be >=2.17

@Alig1493
Copy link
Contributor

@stsewd My git version shows to be at version 2.7.4

@dojutsu-user
Copy link
Member

@Alig1493 Can you post an screenshot or some error log??
and also, are you using tox?

@Alig1493
Copy link
Contributor

Alig1493 commented Nov 11, 2018

@dojutsu-user sure.
And yes I'm using tox
image

@humitos
Copy link
Member Author

humitos commented Nov 12, 2018

@Alig1493 you are not using the correct git version. The first line of your screenshot says that --prune-tags arg is not known.

@shivanshu1234
Copy link
Contributor

Hello, I see this issue still exists. I'm new here and would like to take a shot at it.

May I know why #4888 was not merged?

@stsewd
Copy link
Member

stsewd commented Feb 17, 2019

It got staled and with a lot of conflicts I think

@shivanshu1234
Copy link
Contributor

Okay, thank you.

@Iamshankhadeep
Copy link
Contributor

is this issue still open?

@dojutsu-user
Copy link
Member

Hi @Iamshankhadeep
Thanks for your interest in contribution.
There's already PR open for this issue #5333.
I would suggest to please look for another open issues.
Thanks.

@humitos
Copy link
Member Author

humitos commented Jan 25, 2020

Our code changed a lot since this issue was opened and we are going to remove a lot of this code in #6535 or a similar one, these days.

@humitos humitos closed this as completed Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Good for new contributors Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

10 participants