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

RFC: Allow verify trace-protobuf to continue on error #275

Merged
merged 3 commits into from
Oct 27, 2023

Conversation

ivoanjo
Copy link
Member

@ivoanjo ivoanjo commented Oct 25, 2023

What does this PR do?

This PR changes the "Verify trace-protobuf" github action to include "continue-on-error", so that unrelated PRs don't get marked as having failed CI when this action triggers.

Additionally, it makes use of the
mainmatter/continue-on-error-comment@v1 action to turn these errors into a comment that gets added into the PR, so that we don't miss that this action failed -- we just make failures less noisy.

Motivation:

I like having a green CI, and it's annoying to have a red CI because this action failed, since for many libdatadog PRs we don't care (e.g. this only impacts the serverless agent).

Thus, I decided to experiment with this alternative approach. As the PR title says -- comments welcome! Do you think this is reasonable?

Additional Notes:

N/A

How to test the change?

I'm hoping the action will start triggering for this PR itself, so we can see it running.

For Reviewers

  • If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.

**What does this PR do?**

This PR changes the "Verify trace-protobuf" github action to include
"continue-on-error", so that unrelated PRs don't get marked as having
failed CI when this action triggers.

Additionally, it makes use of the
`mainmatter/continue-on-error-comment@v1` action to turn these
errors into a comment that gets added into the PR, so that we don't
miss that this action failed -- we just make failures less noisy.

**Motivation:**

I like having a green CI, and it's annoying to have a red CI because
this action failed, since for many libdatadog PRs we don't care
(e.g. this only impacts the serverless agent).

Thus, I decided to experiment with this alternative approach. As the
PR title says -- comments welcome! Do you think this is reasonable?

**Additional Notes:**

N/A

**How to test the change?**

I'm hoping the action will start triggering for this PR itself, so
we can see it running.
@ivoanjo ivoanjo requested a review from a team as a code owner October 25, 2023 09:10
@paullegranddc
Copy link
Contributor

It looks like the Verify trace-protobuf tests didn't run for this PR. Is this expected?

Copy link
Contributor

@paullegranddc paullegranddc left a comment

Choose a reason for hiding this comment

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

@paullegranddc
Copy link
Contributor

I added the action with the specific hash in this PR here https://github.com/DataDog/libdatadog/settings/actions

@ivoanjo
Copy link
Member Author

ivoanjo commented Oct 25, 2023

Ahh, thanks for spotting that -- I had added with the v1 tag and forgot that to make it match with the hash.

@ivoanjo
Copy link
Member Author

ivoanjo commented Oct 25, 2023

It seems it has run now -- but doesn't output anything because it only runs on new PRs, not on branch updates ( https://github.com/DataDog/libdatadog/actions/runs/6642718147/job/18048114414?pr=275 ).

My suggestion is: Let's merge this in, and then right after I can open a tiny PR with a dummy fix to verify it's working fine. If it is, it stays, if not, I'll open a PR to revert it (or tweak it, if needed).

@ivoanjo ivoanjo merged commit 8cbc9db into main Oct 27, 2023
20 checks passed
ivoanjo added a commit that referenced this pull request Oct 27, 2023
ivoanjo added a commit that referenced this pull request Oct 27, 2023
**What does this PR do?**

In #275, I've attempted to add the
`mainmatter/continue-on-error-comment` github action which replaces a CI
error with a comment, so that it's less annoying when
"Verify trace-protobuf" fails and we don't get a ugly red cross on every
PR.

My first attempt didn't work! I missed that I needed to change the
trigger for the verify action to be on pull requests, not on pushes.

This PR fixes that, and we should see the action comment show up
as an example.

**Motivation:**

Fix #275.

**Additional Notes:**

N/A

**How to test the change?**

See the comment that will show up!
@ivoanjo
Copy link
Member Author

ivoanjo commented Oct 27, 2023

Update: Almost got it! #280 has a tiny fix and otherwise this seems to work fine.

@ivoanjo ivoanjo deleted the ivoanjo/allow-verify-proto-files-to-fail branch October 27, 2023 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants