Skip to content

Conversation

@bhillkeyfactor
Copy link
Contributor

Enable Flag Support

@spbsoluble spbsoluble requested a review from Copilot October 6, 2025 15:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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));
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
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));

Copilot uses AI. Check for mistakes.
_logger.LogTrace($"GCPCASClientFromCAConnectionData - LocationId: {_config.LocationId}");
_logger.LogTrace($"GCPCASClientFromCAConnectionData - ProjectId: {_config.ProjectId}");
_logger.LogTrace($"GCPCASClientFromCAConnectionData - CAPool: {_config.CAPool}");
_logger.LogTrace($"GCPCASClientFromCAConnectionData - CAId: {_config?.CAId}");
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
_logger.LogTrace($"GCPCASClientFromCAConnectionData - CAId: {_config?.CAId}");
_logger.LogTrace($"GCPCASClientFromCAConnectionData - CAId: {_config.CAId}");

Copilot uses AI. Check for mistakes.
@spbsoluble spbsoluble merged commit 4c73a1d into release-1.2 Oct 9, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants