Skip to content

Trying different agent pool#807

Open
JakeM-Kainos wants to merge 1 commit intomainfrom
CHG-0115854
Open

Trying different agent pool#807
JakeM-Kainos wants to merge 1 commit intomainfrom
CHG-0115854

Conversation

@JakeM-Kainos
Copy link
Copy Markdown
Contributor

@JakeM-Kainos JakeM-Kainos commented Feb 23, 2026

Jira link

See PROJ-XXXXXX

Change description

Testing done

Security Vulnerability Assessment

CVE Suppression: Are there any CVEs present in the codebase (either newly introduced or pre-existing) that are being intentionally suppressed or ignored by this commit?

  • Yes
  • No

Checklist

  • commit messages are meaningful and follow good commit message guidelines
  • README and other documentation has been updated / added (if needed)
  • tests have been updated / new tests has been added (if needed)
  • Does this PR introduce a breaking change

Link to Terraform Plan

https://tfplan-viewer.hmcts.net/aks-cft-deploy/807

🤖AEP PR SUMMARY🤖

  • azure-pipelines.yml:
    🔧 Modified the pool configuration in the "Aks_${{ component.env }}" stage from a fixed pool name (hmcts-cftptl-agent-pool) to dynamically use a VM image based on a variable (vmImage: ${{ variables.agentPool }}), improving pipeline flexibility.

@JakeM-Kainos JakeM-Kainos requested a review from a team as a code owner February 23, 2026 08:11
@JakeM-Kainos JakeM-Kainos requested review from DanielKChristou, JamieMcConnellKainos and danielwilsonkainos and removed request for a team February 23, 2026 08:11
@github-actions
Copy link
Copy Markdown
Contributor

Feedback:

Code Quality:

  1. Redundant pool key:
    • You've declared the pool key twice, which is unnecessary. Consolidate the two declarations:
      yaml
      pool:
      name: hmcts-cftptl-agent-pool
      vmImage: ${{ variables.agentPool }}
      This improves code clarity and avoids potential issues.
      
      

Best Practices:

  1. Validation of $variables.agentPool:

    • Ensure that variables.agentPool is properly defined and validated in the pipeline setup or accordingly defaults to prevent runtime errors.
  2. Descriptive variable names:

    • variables.agentPool could be more descriptive to convey what agent pool or image it represents. E.g., vmAgentImage or targetAgentImage.

Security:

  1. Agent Pool Access Rights:
    • Ensure that the hmcts-cftptl-agent-pool and the VM image specified by variables.agentPool have appropriate access controls to prevent unauthorized access.

Cost Considerations:

  1. The change specifies vmImage dynamically yet does not clarify what type of VM will be used. Some images, like windows-latest or high-resource Linux VMs, can incur higher Azure DevOps billing rates. Ensure the selected agent is cost-optimized for the workload.

    • Potential cost change: Adding a high-performance VM (e.g., windows-latest) could increase costs by £0.008/minute (~£1.9/day for 4-hour jobs).
    • Encourage using lighter/frequent free-tier builds (e.g., ubuntu-latest where applicable).

Carbon Usage:

  1. Using lighter agent pools such as ubuntu-latest over compute-heavy VMs can reduce carbon emissions. Ensure the selected pool is minimal for pipeline tasks.

Suggested Final Version:

- stage: Aks_${{ component.env }}
  displayName: \"${{ upper(component.env) }}: AKS clusters\"
  pool:
    name: hmcts-cftptl-agent-pool
    vmImage: ${{ variables.agentPool }}
  dependsOn:
    - Managed_Identity_${{ component.env }}
  condition: |

This version ensures clarity, better variable naming, and merges duplicate keys.

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.

1 participant