Skip to content

[dummy_ci 3/7] Add CloudKmsService, FakeCloudKmsService, and DummyCiConfig - #5231

Open
ievdokdm wants to merge 3 commits into
197798-2-dummy-ci-ed25519-jwkfrom
197798-3-dummy-ci-kms-config
Open

ievdokdm wants to merge 3 commits into
197798-2-dummy-ci-ed25519-jwkfrom
197798-3-dummy-ci-kms-config

Conversation

@ievdokdm

@ievdokdm ievdokdm commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Adds CloudKmsService, FakeCloudKmsService, and DummyCiConfig to dummy_ci, mirroring Cocoon PR #5197.

Summary

  • Adds googleapis (^19.0.0), googleapis_auth (^2.3.6), and http to dummy_ci/pubspec.yaml and updates dummy_ci/pubspec.lock.
  • Implements dummy_ci/lib/src/service/cloud_kms_service.dart (listEnabledEd25519KeyVersionNames, getPublicKeyPem, asymmetricSign, selectLatestKeyVersionName comparing version IDs numerically, strict CryptoKey / CryptoKeyVersion regex validation, and ADC factory).
  • Implements dummy_ci/lib/src/config/dummy_ci_config.dart with environment variable parsing, HTTPS validation, derived endpoint URLs (/webhook, /status, /complete-run, /logs/<uid>/<test>), and defaults for flutter-dashboard-dev.
  • Adds dummy_ci/lib/src/fakes/fake_cloud_kms_service.dart exported via dummy_ci/lib/testing.dart.
  • Adds unit tests in dummy_ci/test/service/cloud_kms_service_test.dart and dummy_ci/test/config/dummy_ci_config_test.dart.
  • Updates dummy_ci/README.md with Cloud KMS keyring/key provisioning, rotation, and IAM binding commands.

Stack

Testing

  • dart pub get, dart format --set-exit-if-changed ., dart analyze --fatal-infos, dart test --test-randomize-ordering-seed=random --reporter expanded
  • dart --enable-asserts analyze.dart and dart run dev/cocoon_code_health/bin/check.dart

Towards flutter/flutter#197798

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces runtime configuration management and Google Cloud KMS integration for the dummy_ci service, including a fake KMS implementation for testing and updated documentation. The review feedback highlights a compilation error in dummy_ci_config.dart where uri.hasQuery is used instead of uri.query.isNotEmpty, a logical gap in fake_cloud_kms_service.dart where signHandler bypasses key existence checks, and a potential unhandled exception when accessing uri.host with a malformed authority.

@ievdokdm
ievdokdm force-pushed the 197798-3-dummy-ci-kms-config branch from 76b9f4a to 6f96dd5 Compare December 4, 2026 00:37
@ievdokdm
ievdokdm force-pushed the 197798-2-dummy-ci-ed25519-jwk branch from 22bf631 to 485ea5f Compare December 4, 2026 00:37
@ievdokdm
ievdokdm force-pushed the 197798-2-dummy-ci-ed25519-jwk branch from 485ea5f to 2011823 Compare December 4, 2026 01:07
@ievdokdm
ievdokdm force-pushed the 197798-3-dummy-ci-kms-config branch from 6f96dd5 to 037a6f7 Compare December 4, 2026 01:07
@ievdokdm
ievdokdm force-pushed the 197798-2-dummy-ci-ed25519-jwk branch from 2011823 to 1139f52 Compare December 5, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant