Skip to content

Unable to follow the argo CD integrations for deploy events #362

@rocktavious

Description

@rocktavious

A customer using the ArgoCD deploy instructions - https://docs.opslevel.com/docs/argocd - was getting a very strange error

{"status":422,"error":"Unprocessable Entity"}

Running the same command locally (must use -f . for it to not hang)

opslevel create deploy -i "https://app.opslevel.com/integrations/deploy/XXXXXX" -s "report_deploy_github_action" -f .

nets the response

Successfully registered deploy event for 'my_service_alias'

But we were able to reproduce it using a job in k8s

apiVersion: batch/v1
kind: Job
metadata:
  name: report-deploy
spec:
  template:
    spec:
      containers:
        - name: main
          image: public.ecr.aws/opslevel/cli:v2024.10.11
          command:
            - "opslevel"
            - "create"
            - "deploy"
            - "-i"
            - "${OPSLEVEL_INTEGRATION_URL}"
            - "-s"
            - "my_service_alias"
          env:
            - name: OPSLEVEL_INTEGRATION_URL
              value: "https://app.opslevel.com/integrations/deploy/XXXXXXXXXXX"
      restartPolicy: Never
  backoffLimit: 2

The above will produce the error

 {"status":422,"error":"Unprocessable Entity"}

BUT EVEN MORE BEWILDERING if we remove the -i flag from the invocation it works

apiVersion: batch/v1
kind: Job
metadata:
  name: report-deploy
spec:
  template:
    spec:
      containers:
        - name: main
          image: public.ecr.aws/opslevel/cli:v2024.10.11
          command:
            - "opslevel"
            - "create"
            - "deploy"
            - "-s"
            - "my_service_alias"
          env:
            - name: OPSLEVEL_INTEGRATION_URL
              value: "https://app.opslevel.com/integrations/deploy/XXXXXXXXXXX"
      restartPolicy: Never
  backoffLimit: 2

nets the response

Successfully registered deploy event for 'my_service_alias'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions