sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.51k stars 260 forks source link

bug: Cloudflare blocking - Embedding Incomplete - IP blocked #4956

Open inzi opened 1 month ago

inzi commented 1 month ago

Version

VSCode 1.91.1 Cody Version: 1.26.6 and v1.27.1721488653 (pre-release)

Describe the bug

Embeddings creation and indexing only progresses single digit percentage then IP blocked. It looks like CloudFlare.

I have tested from two locations with static IP addresses and attempted several times from VPN to no avail.

For reference, see this closed issue that is directly related: https://github.com/sourcegraph/cody/issues/2437

Window Output:

<div class="container">
    <h2 style="text-align: center; ">Your request was blocked by our firewall</h2>
    The most common causes for this problem are:
    <ul>
      <li>
        A search was blocked because of dangerous keywords.
      </li>
      <li>
        You IP is not allowed, which may be related to VPN issues.
      </li>
    </ul>
    <br>
    If you believe this is incorrect and require further troubleshooting please contact <a href="/cdn-cgi/l/email-protection#4f3c3a3f3f203d3b0f3c203a3d2c2a283d2e3f27612c2022">Sourcegraph Support</a> with the information below:
    <br>
    <br>
    Ray ID: 8a65c78dcbea6b4d
    <br>
  </div>

Expected behavior

Embeddings should index and complete so that Cody can be used as designed.

Additional context

No response

jdorfman commented 1 month ago

Hi @inzi, I will make sure the product team sees this in the weekly community feedback report (it goes out today).

inzi commented 1 month ago

Thanks!

I need to find a way to identify the offending file so I can add to .cody/ignore. I've set debug to verbose but haven't found a way to see where it's stopping. It's Cloudflare, for sure.

However - I would strongly suggest Cody honors .gitignore instead of it's ".cody/ignore" feature. If it's in gitignore, Cody should ignore it as well.

jdorfman commented 1 month ago

However - I would strongly suggest Cody honors .gitignore instead of it's ".cody/ignore" feature. If it's in gitignore, Cody should ignore it as well.

Good point!

inzi commented 1 month ago

I was told by Enrique, on my ticket, that Cody does honor .gitignore. I've not dug into the logs to verify.

Basically - the keyword is "system" that makes CloudFlare become fascist. =).

NTS: Don't call anything your code "system"

I refactored some code and had much better luck.

inzi commented 1 month ago

Closing.