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 merging annotations when ending the event #9

Open
olmoch opened this issue Feb 7, 2022 · 0 comments
Open

Error merging annotations when ending the event #9

olmoch opened this issue Feb 7, 2022 · 0 comments

Comments

@olmoch
Copy link

olmoch commented Feb 7, 2022

Hello! We are having an issue updating the severity annotation. We have essentially the following pipeline, configured to start an event when the job starts running and end it after an upgrade with Helm:

jobs:
- name: deploy
  plan:
  - in_parallel:
      steps:
      - put: observability
        params:
          action: start
          event_name: Deployment started
          annotations:
            severity: INFO
      - get: configuration
        trigger: true
  - params:
      chart: application-chart
      values: configuration/values.yaml
    put: helm-qapter-vi-dev
    on_success:
      put: observability
      params:
        action: end
        event: observability
        annotations:
          severity: SUCCESS

We want to modify the severity after the Helm process is finished (to set it to SUCCESS or WARN depending on the on_success or on_failure, for example). But when it runs it returns

2022/02/07 11:57:43 could not complete API call: error merging new annotations with existing annotations: could not retrieve required annotations field: /response/annotations at part 0: couldn't find key "response"

Looking at the code, it seems it is reading the /response/annotations path of the event, which makes sense for an http response of this type, but in this case the event.json is being read directly from the file saved by the in step, which already saves only the response from the body. Therefore it looks like there is an extra /response that is causing the error to appear.

Could someone take a look at this? It seems that removing the additional /response could be enough to solve it, but I'm not sure if this could break something else, and I don't know enough Go to redo the tests that could break. Thanks!

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