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

Inheritance methods of Metadata is not intuitive #3125

Open
yakanechi opened this issue May 29, 2024 · 2 comments
Open

Inheritance methods of Metadata is not intuitive #3125

yakanechi opened this issue May 29, 2024 · 2 comments

Comments

@yakanechi
Copy link
Contributor

What happened:
If there are multiple trigger sources for the current metadata, the value of the job that completed first takes precedence.
In the following example, the value is set in job1 and then reset in job3, but job2 is completed before job3, so the value of x is 1 in job4.
It seems strange that values set later are not used.

What you expected to happen:
Consider adding a timestamp-like feature for each metadata, with the newly added ones taking precedence.

How to reproduce it:

jobs:
  Job1:
    requires: [ ~commit ]
    steps:
      - meta set x "1"

  Job2:
    requires: [ ~Job1 ]
    steps:
      - echo "nothing"

  Job3:
    requires: [ ~Job1 ]
    steps:
      - sleep 60
      - meta set x "2"

  Job4:
    requires: [ Job2, Job3 ]
    steps:
      - echo $(meta get x)

@VonnyJap
Copy link
Member

@sagar1312 @tkyi - do you guys have any thoughts on how to solve this issue? Basically this looks like a bug, x should be seen as 2 in Job4, but users are seeing the old value 1 returned.

@yakanechi yakanechi changed the title Add features such as timestamps to Metadata Inheritance methods of Metadata is not intuitive May 31, 2024
@tkyi
Copy link
Member

tkyi commented Jul 11, 2024

Yeah that sounds like a bug. Should be the more recently finished build that takes precedence.

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

3 participants