Skip to content

Commit 8bd60fb

Browse files
committed
Developer handbook: improve upgrade documentation
- Remove reference to GHES, which is no longer required. - Clarify use of the automatic workflow vs. manual workflow
1 parent 1fe51d5 commit 8bd60fb

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

docs/development_handbook.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -496,22 +496,36 @@ There are two external dependencies required for running the coding standards qu
496496

497497
For the purpose of this repository, and any tool qualification, we consider these external dependencies to be "black boxes" which require verification when upgrading.
498498

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:
500500

501501
- `codeql_cli` - this is the plain version number of the supported CodeQL CLI, e.g. `2.6.3`.
502502
- `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.
503503
- `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.
505504

506505
#### Upgrading external dependencies
507506

508507
To upgrade the CodeQL external dependencies:
509508

510509
1. Determine appropriate versions of the CodeQL CLI and `github/codeql` repository, according to the release schedule and customer demands.
511510
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 :
511+
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.
524+
525+
If the upgrade is of mismatched versions you will need to manually create the upgrade following this process:
526+
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:
515529

516530
```md
517531
This PR updates the `supported_codeql_configs.json` file to target CodeQL CLI <codeql_cli>.
@@ -525,9 +539,10 @@ To upgrade the CodeQL external dependencies:
525539
- [ ] Validate performance vs pre-upgrade, using /test-performance
526540
```
527541

528-
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.
529-
7. Once all the automate tests have passed, and the checklist is complete, the PR can be merged.
530-
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.
545+
531546

532547
### Release process
533548

0 commit comments

Comments
 (0)