Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements enable flag support for the GCP CAS AnyCA Gateway REST plugin, allowing users to disable CA operations without removing the configuration. The changes also add dual .NET framework support (net6.0 and net8.0) for better compatibility.
- Added enable flag validation to skip operations when CA is disabled
- Updated project to support both .NET 6.0 and .NET 8.0 target frameworks
- Modified build configuration to support flexible release directories
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| integration-manifest.json | Updated release directory path and added release project configuration |
| README.md | Updated installation instructions to support both net6.0 and net8.0 directories |
| GCPCAS/GCPCASCAPlugin.cs | Implemented enable flag logic and refactored configuration handling |
| GCPCAS/GCPCAS.csproj | Added multi-targeting for net6.0 and net8.0 frameworks |
| CHANGELOG.md | Added version 1.2.0 changelog entries |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if (string.IsNullOrEmpty(config.CAId)) missingFields.Add(nameof(config.CAId)); | ||
| if (string.IsNullOrEmpty(_config.LocationId)) missingFields.Add(nameof(_config.LocationId)); | ||
| if (string.IsNullOrEmpty(_config.ProjectId)) missingFields.Add(nameof(_config.ProjectId)); | ||
| if (string.IsNullOrEmpty(_config.CAPool)) missingFields.Add(nameof(_config.CAPool)); |
There was a problem hiding this comment.
The validation for CAId field has been removed, but it's still being used in the GCPCASClient constructor on line 202. This could cause issues if CAId is null or empty when the CA is enabled.
| if (string.IsNullOrEmpty(_config.CAPool)) missingFields.Add(nameof(_config.CAPool)); | |
| if (string.IsNullOrEmpty(_config.CAPool)) missingFields.Add(nameof(_config.CAPool)); | |
| if (string.IsNullOrEmpty(_config.CAId)) missingFields.Add(nameof(_config.CAId)); |
| _logger.LogTrace($"GCPCASClientFromCAConnectionData - LocationId: {_config.LocationId}"); | ||
| _logger.LogTrace($"GCPCASClientFromCAConnectionData - ProjectId: {_config.ProjectId}"); | ||
| _logger.LogTrace($"GCPCASClientFromCAConnectionData - CAPool: {_config.CAPool}"); | ||
| _logger.LogTrace($"GCPCASClientFromCAConnectionData - CAId: {_config?.CAId}"); |
There was a problem hiding this comment.
Using null-conditional operator on _config is unnecessary here since _config is assigned directly above on line 169 and cannot be null at this point.
| _logger.LogTrace($"GCPCASClientFromCAConnectionData - CAId: {_config?.CAId}"); | |
| _logger.LogTrace($"GCPCASClientFromCAConnectionData - CAId: {_config.CAId}"); |
Enable Flag Support