Include registry_types in more status reports - #4050
Conversation
There was a problem hiding this comment.
Warning
- Copilot's review of this pull request may be incomplete because some of the changed files are excluded by your Copilot content exclusion settings. See Excluding content from Copilot for details.
Pull request overview
Extends status reports to include registry types derived from CODEQL_PROXY_URLS.
Changes:
- Adds registry-type extraction to base status reports.
- Reuses the base field for
start-proxy. - Adds parsing and integration tests.
Show a summary per file
| File | Description |
|---|---|
| src/status-report.ts | Adds registry-type extraction and reporting. |
| src/status-report.test.ts | Tests extraction and status-report integration. |
| src/start-proxy.ts | Moves registry_types into the shared report type. |
| lib/entry-points.js | Generated, policy-excluded artifact. |
Review details
Files excluded by content exclusion policy (1)
- lib/entry-points.js
- Files reviewed: 3/4 changed files
- Comments generated: 2
- Review effort level: Medium
|
Is it intentional that we omit host registries in the the status reports? I believe |
|
@sam-robson Yes, we intentionally do not include hostnames in the telemetry. The hostnames are filtered out for the existing |
I meant the registry types for host-only credentials, not the hostname values themselves. |
| validate, | ||
| check: defaultCheck(validate), | ||
| required, | ||
| required: true, |
There was a problem hiding this comment.
See the relevant commit message. The existing code inferred an unhelpful type for the results of this function, since we require the value of required in the type. I could have made a different change here to still have the required parameter, but that would have complicated the function more than necessary considering all consumers create validators for required properties.
oscarsj
left a comment
There was a problem hiding this comment.
just a heads up on a change that I don't understand,but otherwise lgtm
@sam-robson Ah, thanks for clarifying and sorry I misunderstood your comment. AFAIK, the |
Currently, the
registry_typesfield in status reports is only populated by thestart-proxyaction. However, other steps such asinitandanalyzehave access to the registry types via theCODEQL_PROXY_URLSenvironment variable. It is useful for us to be able to see at a glance wheninitoranalyzesteps benefit from configured registries.This PR updates the
createStatusReportBasefunction to try and parse the contents ofCODEQL_PROXY_URLSwhen it is set to include the unique registry types in the status report when possible.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
dynamicworkflows (Default Setup, Code Quality, ...).Products:
analysis-kinds: code-scanning.analysis-kinds: code-quality.upload-sarifaction.Environments:
github.comand/or GitHub Enterprise Cloud with Data Residency.How did/will you validate this change?
.test.tsfiles).pr-checks).If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist