Skip to content

Remove record dependency from BaseEnvironment #3643

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
humitos opened this issue Feb 20, 2018 · 5 comments
Closed

Remove record dependency from BaseEnvironment #3643

humitos opened this issue Feb 20, 2018 · 5 comments
Assignees
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code
Milestone

Comments

@humitos
Copy link
Member

humitos commented Feb 20, 2018

Currently, the BaseEnvironment class check if record is defined and if so, record the command into the database, https://github.com/rtfd/readthedocs.org/pull/3520/files#r168777620

This is not a good approach since BaseEnvironment should know nothing about recording a command.

So, I think it's a good idea to have something like pre_run_command and post_run_command methods so classes that inherit from it can override those to do whatever they need (record the command in this specific case)

@humitos humitos added the Improvement Minor improvement to code label Feb 20, 2018
@humitos humitos added this to the Refactoring milestone Feb 20, 2018
@agjohnson
Copy link
Contributor

Is there a specific reason why BaseEnvironment shouldn't know about command reporting? It seems like the best place to implement this logic is in a shared base

@humitos
Copy link
Member Author

humitos commented Mar 29, 2018

BuildEnvironment is the one that should know about recording a Build since it's the one used for building process.

Maybe we should call it BaseBuildEnvironment to make it consistent with the other pieces.

BaseEnvironment is used not just for Build but also for VCS commands for example.

@stale
Copy link

stale bot commented Jan 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: stale Issue will be considered inactive soon label Jan 10, 2019
@stsewd
Copy link
Member

stsewd commented Jan 10, 2019

I was trying to take this, but looks like a big refactor, and I'm thinking in another approach in #5028

@stale stale bot removed the Status: stale Issue will be considered inactive soon label Jan 10, 2019
@stsewd stsewd added the Accepted Accepted issue on our roadmap label Jan 10, 2019
@humitos humitos self-assigned this Mar 12, 2022
@humitos
Copy link
Member Author

humitos commented Mar 15, 2022

This class was refactored and BaseEnvironment does not receives a record= argument anymore.

@humitos humitos closed this as completed Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Improvement Minor improvement to code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants