codeclimate-rubocop icon indicating copy to clipboard operation
codeclimate-rubocop copied to clipboard

Support channel-1-18-3 / rubocop 1.18.3

Open mileslane opened this issue 3 years ago • 24 comments

On https://codeclimate.com/repos/<UID>/builds/<build number>, if I expand the rubocop output:

Channel rubocop-1-18-3 not found for rubocop, available channels: ["stable", "cache-support", "rubocop-0-42", "rubocop-0-46", "rubocop-0-48", "rubocop-0-49", "rubocop-0-50", "rubocop-0-51", "rubocop-0-52", "rubocop-0-54", "rubocop-0-55", "rubocop-0-56", "rubocop-0-57", "rubocop-0-58", "rubocop-0-59", "rubocop-0-60", "rubocop-0-61", "rubocop-0-62", "rubocop-0-63", "rubocop-0-64", "rubocop-0-66", "rubocop-0-65", "rubocop-0-67", "rubocop-0-68", "rubocop-0-69", "rubocop-0-70", "rubocop-0-71", "rubocop-0-72", "rubocop-0-73", "rubocop-0-74", "rubocop-0-75", "rubocop-0-76", "rubocop-0-76-airbnb", "rubocop-0-77", "rubocop-0-78", "rubocop-0-79", "rubocop-0-80", "rubocop-0-81", "rubocop-0-82", "rubocop-0-83", "rubocop-0-84", "rubocop-0-85", "rubocop-0-86", "rubocop-0-87", "rubocop-0-88", "rubocop-0-89", "rubocop-0-90", "rubocop-0-92", "rubocop-1-70", "rubocop-1-7-0", "rubocop-1-8-1", "rubocop-1-9-1", "rubocop-1-10-0"]

And yet, https://github.com/codeclimate/codeclimate-rubocop/branches/all?utf8=%E2%9C%93&query=channel%2Frubocop shows a published branch for rubocop-1-18-3 (https://github.com/codeclimate/codeclimate-rubocop/tree/channel/rubocop-1-18-3)

Screen Shot 2021-07-12 at 1 19 33 PM

Additional information from codeclimate.com for this test pass:

$ codeclimate validate-config WARNING: unknown engine or channel rubocop:rubocop-1-18-3

Running codelimate locally, I am able to use rubocop-1.9.1:

rubocop-1-9-1: Pulling from codeclimate/codeclimate-rubocop Digest: sha256:b271a055420b29e0e29828b0071663c99c2a1c4882d6aa96fa890d70a1cd84c3 Status: Downloaded newer image for codeclimate/codeclimate-rubocop:rubocop-1-9-1

However, none of the branches newer that 1-9-1 are working. E.g., WARNING: unknown engine <rubocop:rubocop-1-10-0>

mileslane avatar Jul 08 '21 17:07 mileslane

While the branches have been added, I think we're still waiting on another step for them to be available, see https://github.com/codeclimate/codeclimate-rubocop/pull/290#issuecomment-874993591.

timlkelly avatar Jul 12 '21 23:07 timlkelly

@mileslane @timlkelly It should be available by now. I'll check tomorrow morning why that's not the case.

fede-moya avatar Jul 12 '21 23:07 fede-moya

@mileslane @timlkelly I have just gave it a shot and seems to be working just fine. Still isn't that the case ?

fede-moya avatar Jul 12 '21 23:07 fede-moya

@mileslane @timlkelly In case is still not working for you folks please share the codeclimate links of the repos so I can debug it. With codeclimate links I mean https://codeclimate.com/repos/<YOUR-REPO-ID>

fede-moya avatar Jul 12 '21 23:07 fede-moya

Locally with the CodeClimate CLI, I get the same error.

❯ codeclimate version
0.85.24
❯ codeclimate validate-config
WARNING: unknown engine or channel <rubocop:rubocop-1-18-3>

I can't see this error on CodeClimate, so I am not sure what is happening there. But it is telling me that existing Rubocop offenses have been resolved (they haven't, they still break locally). So that leads me to believe something is not working correctly.

Separately, it does error when I try to use rubocop-grapql, I know that is separate from the original issue reported but I thought it would also be available with the release. Details here, https://codeclimate.com/repos/51ca05b156b1023b0f002c42/builds/15424

timlkelly avatar Jul 13 '21 00:07 timlkelly

the codeclimate CLI gets its valid list of channels from here which is very outdated. it works fine for codeclimate-hosted builds though. ~to get it working locally just run:~

codeclimate analyze --dev -e rubocop:rubocop-1-18-3

Edit: i think i'm using the --dev flag incorrectly. there is probably a way to download the b845 build and run it locally, though.

jakeonfire avatar Jul 13 '21 01:07 jakeonfire

what's strange to me, though, is that running the afore-mentioned command gives me many (correct) rubocop offenses which do not show up in codeclimate.com builds 🤔 the same "extra" issues show up when i run rubocop directly, so they are legit. they are mostly from rubocop-rspec and rubocop-rails, though. it looks like this engine should support rubocop-rspec at least.

jakeonfire avatar Jul 13 '21 01:07 jakeonfire

I can confirm that, on codeclimate.com, our rubocop tests are now running as expected. I think I may now have some understanding of the problem.
When I expanded the builder pull-engines section of the test output on codeclimate.com, I did not see codeclimate-rubocop:rubocop-1-18-3. Instead, I saw codeclimate-rubocop:b845 Screen Shot 2021-07-12 at 9 20 47 PM This indicates to me that there is some mapping within codeclimate.com between a branch name and a git tag. In this case, rubocop-1-18-3 is causing the b845 tagged docker image to be used. I have to guess that the reason this was not working earlier is that connection was not set up earlier.

The repo's .codeclimate.yml contains:

plugins:
  rubocop:
    enabled: true
    channel: rubocop-1-18-3

I would very much like it if these configuration issues could be fully explained here: https://docs.codeclimate.com/docs/rubocop

mileslane avatar Jul 13 '21 01:07 mileslane

Thanks! :-)

mileslane avatar Jul 13 '21 01:07 mileslane

@timlkelly @jakeonfire The CLI and the platform (codeclimate.com) work pretty much independently, which btw other things menas that they need to be updated separately and we still haven't updated the CLI to account for rubocop-1-18-3.

@timlkelly that's right I was also expecting for rubocop-graphql to be available on rubocop-1-18-3. We can talk about that separately.

fede-moya avatar Jul 13 '21 12:07 fede-moya

@fede-moya got it, thank you! Regarding rubocop-graphql, that is working now. I was upgrading these two separately but it does work off of the 1-18-3 channel. Thank you for your help!

timlkelly avatar Jul 13 '21 14:07 timlkelly

@timlkelly great, good news! 🙌🏼 , anytime.

fede-moya avatar Jul 13 '21 14:07 fede-moya

how does rubocop-graphql work when it's not a dependency of the engine? i'm not getting my extensions to work via codeclimate.com...

jakeonfire avatar Jul 13 '21 19:07 jakeonfire

@jakeonfire it works for me by using the latest channel (1-18-3) and then loading the gem as an extension.

timlkelly avatar Jul 13 '21 22:07 timlkelly

@mileslane Hey! 🙌🏼 , working now ?

fede-moya avatar Jul 19 '21 10:07 fede-moya

works for me! 🙌

jakeonfire avatar Jul 22 '21 19:07 jakeonfire

@mileslane @timlkelly Any update on this?

anirudhchronus avatar Sep 09 '21 07:09 anirudhchronus

@anirudhchronus channel-1-18-3 has been working as expected for me since my previous comments. AFAIK, this issue is resolved.

timlkelly avatar Sep 09 '21 13:09 timlkelly

Still not working for me in the CLI:

codeclimate validate-config
WARNING: unknown engine or channel <rubocop:rubocop-1-18-3>

katelovescode avatar Sep 16 '21 19:09 katelovescode

I believe the CLI is separate from the platform per @fede-moya's response above:

The CLI and the platform (codeclimate.com) work pretty much independently, which btw other things means that they need to be updated separately and we still haven't updated the CLI to account for rubocop-1-18-3.

timlkelly avatar Sep 17 '21 16:09 timlkelly

Thanks @timlkelly, yes, that's the case. @katelovescode I can trigger a CLI release including more recent rubocop versions, that sounds good ?

fede-moya avatar Sep 17 '21 16:09 fede-moya

Yes please, @fede-moya , that'd be amazing!

katelovescode avatar Sep 19 '21 16:09 katelovescode

@fede-moya Hello, looks like there is a problem with publishing new version of codeclimate with new rubocop versions :( https://app.circleci.com/pipelines/github/codeclimate/codeclimate/203/workflows/a85684a4-46da-4bcd-a1ed-730f4259425e/jobs/2780

Is there a new docker image? Looks like it never comes to pushing to docker hub/rubygems because of login failure to rubygems step.

vladimirtemnikov avatar Oct 01 '21 16:10 vladimirtemnikov

This should be working now.

BrianHawley avatar Nov 16 '21 18:11 BrianHawley