-
Notifications
You must be signed in to change notification settings - Fork 185
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
integration: Publish aggregate test report summary #2453
Conversation
That looks great. Will the web page display all previous tests or only the last few ones? If it displays everything, that would be a lot of columns over time, and make it difficult to read. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks really great. I don't have so many comments, besides Alban's comment above I don't have anything to add. I think we should we the last N runs, N == 100?, and that's it.
- test-integration-k8s-ig | ||
- test-integration-non-k8s-ig | ||
runs-on: ubuntu-latest | ||
# Skip this job when running on a fork or a PR from a fork. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to skip when running from a fork?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The secrets.TEST_REPORTS_TOKEN
won't be available for external folks PRs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot you modify this to test that the secret is present?
Like what we already do here:
check-secrets: |
if: needs.check-secrets.outputs.aks == 'true' |
💯
I currently limit it to last 10 only. We can change this value in ig-test-reports later on as well. |
8297a45
to
c096736
Compare
Should we limit the size of the json somehow? I suppose it'll become to big and difficult to handle very soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi!
I understand the need to store our CI results on the long term and in an easy way to parse.
But I am wondering if this our goal of that of the platform where we run the CI, i.e. GitHub. So, do they provide something like this?
Also, with regard to the code itself, you make a parallel with benchmarks
which has been really flaky recently...
If possible, I would like to avoid adding other flaky tests in our CI as it just decreases the reliability over time.
I understand this is indeed complicated to guess whether something will be flaky but the retry
function does not really lead me to the path where I think this will not be flaky.
Moreover, I am wondering if this is not something which should be written in javascript rather than bash, particularly given the amount of lines.
Best regards.
local n=1 | ||
local max=10 | ||
local delay=15 | ||
while true; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose you can use a for
here.
- test-integration-k8s-ig | ||
- test-integration-non-k8s-ig | ||
runs-on: ubuntu-latest | ||
# Skip this job when running on a fork or a PR from a fork. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot you modify this to test that the secret is present?
Like what we already do here:
check-secrets: |
if: needs.check-secrets.outputs.aks == 'true' |
- name: Store test reports | ||
shell: bash {0} | ||
run: | | ||
function retry { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need this whole retry
function?
I am generally not a big fan of this type of code as it often goes along flakiness.
c096736
to
5a3d738
Compare
Great catch! I adjusted to only store last 100 results. I believe we should be fine with that but if that will be too much we can decrease this in future. |
I think the logic introduced in the retry function is a good enough effort to avoid this job failing when other instances of it run on parallel on different PRs. Perhaps we can also use a concurrency group (https://docs.github.com/en/actions/using-jobs/using-concurrency) to avoid multiple instances of this job running on parallel and reduce the change of a collision? |
I would have really hoped GitHub to have something for this but I don't see any signs of that happening. I saw there are custom runners and perhaps other platform offering this but that sounds more complicated to me.
The issue with benchmarks was recently fixed so the idea was to see if we can handle the things in similar way to avoid issues in first place.
Which part are we talking about? like still store the data but have a bash script render it? I personally think a web page is simpler approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's looking very good. What do you think about moving the script to a different file? I think that would help to edit it easier (highlight syntax and other stuff will help too).
Also, I can approve it now if you want to merge as it is. I saw the result and it's very nice, we can always improve it later on if needed. It's up to you how much you want to improve it before merging.
name: "test-reports" | ||
- name: Store test reports | ||
shell: bash {0} | ||
run: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps move this to something under https://github.com/inspektor-gadget/inspektor-gadget/tree/main/tools to avoid adding more lines to this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! I will do it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I also thought about this but the reason I decided against it since it only allows single job in pending state?
|
So in that case we'll missing the entry for the skipped job in the results? |
5a3d738
to
695dbce
Compare
Signed-off-by: Qasim Sarfraz <qasimsarfraz@microsoft.com>
695dbce
to
8097a20
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for working on this!
You made me doubt, but there is still an issue with benchmarks: |
You made me doubt, but there is still an issue with benchmarks: |
The error does look different but I see the point. But I don't think we should block this change on it. I can keep a close on eye on next few builds after we merge this change and would be happy to switch to other approaches (e.g concurrency group) if they are more stable even with less coverage. Flaky CI is the last thing I want 😄 |
I will merge this and keep a close eye on flakiness. Hopefully we will be able to identity failures faster! |
Currently, getting overview of test failures in the CI can be challenging. This change addresses that by extending the work we did for summaries and enhances that by storing them to a GitHub page.
It took inspiration from the
ig-benchmarks
and commits the reports on each change. Similarly, usesretry
to avoid running into multiplegit push
issue.Testing Done
Reports: https://inspektor-gadget.github.io/ig-test-reports/