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

Revert /lgtm command #5718

Merged
merged 2 commits into from
Jun 14, 2023
Merged

Revert /lgtm command #5718

merged 2 commits into from
Jun 14, 2023

Conversation

youngbupark
Copy link

@youngbupark youngbupark commented Jun 14, 2023

Description

/lgtm will not work since it always uses bot username as a approval.

Issue reference

Fixes: #issue_number

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Adds necessary unit tests for change
  • Adds necessary E2E tests for change
  • Unit tests passing
  • Extended the documentation / Created issue for it

Auto-generated summary

🤖 Generated by Copilot at 9abec5f

Summary

🗑️🛠️🚫

This pull request simplifies the radius-bot.js script by removing the /lgtm command and adding error handling. This avoids conflicts with the GitHub code review feature and makes the script more robust.

Sing, O Muse, of the valiant coder who dared
To alter the script of the radiant radius-bot,
Removing the /lgtm command, which once declared
The approval of changes with a swift and simple dot.

Walkthrough

  • Catch and log errors in issue comment handling ([link](https://github.com/project-radius/radius/pull/5718/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L19-R23))

@youngbupark youngbupark requested a review from a team as a code owner June 14, 2023 16:23
@github-actions
Copy link

github-actions bot commented Jun 14, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref 9abec5f
Unique ID 5aa8853933
Image tag pr-5aa8853933
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-5aa8853933
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-5aa8853933
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-5aa8853933

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp functional tests...
⌛ Starting ucp functional tests...
⌛ Starting samples functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
✅ corerp functional tests succeeded

@github-actions
Copy link

github-actions bot commented Jun 14, 2023

Radius functional test overview

🔍 Go to test action run

Name Value
Repository project-radius/radius
Commit ref 1cc4acf
Unique ID 7c4347b325
Image tag pr-7c4347b325
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.18.0
  • Dapr: 1.10.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.0.0
  • recipe location radiusdev.azurecr.io/test/functional/corerp/recipes/<name>:pr-7c4347b325
  • appcore-rp test image location: radiusdev.azurecr.io/appcore-rp:pr-7c4347b325
  • ucp test image location: radiusdev.azurecr.io/ucpd:pr-7c4347b325

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting samples functional tests...
⌛ Starting ucp functional tests...
⌛ Starting corerp functional tests...
✅ samples functional tests succeeded
✅ ucp functional tests succeeded
✅ corerp functional tests succeeded

@@ -26,7 +30,7 @@ async function handleIssueCommentCreate({ github, context }) {
const issue = context.issue;
const isFromPulls = !!payload.issue.pull_request;
const commentBody = payload.comment.body;
const username = context.actor.toLowerCase();
const username = context.actor;
Copy link
Author

Choose a reason for hiding this comment

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

lowercasing doesn't make sense.

try {
await handleIssueCommentCreate({ github, context });
} catch (error) {
console.log(`[handleIssueCommentCreate] unexpected error: ${error}`);
Copy link
Author

Choose a reason for hiding this comment

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

added try-catch here to catch unhandled exceptions.

@github-actions
Copy link

Test Results

2 699 tests  ±0   2 692 ✔️ ±0   1m 58s ⏱️ +3s
   239 suites ±0          7 💤 ±0 
       1 files   ±0          0 ±0 

Results for commit 1cc4acf. ± Comparison against base commit b8b22c7.

This pull request removes 2 and adds 2 tests. Note that renamed tests count towards both.
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/e804948d-1e66-4a22-aad6-6271f43b6656
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/e804948d-1e66-4a22-aad6-6271f43b6656#01
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/27f7c9f3-525f-4708-9cc4-05baaa9d2900
github.com/project-radius/radius/pkg/armrpc/frontend/controller ‑ TestValidateEtag_IfMatch/27f7c9f3-525f-4708-9cc4-05baaa9d2900#01

@github-actions
Copy link

63.8

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

  • Your PR branch coverage: 63.8 %
  • main branch coverage: 63.8 %
  • diff coverage: 0 %

The coverage result does not include the functional test coverage.

@youngbupark youngbupark merged commit db38c13 into main Jun 14, 2023
@youngbupark youngbupark deleted the youngp/revert-lgtm branch June 14, 2023 17:11
nithyatsu pushed a commit that referenced this pull request Jun 21, 2023
# Description

/lgtm will not work since it always uses bot username as a approval.

## Issue reference

<!--
We strive to have all PR being opened based on an issue, where the
problem or feature have been discussed prior to implementation.
-->

Fixes: #issue_number

## Checklist

Please make sure you've completed the relevant tasks for this PR, out of
the following list:

* [ ] Code compiles correctly
* [ ] Adds necessary unit tests for change
* [ ] Adds necessary E2E tests for change
* [ ] Unit tests passing
* [ ] Extended the documentation / Created issue for it

## Auto-generated summary

<!--
GitHub Copilot for docs will auto-generate a summary of the PR
-->

<!--
copilot:all
-->
### <samp>🤖 Generated by Copilot at 9abec5f</samp>

### Summary
🗑️🛠️🚫

<!--
1. 🗑️ - This emoji represents the removal or deletion of something,
which in this case is the `/lgtm` command and function. It conveys the
idea of simplifying or cleaning up the script by getting rid of unused
or unnecessary code.
2. 🛠️ - This emoji represents the fixing or improvement of something,
which in this case is the error handling for the issue comment handler.
It conveys the idea of enhancing the robustness or reliability of the
script by handling possible errors or exceptions that might occur when
processing comments.
3. 🚫 - This emoji represents the prohibition or prevention of something,
which in this case is the conflict with the GitHub code review feature.
It conveys the idea of avoiding or resolving a potential problem or
issue that might arise from having two different ways of approving pull
requests (the `/lgtm` command and the GitHub code review feature).
-->
This pull request simplifies the `radius-bot.js` script by removing the
`/lgtm` command and adding error handling. This avoids conflicts with
the GitHub code review feature and makes the script more robust.

> _Sing, O Muse, of the valiant coder who dared_
> _To alter the script of the radiant radius-bot,_
> _Removing the `/lgtm` command, which once declared_
> _The approval of changes with a swift and simple dot._

### Walkthrough
* Catch and log errors in issue comment handling
(`[link](https://github.com/project-radius/radius/pull/5718/files?diff=unified&w=0#diff-b94c0e124b5b65fb6fa8785928c5331547c124a96ecc225f93df9445a29a5109L19-R23)`)
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