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

Support channel-1-18-3 / rubocop 1.18.3 #297

Open
mileslane opened this issue Jul 8, 2021 · 24 comments
Open

Support channel-1-18-3 / rubocop 1.18.3 #297

mileslane opened this issue Jul 8, 2021 · 24 comments
Assignees

Comments

@mileslane
Copy link

mileslane commented Jul 8, 2021

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>

@timlkelly
Copy link

While the branches have been added, I think we're still waiting on another step for them to be available, see #290 (comment).

@f-moya
Copy link

f-moya commented Jul 12, 2021

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

@f-moya
Copy link

f-moya commented Jul 12, 2021

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

@f-moya
Copy link

f-moya commented Jul 12, 2021

@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>

@timlkelly
Copy link

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

@jakeonfire
Copy link

jakeonfire commented Jul 13, 2021

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
Copy link

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.

@mileslane
Copy link
Author

mileslane commented Jul 13, 2021

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
Copy link
Author

Thanks! :-)

@f-moya
Copy link

f-moya commented Jul 13, 2021

@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.

@timlkelly
Copy link

@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!

@f-moya
Copy link

f-moya commented Jul 13, 2021

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

@jakeonfire
Copy link

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...

@timlkelly
Copy link

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

@f-moya
Copy link

f-moya commented Jul 19, 2021

@mileslane Hey! 🙌🏼 , working now ?

@jakeonfire
Copy link

works for me! 🙌

@anirudhchronus
Copy link

@mileslane @timlkelly Any update on this?

@timlkelly
Copy link

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

@katelovescode
Copy link

Still not working for me in the CLI:

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

@timlkelly
Copy link

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.

@f-moya
Copy link

f-moya commented Sep 17, 2021

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

@katelovescode
Copy link

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

@vladimirtemnikov
Copy link

vladimirtemnikov commented Oct 1, 2021

@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.

@BrianHawley
Copy link

This should be working now.

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

No branches or pull requests

9 participants