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

CI Stages #24

Merged
merged 31 commits into from
Dec 8, 2023
Merged

Conversation

RodrigoMNardi
Copy link
Collaborator

@RodrigoMNardi RodrigoMNardi commented Nov 8, 2023

In this PR, two new Checks will be introduced, which would be Build Stage and Tests Stages. They will be created at the beginning of the NetDEF CI action and will be updated throughout execution and containing a execution summary.

Therefore, it will not be possible to merge PRs when problems occur in Bamboo CI like this: https://ci1.netdef.org/browse/FRR-PULLREQ3-589

Adding two stages to prevent PRs from being approved without having the necessary execution.

Signed-off-by: Rodrigo Nardi <[email protected]>
Loading base libs

Signed-off-by: Rodrigo Nardi <[email protected]>
Correction in the logic for updating stages for
retry in the GitHub interface.
Improvement in the transition of stage states.

Signed-off-by: Rodrigo Nardi <[email protected]>
Fixing string literal

Signed-off-by: Rodrigo Nardi <[email protected]>
@RodrigoMNardi
Copy link
Collaborator Author

This would be the Checks initial state:
image

Example of execution that failed the build:
image

Build Stage details, unfortunately I could not retrieve the error message from Bamboo API.
image

Execution in progress example:
image

Tests Stage summary:
image

Sometimes, it does not update the check ID
and as a result we are unable to update the status.

Signed-off-by: Rodrigo Nardi <[email protected]>
Using Build::Summary logic to update Stages

Signed-off-by: Rodrigo Nardi <[email protected]>
Using instance variable instead local variable

Signed-off-by: Rodrigo Nardi <[email protected]>
Fixing minor issues

Signed-off-by: Rodrigo Nardi <[email protected]>
Fixing unit tests

Signed-off-by: Rodrigo Nardi <[email protected]>
Fixing double enqueue error

Signed-off-by: Rodrigo Nardi <[email protected]>
Added method parameter

Signed-off-by: Rodrigo Nardi <[email protected]>
Copy link
Member

@qlyoung qlyoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this line:

Therefore, it will not be possible to merge PRs when problems occur in Bamboo CI like this: https://ci1.netdef.org/browse/FRR-PULLREQ3-DEB10BUILD-589

I navigated to that linked build and I don't see what the problem with it is.

Otherwise I agree with the setup proposed here.

@RodrigoMNardi
Copy link
Collaborator Author

I don't understand this line:

Therefore, it will not be possible to merge PRs when problems occur in Bamboo CI like this: https://ci1.netdef.org/browse/FRR-PULLREQ3-DEB10BUILD-589

I navigated to that linked build and I don't see what the problem with it is.

Otherwise I agree with the setup proposed here.

This execution had hung during the Basic Tests Stage and no entry in GitHub checks had been created and people wanted to have approved the PR, without having run topotests.

RodrigoMNardi and others added 13 commits November 17, 2023 17:09
# Conflicts:
#	lib/github/check.rb
#	spec/factories/ci_job.rb
# Conflicts:
#	lib/github/update_status.rb
#	lib/models/check_suite.rb
#	workers/watch_dog.rb
In this commit we will modify the CI to have only 3 entries: Linter, Build and Tests.

This will improve CI visibility and avoid issues of undue merges due to failures in CI execution.

Signed-off-by: Rodrigo Nardi <[email protected]>
Fixing minor issues

Signed-off-by: Rodrigo Nardi <[email protected]>
Download build logs to upload to CI

Signed-off-by: Rodrigo Nardi <[email protected]>
Fixing stub_request

Signed-off-by: Rodrigo Nardi <[email protected]>
# Conflicts:
#	bin/console.rb
#	lib/github/build_plan.rb
#	lib/github/check.rb
#	lib/github/re_run/base.rb
#	lib/github/retry.rb
#	lib/github/update_status.rb
#	lib/models/ci_job.rb
#	spec/lib/github/update_status_spec.rb
Merging with master

Signed-off-by: Rodrigo Nardi <[email protected]>
Fixing rubocop issue

Signed-off-by: Rodrigo Nardi <[email protected]>
Fixing minor issues

Signed-off-by: Rodrigo Nardi <[email protected]>
Adding the new classes

Signed-off-by: Rodrigo Nardi <[email protected]>
Fixing code lint issues

Signed-off-by: Rodrigo Nardi <[email protected]>
RodrigoMNardi and others added 7 commits December 7, 2023 22:40
Updating factory

Signed-off-by: Rodrigo Nardi <[email protected]>
Creating a better output

Signed-off-by: Rodrigo Nardi <[email protected]>
Setting new names from stages

Signed-off-by: Rodrigo Nardi <[email protected]>
Fixing code lint

Signed-off-by: Rodrigo Nardi <[email protected]>
Changing display name

Signed-off-by: Rodrigo Nardi <[email protected]>
@RodrigoMNardi RodrigoMNardi merged commit 37b18a9 into FRRouting:master Dec 8, 2023
2 checks passed
@RodrigoMNardi RodrigoMNardi deleted the bug/ci_summary_check branch June 27, 2024 16:53
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

Successfully merging this pull request may close these issues.

2 participants