Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REGRESSION]: HelmDeploy@1 and HelmDeploy@0 stopped working with environment #20791

Open
4 of 7 tasks
PAKalucki opened this issue Jan 20, 2025 · 4 comments
Open
4 of 7 tasks
Labels
Area: Release bug regression This used to work, but a change in the service/tasks broke it. triage

Comments

@PAKalucki
Copy link

PAKalucki commented Jan 20, 2025

New issue checklist

Task name

HelmDeploy

Breaking task version

1.250.1
0.250.1

Last working task version

0.247.3

Regression Description

Both HelmDeploy@1 and HelmDeploy@0 started to ignore environment https://learn.microsoft.com/en-us/azure/devops/pipelines/process/environments?view=azure-devops#target-a-specific-environment-resource-from-a-deployment-job

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

Ubuntu 22.04

Relevant log output

Starting: Helm upgrade
==============================================================================
Task         : Package and deploy Helm charts
Description  : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running helm commands
Version      : 1.250.1
Author       : Microsoft Corporation
Help         : https://aka.ms/azpipes-helm-tsg
==============================================================================
##[error]Error: Input required: kubernetesCluster
Finishing: Helm upgrade

Full task logs with system.debug enabled

UNSUCCESSFUL RUN
 [REPLACE THIS WITH YOUR INFORMATION] 
SUCCESSFUL RUN
 Starting: Helm upgrade
==============================================================================
Task         : Package and deploy Helm charts
Description  : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running helm commands
Version      : 0.247.3
Author       : Microsoft Corporation
Help         : https://aka.ms/azpipes-helm-tsg
==============================================================================
/usr/local/bin/helm upgrade --namespace test --install --wait test /home/vsts/work/1/s/test
Release "test" has been upgraded. Happy Helming!
NAME: test
LAST DEPLOYED: Mon Jan 20 11:07:46 2025
NAMESPACE: test
STATUS: deployed
REVISION: 6
TEST SUITE: None 

Repro steps

jobs:
  - deployment: Deploy
    displayName: Deploy to Kubernetes
    pool:
      vmImage: ubuntu-latest
    environment: 
      name: test
      resourceType: Kubernetes
      resourceName: test
    strategy:
      runOnce:
        deploy:
          steps:
          - checkout: self

          - task: HelmDeploy@1
            displayName: Helm upgrade
            inputs:
              namespace: default
              command: upgrade
              chartType: filepath
              chartPath: test
              releaseName: test
              install: true
              waitForExecution: true
@PAKalucki PAKalucki added bug regression This used to work, but a change in the service/tasks broke it. labels Jan 20, 2025
@PAKalucki PAKalucki changed the title [REGRESSION]: HelmDeploy@1 and HelmDeploy@0 ignore environment [REGRESSION]: HelmDeploy@1 and HelmDeploy@0 stopped working with environment Jan 20, 2025
@Deekshitha981
Copy link
Collaborator

Hi @PAKalucki could you please share the successful and unsuccessful logs with debug set to true

@murphy85
Copy link

murphy85 commented Jan 22, 2025

We faced the same issue with explicit connection configuration instead of environment configuration. Before we could just set the kubernetesServiceConnection attribute and it worked. Now the task asks for kubernetesCluster. Now it works like it is documented:

HelmDeploy@0 - Package and deploy Helm charts v0 task

#connectionType: 'Azure Resource Manager' # 'Azure Resource Manager' | 'Kubernetes Service Connection' | 'None'. Required when command != logout && command != package && command != save. Connection Type. Default: Azure Resource Manager.
#kubernetesCluster: # string. Required when connectionType = Azure Resource Manager && command != logout && command != package && command != save. Kubernetes cluster. 

If connectionType is not specified, 'Azure Resource Manager' is default. If connectionType is 'Azure Resource Manager', the attribute kubernetesCluster is required.

We just added connectionType: 'Kubernetes Service Connection' to our tasks.

@DRoppelt
Copy link

DRoppelt commented Jan 22, 2025

similar here, using HelmDeploy@0. Not affecting the environment but breaking behavior with requiring a new set of parameters to work like before.

when it worked, the underlying version was 0.247.3, now with 0.250.1 it complains with [error]Error: Input required: kubernetesCluster

Starting: Helm dependency update
==============================================================================
Task         : Package and deploy Helm charts
Description  : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running helm commands
Version      : 0.250.1
Author       : Microsoft Corporation
Help         : https://aka.ms/azpipes-helm-tsg
==============================================================================
##[error]Error: Input required: kubernetesCluster
Finishing: Helm dependency update

The usage in our case. connectionType: 'Kubernetes Service Connection' was added to fix it.

- task: HelmDeploy@0
  displayName: Helm dependency update
  name: helm_dependency_update
  inputs:
    command: dependency
    #connectionType: 'Kubernetes Service Connection'
    kubernetesServiceConnection: ${{ parameters.kubernetesServiceConnection }}
    arguments: 'update $(Build.SourcesDirectory)/${{ parameters.helmChartPath }}'

@v-schhabra
Copy link
Contributor

Hi @DRoppelt
Could you please share the complete pipeline logs by setting the variable system.debug to true?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Release bug regression This used to work, but a change in the service/tasks broke it. triage
Projects
None yet
Development

No branches or pull requests

5 participants