You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/development_handbook.md
+25-18Lines changed: 25 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -496,46 +496,53 @@ There are two external dependencies required for running the coding standards qu
496
496
497
497
For the purpose of this repository, and any tool qualification, we consider these external dependencies to be "black boxes" which require verification when upgrading.
498
498
499
-
To (a) clearly specify the supported versions of these external dependencies and to (b) enable automation around them, the repository contains a `supported_codeql_configs.json` which lists the sets of supported configurations. There are four fields:
499
+
To (a) clearly specify the supported versions of these external dependencies and to (b) enable automation around them, the repository contains a `supported_codeql_configs.json` which lists the sets of supported configurations under the `supported_environments` property. There are three fields:
500
500
501
501
- `codeql_cli` - this is the plain version number of the supported CodeQL CLI, e.g. `2.6.3`.
502
502
- `codeql_standard_library` - this is the name of a tag on the `github.com/github/codeql` repository. The tag should be compatible with the CodeQL CLI given above. This would typically use the `codeql-cli/v<version-number>` tag for the release, although any tag which is compatible is allowed.
503
503
- `codeql_cli_bundle` - (optional) - if present, describes the CodeQL CLI bundle version that is compatible. The bundle should include precisely the CodeQL CLI version and CodeQL Standard Library versions specified in the two mandatory fields.
504
-
- `ghes` - (optional) - if present describes the GitHub Enterprise Server release whose integrated copy of the CodeQL Action points to the CodeQL CLI bundle specified in the `codeql_cli_bundle` field.
505
504
506
505
#### Upgrading external dependencies
507
506
508
507
To upgrade the CodeQL external dependencies:
509
508
510
509
1. Determine appropriate versions of the CodeQL CLI and `github/codeql` repository, according to the release schedule and customer demands.
511
510
2. Determine if there is a compatible CodeQL CLI bundle version by looking at the releases specified at [CodeQL Action releases](https://github.com/github/codeql-action/releases). The bundle always includes the standard library at the version specified by the `codeql-cli/v<version-number>` tag in the `github/codeql` repository.
512
-
3. If you find a compatible CodeQL CLI bundle, determine whether that bundle was released in a GitHub Enterprise server release, by inspecting the `defaults.json` file at https://github.com/github/codeql-action/blob/main/lib/defaults.json#L2 for the CodeQL Action submitted with
513
-
4. Populated the `supported_codeql_configs.json` file with the given values, ensuring to delete the optional fields if they are not populated.
514
-
5. Submit a Pull Request to the `github/codeql-coding-standards` repository with the title `Upgrade `github/codeql` dependency to <insert codeql_standard_library value>`. Use this template for the description, filling :
515
511
516
-
```md
517
-
This PR updates the `supported_codeql_configs.json` file to target:
512
+
If all components are being upgraded to a consistent veresion (e.g. CodeQL CLI v2.15.5, with `github/codeql` tag `codeql-cli/v2.15.5` and bundle `codeql-cli-bundle-v2.15.5`) then the following process can be used:
513
+
514
+
1. Run the [upgrade_codeql_dependencies.yml](./github/workflows/upgrade_codeql_dependencies.yml) workflow, with the plain version number, e.g. `2.15.5`. This will:
515
+
- Download the specified version of the CodeQL CLI
516
+
- Run the [upgrade-codeql-dependencies.py](scripts/release/upgrade-codeql-dependencies.py) script, which
517
+
- Validates the version selected exists in all relevant places
518
+
- Updates the `supported_codeql_configs.json` file.
519
+
- Updates each `qlpack.yml` in the repository with an appropriate value for the `codeql/cpp-all` pack, consistent with the selected CodeQL CLI version.
520
+
- Updates each `codeql-lock.yml` file to upgrade to the new version.
521
+
2. Follow the dependency upgrade checklist, confirming each step. The `.github/workflows/standard_library_upgrade_tests.yml` will trigger automation for running the `github/codeql` unit tests with the appropriate CLI version.
522
+
3. Once all the automate tests have passed, and the checklist is complete, the PR can be merged.
523
+
4. An internal notification should be shared with the development team.
518
524
519
-
- CodeQL CLI <codeql_cli>
520
-
- CodeQL Standard Library <codeql_standard_library>
521
-
- GHES <ghes>
522
-
- CodeQL CLI Bundle <date_of_bundle>
525
+
If the upgrade is of mismatched versions you will need to manually create the upgrade following this process:
523
526
524
-
<EITHER:This should match the versions of CodeQL deployed with GitHub Enterprise Server <ghes>>
525
-
<OR: This does not match any released version of GitHub Enterprise Server.>
527
+
1. Populate the `supported_codeql_configs.json` file with the given values, ensuring to delete the optional fields if they are not populated.
528
+
2. Submit a Pull Request to the `github/codeql-coding-standards` repository with the title `Upgrade `github/codeql` dependency to <insert codeql_standard_library value>`. Use this template for the description, filling:
529
+
530
+
```md
531
+
This PR updates the `supported_codeql_configs.json` file to target CodeQL CLI <codeql_cli>.
526
532
527
533
## CodeQL dependency upgrade checklist:
528
534
529
-
- [ ] Reformat our CodeQL using the latest version (if required)
535
+
- [ ] Confirm the code has been correctly reformatted according to the new CodeQL CLI.
530
536
- [ ] Identify any CodeQL compiler warnings and errors, and update queries as required.
531
537
- [ ] Validate that the `github/codeql` test cases succeed.
532
538
- [ ] Address any CodeQL test failures in the `github/codeql-coding-standards` repository.
533
-
- [ ] Validate performance vs pre-upgrade
539
+
- [ ] Validate performance vs pre-upgrade, using /test-performance
534
540
```
535
541
536
-
6. Follow the dependency upgrade checklist, confirming each step. The `.github/workflows/standard_library_upgrade_tests.yml` will trigger automation for running the `github/codeql` unit tests with the appropriate CLI version.
537
-
7. Once all the automate tests have passed, and the checklist is complete, the PR can be merged.
538
-
8. An internal notification should be shared with the development team.
542
+
3. Follow the dependency upgrade checklist, confirming each step. The `.github/workflows/standard_library_upgrade_tests.yml` will trigger automation for running the `github/codeql` unit tests with the appropriate CLI version.
543
+
4. Once all the automate tests have passed, and the checklist is complete, the PR can be merged.
544
+
5. An internal notification should be shared with the development team.
0 commit comments