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

Issue #26: Check behavior in presence of duplicate rules #104

Merged
merged 45 commits into from
Nov 26, 2019

Conversation

mdimjasevic
Copy link
Contributor

This patch answers the following question from issue #26: "What happens when a domain contains duplicate rules?"

When Ratelimit is run on a configuration that has a domain key repeated, it logs an error message such as:

ERRO[0000] error loading new configuration from runtime: config.another.yaml: duplicate descriptor composite key 'another.key2'

It loads no definitions and consequently responds with the following when it receives a request:

ERROR:
  Code: Unknown
  Message: no rate limit configuration loaded

This PR updates Fencer to match this behavior.

Note that this PR started off from the mdimjasevic/26-duplicate-domain branch, which has a PR #103, which in turn depends on a PR #102. Therefore, please review the dependency chain first.

@mdimjasevic mdimjasevic self-assigned this Nov 14, 2019
@mdimjasevic mdimjasevic changed the title Issue #26: check behavior in presence of duplicate rules Issue #26: Check behavior in presence of duplicate rules Nov 14, 2019
Marko Dimjašević added 2 commits November 21, 2019 09:51
@mdimjasevic mdimjasevic merged commit 6068fb8 into master Nov 26, 2019
@mdimjasevic mdimjasevic deleted the mdimjasevic/26-duplicate-rules branch November 26, 2019 06:37
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.

3 participants