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

Incomplete meta in the event #3203

Closed
sagar1312 opened this issue Sep 23, 2024 · 0 comments
Closed

Incomplete meta in the event #3203

sagar1312 opened this issue Sep 23, 2024 · 0 comments
Assignees
Milestone

Comments

@sagar1312
Copy link
Member

What happened:
Whenever a build is updated, its meta is merged with event meta. But, this merge is shallow (one level). Due to this nested meta set by previous builds of this event could be lost when the latest build meta is merged. This is more common when the builds are triggered and executed in parallel.

For Example:
Build meta

{
  "build": {
    ...
  },
  "commit": {
    ...
  },
  "event": {
    ...
  },
  "example": {
    "prod-blue-test1": 91,
    "prod-blue-test2": 92,
    "prod-blue-test3": 93,
    "prod-blue-test5": 95
  }
}

Event meta before merge

{
  "build": {
    ...
  },
  "commit": {
    ...
  },
  "event": {
    ...
  },
  "example": {
    "prod-blue-test1": 91,
    "prod-blue-test2": 92,
    "prod-blue-test3": 93,
    "prod-blue-test4": 94
  }
}

Event meta after merge

{
  "build": {
    ...
  },
  "commit": {
    ...
  },
  "event": {
    ...
  },
  "example": {
    "prod-blue-test1": 91,
    "prod-blue-test2": 92,
    "prod-blue-test3": 93,
    "prod-blue-test5": 95
  }
}

example.prod-blue-test4 is lost during the merge.

What you expected to happen:
build meta should be deep merged (recursively) into event meta.

Event meta after merge

{
  "build": {
    ...
  },
  "commit": {
    ...
  },
  "event": {
    ...
  },
  "example": {
    "prod-blue-test1": 91,
    "prod-blue-test2": 92,
    "prod-blue-test3": 93,
    "prod-blue-test4": 94,
    "prod-blue-test5": 95
  }
}

How to reproduce it:
Refer to this pipeline https://cd.screwdriver.cd/pipelines/15117/events/819320
After the event is completed, the event meta does not contain all the data set by all the individual builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant