Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

config/task: add check for duplicate config items (#380) #385

Merged
merged 6 commits into from
Nov 29, 2019

Conversation

sre-bot
Copy link

@sre-bot sre-bot commented Nov 29, 2019

cherry-pick #380 to release-1.0


What problem does this PR solve?

The user may add duplicate route-rules or filter-rules by mistake which will cause failure while building router or event-filter.
e.g.: route-rules: ["route-rule-1", "route-rule-1"]

What is changed and how it works?

Add check in TaskConfig.adjust and returns error if route-rules/filter-rules are duplicate.

Check List

Tests

  • Unit test
  • Integration test

Related changes

  • Need to cherry-pick to the release branch

@sre-bot sre-bot added priority/normal Minor change, requires approval from ≥1 primary reviewer needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated type/cherry-pick This PR is just a cherry-pick (backport) labels Nov 29, 2019
@csuzhangxc
Copy link
Member

/run-all-tests tidb=release-3.0

@WangXiangUSTC
Copy link
Contributor

LGTM

@WangXiangUSTC WangXiangUSTC added the status/LGT1 One reviewer already commented LGTM label Nov 29, 2019
@codecov
Copy link

codecov bot commented Nov 29, 2019

Codecov Report

Merging #385 into release-1.0 will not change coverage.
The diff coverage is n/a.

@@              Coverage Diff               @@
##           release-1.0       #385   +/-   ##
==============================================
  Coverage      57.2215%   57.2215%           
==============================================
  Files              159        159           
  Lines            16153      16153           
==============================================
  Hits              9243       9243           
  Misses            6003       6003           
  Partials           907        907

Copy link
Member

@csuzhangxc csuzhangxc left a comment

Choose a reason for hiding this comment

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

LGTM

@csuzhangxc csuzhangxc added status/LGT2 Two reviewers already commented LGTM, ready for merge and removed status/LGT1 One reviewer already commented LGTM labels Nov 29, 2019
@csuzhangxc csuzhangxc merged commit 4595068 into pingcap:release-1.0 Nov 29, 2019
@ericsyh ericsyh added this to the v1.0.3 milestone Dec 3, 2019
@csuzhangxc csuzhangxc added already-update-release-note The release note is updated. Add this label once the release note is updated and removed needs-update-release-note This PR should be added into release notes. Remove this label once the release notes are updated labels Mar 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
already-update-release-note The release note is updated. Add this label once the release note is updated priority/normal Minor change, requires approval from ≥1 primary reviewer status/LGT2 Two reviewers already commented LGTM, ready for merge type/cherry-pick This PR is just a cherry-pick (backport)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants