-
Notifications
You must be signed in to change notification settings - Fork 237
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
circleci config validate fails for project on GitHub Enterprise and CircleCI server #883
Comments
Same results.
Edit: It's worth noting that I've used |
If I manually download previous versions, the last version that works is v0.1.23845. 0.1.24435 starts to throw issues with private (server) orbs not being able to be found in the registry. |
@jmrieger - can I ask you to pin to v0.1.23845 for now. The reason this is failing appears to be far more nuanced and will require some deeper investigation into the internal services that serve these commands. |
Of course! If there's any other local debug or diagnosis that you'd like me to test, reach out directly - I'd be happy to help. |
I'll likely have to take you up on that offer! Leave it with me for now and I'll dig into our o11y tools tomorrow during my day and see if I can sniff out the underlying reason this appears to have regressed. |
I've been unable to replicate this issue in any of my tests unfortunately. Instead, I've taken a look at cleaning up the architecture of the code base and improving the error handling to be more explicit here - #884 It still needs to go through review process, but if you'd like to try |
Trying now; will update with any findings. |
|
Interesting, ok that helps move the needle a little. If you hit This gives me more to investigate though, I'll try and see if there is another internal source that is queried for the org-id in these situations. |
I can, but see the org slug was in a different format than what I was expecting - gh/org, and not orgname/reponame format. Modifying that to |
I made a change in config.go in the `ConfigQuery function as follows, to get some additional debugging: requestURL := &url.URL{
Path: "compile-config-with-defaults",
}
req, err := c.compileRestClient.NewRequest(
"POST",
requestURL,
compileRequest,
)
if err != nil {
return nil, fmt.Errorf("an error occurred creating the request: %w", err)
}
configCompilationResp := &ConfigResponse{}
statusCode, err := c.compileRestClient.DoRequest(req, configCompilationResp)
if err != nil {
fmt.Printf("%+v\n", requestURL)
fmt.Printf("%s\n", req.URL)
return nil, fmt.Errorf("config compilation request returned an error: %w (%w)", err, statusCode)
} Output:
I'm less fluent in Go, but what I think this is leading to is that the path that's supposed to be set on that URL is intended to be pulled from / compiled from configuration, but isn't being fully transpiled. |
@jmrieger I appreciate this is asking a lot with you helping me investigate - I've just pushed a new commit to that branch though, if you could test again with that I'm hoping it might help! |
Similar results:
|
With most recent commit (ede5ced):
|
I've figured this out - this will be due to the server version you are running on not having the underlying service endpoint exposed. The only course of action here will be to pin your version until the underlying server instance is updated. |
That make sense now, and understood. I realize that the CLI is not in version 1 yet, and thus all of this would technically not be subject to BC breaks, BUT, would it be a consideration to support the older version of Server? Or, provide some way via the package managers (Brew, Chocolatey) to actually support the older version of the CLI? At least with brew, they don't have an easy way to pin without having some (major) version specifier. |
I'll have to check with the team if they can make it easier to support breaking versions via proper versioning. Unfortunately, we wont be able to continue to support older versions as the intention is to remove certain internal services altogether. We are in the process of attempting to improve stability and simplify our architecture with these changes. |
@jmrieger - the latest release should make it explicitly obvious that this is the underlying reason for config compilation and validation issues now. I'm going to take a look into improving the documentation to show how folks can install older versions (not specific to brew) which should hopefully help other folks in your situation. Are you happy for me to close this issue for now though? |
@elliotforbes Absolutely. I appreciate the extra inches in the CLI being more verbose about the underlying errors. |
Meta:
CircleCI CLI Version:
0.1.24783+93e3e61 (homebrew)
Operating System:
macOS Ventura 13.2.1
CircleCI CLI Diagnostic:
Current behavior:
When running the CLI locally for CircleCI server and GitHub Enterprise as the location for the project, I receive the following:
circleci config validate
produces the following output:Expected behavior:
The CLI should respect and acknowledge that projects can live places other than public GitHub
When did this begin / Was this previously working?:
Began when I ran a brew update today for CircleCI CLI
Additional Information:
The text was updated successfully, but these errors were encountered: