★ wanayoo — archive 1999 https://github.com/codeclimate/codeclimate/issues/805Nouvelle recherche | Portail wanayoo
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

Prefetch isn't executed when running locally #805

Open
daften opened this issue Jan 9, 2018 · 5 comments
Open

Prefetch isn't executed when running locally #805

daften opened this issue Jan 9, 2018 · 5 comments

Comments

@daften
Copy link

@daften daften commented Jan 9, 2018

Latest codeclimate installed. No output about prefetch in the debug output

I expect my files to be prefetched, but they aren't. The repo in question is a private repository, but my codeclimate file is here: https://gist.github.com/daften/9a884ff729b69d0a63e4e2c85d5f771a

I run on macosX 10.13.2, docker is installed through brew, as is codeclimate. If needed, I can provide a copy of the code.

@ABaldwinHunter
Copy link
Contributor

@ABaldwinHunter ABaldwinHunter commented Jan 9, 2018

Hi @daften! Thanks for writing in.

I believe to get those files locally, you'll need to run the codeclimate prepare step separately:

$ codeclimate prepare
$ codeclimate analyze

It's a bit hidden, but in codeclimate help output there's a description:

    prepare [--allow-internal-ips]                      Run the commands in your prepare step.

Can you try that out and let me know how it goes?

Thanks!

Ashley

@daften
Copy link
Author

@daften daften commented Jan 12, 2018

Hi,

I completely looked over that, my apologies. That does work, thank you for that!

However when I discussed this with some of our developers, we all felt it would be more natural if the analyze step would also fetch (and default delete afterwards) the config files in the prefetch step. A flag could indicate not to do this, e.g. when you want to try to change those files and are testing locally in the repository.

I don't know if this could be accepted as a feature request?

thanks!

@wfleming
Copy link
Member

@wfleming wfleming commented Jan 12, 2018

Hi @daften,

Thanks for the feedback. One reason we don't want to fetch to be done automatically every time analysis runs is that one useful use-case for the CLI is working offline, so relying on a network connection seems like an anti-pattern, and would make analysis slower to run as well. We also generally try to design the CLI as sets of small, narrowly focused, independent commands that can be composed as necessary and don't cross-run each other too much.

That being said, I realize the workflow can be a bit confusing as-is since nothing clearly says prepare needs to be run first. I think our docs could improve in this area, but as a functionality change I also think it would be reasonable to have analyze also run prepare when it detects the config file prepare will write are missing locally, which I think would address the biggest pain point.

and default delete afterwards

Can you comment a bit on why that's a desirable workflow for you? In most team's usage of this feature that we've seen, they change fairly rarely, so always fetching and deleting seems wasteful. If they're annoying because they show up in diffs or something, we do recommend adding files fetched via prepare to your .gitignore.

@daften
Copy link
Author

@daften daften commented Jan 19, 2018

@mteodori
Copy link

@mteodori mteodori commented Oct 8, 2018

it would be nice if there was a command line option for analyze to fetch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.