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

Feature request: collapse old estimation comments based on the job that created it #114

Open
raits opened this issue Feb 3, 2025 · 2 comments

Comments

@raits
Copy link

raits commented Feb 3, 2025

Background

Currently, it seems that every job that leaves its PR comment with the display-results task will collapse all previous such comments even if they are from a different job in the same workflow run.

This means that to see the results of the various jobs, you need to go through and review the old estimates. For example: nordic-institute/X-Road#2572

Perhaps this is already possible, but I have not found a way to configure the tasks so that they would only affect the comments for previous runs of the same job and not the comments left by other jobs of the same workflow run.

Request

Improve the comment collapsing function to account for the job in the workflow that created it. Perhaps this could be achieved by checking for the label used?

@ArneTR
Copy link
Member

ArneTR commented Feb 5, 2025

Hey @raits,

thanks for bringing this up!

Indeed this is the current default behaviour and we keep only one comment open. I agree that this can be optimized. Currently there is no setting to alter this behaviour.

The question is: What would be the least noisy and most complexity-proof solution.

I imagine that when you have a run with 10 jobs or even 100 jobs Eco-CI would anyway be way too noise to still keep this information inside of a PR.
This is a actually one of the reasons we lately push some of the overview functionality rather to the web view than having it inline in GitHub.

I understand that for 3 jobs as in your case having them all un-collapsed is still a viable option. However when we touch this feature it would be nice to have a solution that would work even for more complex cases.

Do you have maybe some ideas that would work also for you given the asusmptions your job is more complex?

  • Would it be acceptable to display all data in the initial comment only and re-write this comment everytime a new commit on the PR is made?
  • Would it be acceptable to remove the PR-comment feature entirely and only use the web service?
  • Would it be acceptable to post n-comments no matter how many jobs your run has?
  • Would it be acceptable to display the data only in the job run, as it is done atm? (See https://github.com/nordic-institute/X-Road/actions/runs/13130428507)

For us it would be particular interesing how you use the Pr comment display and how you compare data. We personally only use the web service and very rarely the comments in the PR as we have so many pipelines we monitor anyway.
However we still want to have the option to use Eco-CI without the web service even if you can also host that fully yourself with no strings attached ...

@raits
Copy link
Author

raits commented Feb 5, 2025

Hey @ArneTR,

Thank you for the clarification and expanding on some possible ideas. We discussed this internally a bit more as well. After looking at the web UI further, we also concluded that it is likely the more useful view for us to understand our usage.

We would still love to have an up-to-date PR comment as well, that could include the totals badges and direct the user to the Web UI. The comment is really mostly so that the consumption can be in clear view and something that external contributors could also readily find. I believe this is currently also not something that we could configure as the output depends on the job that the task is called from?

Given that, probably the first or third option from the would be the best for our use-case. An additional option could be:

  • Add an option to show a total consumption comment as part of one of the jobs with the badges and web UI link. Since the badges are images from the web UI, it probably does not matter which workflow job creates the comment as it will always show the latest information.

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

2 participants