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
Bug: Markdown Message Ordering got shuffled? #1014
Comments
Updating to |
It should be deterministic - so maybe it's just deterministically reversed. |
The problem I see is that based on the code, it’s not deterministic - otherwise I could fix this! The top entry of 3 (in code) is shuffled to the bottom (in screenshot 2) |
Ah, fair - I guess it's not unreasonable to record the order when a violation is created to ensure it's consistent on both sides. I'm pretty sure there are some tests which might fail if it's indeterminate, but it's been a while since I've looked at this codebase |
I could rewrite my code, to combine these markdown messages into one call, so I have a workaround for myself. Not sure if this is valuable to try to track down? |
Looks like it's been around while #845 - so if no-one else has also thought it important enough to work on, that's fine IMO |
Is there a possibility to fix this issue? 🙏 |
my code looks like this: function doStuff(n) {
return Promise.all([...]).then(res => {
markdown(`message ${n}`);
});
}
schedule(async () => {
await doStuff(1);
await doStuff(2);
await doStuff(3);
}); and testing locally with
while running this in github workflow, the resulting order of the markdown strings are non-deterministic. Sometimes it's in correct order, sometimes it's shuffled. ofc my real EDIT: it seems to affect not only |
You're welcome to fix it 👍 Maybe add a creation date to the Violations and then sort it at the end |
Example code:
This code hasn't been changed since 2019-03-29
Expected Rendering (from last week):
Yesterday's Rendering:
If you compare the code, to the renderings, the "Latest Build Status Pages" table is expected to be last.
It appears we're using
danger@8.0.0
-- will try updating, to see what happens.The text was updated successfully, but these errors were encountered: