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

Error "Empty identifier values are not supported" when creating a pipeline #710

Open
jasonestell opened this issue Oct 16, 2023 · 0 comments

Comments

@jasonestell
Copy link

Terraform Version

1.3.9

Harness provider version

0.28.2

Affected Resource(s)

Please list the resources as a list, for example:

  • harness_platform_pipeline

Terraform Configuration Files

resource "harness_platform_pipeline" "test" {
  identifier = "testapp"
  org_id     = "test"
  project_id = "test"
  name       = "test_app"

  yaml = <<-EOT
pipeline:
  name: test_app
  identifier: testapp
  projectIdentifier: test
  orgIdentifier: test
  tags: {}
  stages:
    - stage:
        name: Rollout App Deployment ci test_app
        identifier: RolloutAppDeploymentcitestapp
        description: "Deploy app, service or api"
        type: Deployment
        spec:
          deploymentType: Kubernetes
          service:
            serviceRef: test_app
            serviceInputs:
              serviceDefinition:
                type: Kubernetes
                spec:
                  artifacts:
                    primary:
                      primaryArtifactRef: test_app
          environment:
            environmentRef: test_ci
            deployToAll: false
            infrastructureDefinitions:
              - identifier: ci_kubernetes
          execution:
            steps:
              - step:
                  name: Rollout App Deployment ci test_app_deploy
                  identifier: RolloutAppDeploymentcitestappdeploy
                  type: K8sRollingDeploy
                  timeout: 10m
                  spec:
                    skipDryRun: false
                    pruningEnabled: false
            rollbackSteps: 
              - step:
                  name: Rollback Rollout Deployment
                  identifier: rollbackRolloutDeployment
                  type: K8sRollingRollback
                  timeout: 10m
                  spec:
                    pruningEnabled: false
        tags: {}
        failureStrategies:
          - onFailure:
              errors:
                - AllErrors
              action:
                type: StageRollback
EOT
}

Expected Behavior

Should get a better message or succeed. Not sure how this one should be handled. I think optimally if you are using INLINE with REMOTE default you should be required to add the git_details block and set to INLINE so people realize and acknowledge the difference, but that would have to start with a error message that details the difference.

Actual Behavior

Got ambiguous error message an nothing in trace or anywhere giving information.

Steps to Reproduce

  1. Setup harness Default Settings > Git Experience > "Default Storage Type for Entities- pipelines/InputSets/Templates" = REMOTE
  2. terraform apply

Important Factoids

This is an edge case bug, where if Git Experience is setup as REMOTE, but you do not supply git_details block. Adding git_details = {} is enough to work around the issue. Our configuration was wrong and REMOTE was set incorrectly. Others might have that problem or might be using REMOTE as default but still want to setup a few INLINE pipelines which is probably not expected. Either way an appropriate error should be given so the user can determine the issue.

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

No branches or pull requests

1 participant