Skip to content

Conversation

shinny-taojiachun
Copy link
Collaborator

@shinny-taojiachun shinny-taojiachun commented Aug 14, 2024

背景

腾讯云的clb监听器api无法消除已经配置的健康检查,经过客服确认只能通过重建进行消除

方案

使用CustomizeDiff判断健康检查相关项变为空后触发ForceNew

Summary by CodeRabbit

  • 新功能
    • 引入了健康检查参数的自定义差异检查,确保在修改关键健康检查配置时,资源会被强制重新创建以维护配置的完整性。
  • 改进
    • 更新GitHub Actions工作流配置,锁定GoReleaser的版本为1.26.2,以提高发布过程的稳定性和可预测性。

Copy link

coderabbitai bot commented Aug 14, 2024

Walkthrough
## Walkthrough
此次修改在 `resourceTencentCloudClbListener` 函数中引入了一个新的 `CustomizeDiff` 函数,旨在增强对健康检查参数的处理逻辑。该函数检查一组健康检查键的值,如果发现任一键为 `nil`,将强制创建新资源。这一改进确保在关键健康检查参数被修改时,基础设施能够正确更新,避免潜在的配置错误。同时,GitHub Actions 的工作流文件锁定了 GoReleaser 的版本,以提高发布过程的稳定性和可预测性。

## Changes

| 文件                                   | 变更摘要                                          |
|--------------------------------------|-------------------------------------------------|
| tencentcloud/resource_tc_clb_listener.go, .github/workflows/shinny_release.yml | 添加了 `CustomizeDiff` 函数以增强健康检查参数的处理逻辑,同时将 GoReleaser 的版本从 `latest` 更新为 `1.26.2` 提升发布稳定性。 |

## Poem
> 🐰 在云端跳跃,健康检查新变革,  
> 参数变更,资源重新构建。  
> 代码如歌,逻辑如舞,  
> 配置安全,兔子心欢愉!  
> 🌟 让我们庆祝,今日之美好!

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 07a6818 and 2febfcc.

Files selected for processing (1)
  • tencentcloud/resource_tc_clb_listener.go (1 hunks)
Additional context used
GitHub Check: golangci-lint
tencentcloud/resource_tc_clb_listener.go

[failure] 389-389:
Error return value of d.ForceNew is not checked (errcheck)

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2febfcc and 0efd403.

Files selected for processing (1)
  • tencentcloud/resource_tc_clb_listener.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • tencentcloud/resource_tc_clb_listener.go

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0efd403 and ddcf8f5.

Files selected for processing (1)
  • .github/workflows/shinny_release.yml (1 hunks)
Additional comments not posted (1)
.github/workflows/shinny_release.yml (1)

43-43: 锁定 GoReleaser 版本为 1.26.2

将 GoReleaser 版本从 latest 更新为 1.26.2 提高了稳定性和可预测性,避免了因使用最新版本可能引入的意外行为。请确保此版本与工作流的其他部分兼容。

@shinny-taojiachun shinny-taojiachun force-pushed the fix-clb-healthcheck branch 2 times, most recently from a7bf2cb to 5e86adc Compare August 14, 2024 06:26
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between ddcf8f5 and 5e86adc.

Files selected for processing (2)
  • .github/workflows/shinny_release.yml (1 hunks)
  • tencentcloud/resource_tc_clb_listener.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/shinny_release.yml
  • tencentcloud/resource_tc_clb_listener.go

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5e86adc and 4391e77.

Files selected for processing (2)
  • .github/workflows/shinny_release.yml (1 hunks)
  • tencentcloud/resource_tc_clb_listener.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/shinny_release.yml
  • tencentcloud/resource_tc_clb_listener.go

@shinny-taojiachun
Copy link
Collaborator Author

image
image
经测试可以正确forcenew

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 4391e77 and c4298b4.

Files selected for processing (2)
  • .github/workflows/shinny_release.yml (1 hunks)
  • tencentcloud/resource_tc_clb_listener.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/shinny_release.yml
  • tencentcloud/resource_tc_clb_listener.go

@shinny-taojiachun
Copy link
Collaborator Author

image
部署后不再有drift

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between c4298b4 and fdc94a0.

Files selected for processing (2)
  • .github/workflows/shinny_release.yml (1 hunks)
  • tencentcloud/resource_tc_clb_listener.go (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/shinny_release.yml
  • tencentcloud/resource_tc_clb_listener.go

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between fdc94a0 and 286b9cd.

Files selected for processing (2)
  • .github/workflows/shinny_release.yml (1 hunks)
  • tencentcloud/resource_tc_clb_listener.go (1 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/shinny_release.yml
Files skipped from review as they are similar to previous changes (1)
  • tencentcloud/resource_tc_clb_listener.go

@shinny-taojiachun
Copy link
Collaborator Author

@shinny-taojiachun shinny-taojiachun merged commit 8f22168 into master Sep 4, 2024
7 checks passed
@shinny-taojiachun shinny-taojiachun deleted the fix-clb-healthcheck branch September 4, 2024 10:05
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