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

Fix, test, and document behavior for configuration loading #26

Open
14 of 17 tasks
neongreen opened this issue Sep 26, 2019 · 16 comments
Open
14 of 17 tasks

Fix, test, and document behavior for configuration loading #26

neongreen opened this issue Sep 26, 2019 · 16 comments
Assignees

Comments

@neongreen
Copy link
Contributor

neongreen commented Sep 26, 2019

  • What happens if at startup, one rule (out of several) in one domain (out of several) can't be parsed?
  • Same, but during config reloading, not during startup.
  • What happens when configuration contains duplicate domains?
  • What happens when a domain contains duplicate rules?
  • What happens with YAML files containing several documents?
  • What is the minimal accepted configuration file? Is it the same for Fencer and for lyft/ratelimit?

Also:

Also:

  • When lyft/ratelimit finds no configs in the dir, it responds to requests with OK.
  • When lyft/ratelimit doesn't find the dir symlink, it responds to requests with OK.
  • (partly done in Fix behavior for "rules not loaded" and add an integration test #35, not tested properly, not documented) When lyft/ratelimit finds the config dir but even one file is corrupted (broken YAML or correct YAML but broken field names), it responds to requests with ERROR.
  • When lyft/ratelimit can't read a file (e.g. chmod 0-ed), other files are loaded correctly and it responds to requests with OK.

And more:

  • Q: What happens to symlinks to files outside the config dir?
    A: I checked and they are loaded just fine.
  • Q: Symlinks to directories outside the config dir?
    A: They are not followed.
  • Q: Symlink cycles?
    A: They are detected ("Too many levels of symbolic links") and other files are loaded correctly.
@neongreen
Copy link
Contributor Author

"What happens" might also include "lyft/ratelimit keeps working, but replies to all requests with ERROR".

@neongreen neongreen changed the title Clarify, test, and document behavior for configuration loading Fix, test, and document behavior for configuration loading Sep 27, 2019
@neongreen neongreen self-assigned this Sep 30, 2019
@mdimjasevic mdimjasevic self-assigned this Oct 23, 2019
@mdimjasevic
Copy link
Contributor

I'm taking the first question: What happens if at startup, one rule (out of several) in one domain (out of several) can't be parsed?

mdimjasevic pushed a commit that referenced this issue Oct 28, 2019
mdimjasevic pushed a commit that referenced this issue Oct 28, 2019
mdimjasevic pushed a commit that referenced this issue Oct 29, 2019
@mdimjasevic
Copy link
Contributor

I'm taking "What happens with YAML files containing several documents?".

@mdimjasevic
Copy link
Contributor

Now I'm taking "What is the minimal accepted configuration file? Is it the same for Fencer and for lyft/ratelimit?"

mdimjasevic pushed a commit that referenced this issue Oct 30, 2019
* Fix how dot-directories are handled wrt RUNTIME_IGNOREDOTFILES
* Add a test for rule loading from a dot-directory
* Expand the documentation for the loadRulesFromDirectory function
@mdimjasevic
Copy link
Contributor

@neongreen, what should I do with your questions in the "And more" section that have both a question and an answer?

mdimjasevic pushed a commit that referenced this issue Nov 21, 2019
mdimjasevic pushed a commit that referenced this issue Nov 21, 2019
mdimjasevic pushed a commit that referenced this issue Nov 22, 2019
mdimjasevic pushed a commit that referenced this issue Nov 25, 2019
…ons (#102)

* Add a rule test for a file without read permissions
* Add a server test for a file without read permissions
* Reorganize the `Fencer.Rules.Test` module
* Better handle read permissions
mdimjasevic pushed a commit that referenced this issue Nov 26, 2019
mdimjasevic pushed a commit that referenced this issue Nov 26, 2019
* Support is already here, just add documentation in the code
mdimjasevic pushed a commit that referenced this issue Nov 26, 2019
mdimjasevic pushed a commit that referenced this issue Nov 26, 2019
…und (#106)

* Introduce a server test for the case when there is no configuration
@mdimjasevic
Copy link
Contributor

@neongreen, what should I do with your questions in the "And more" section that have both a question and an answer?

@neongreen, just a gentle reminder about this question.

@mdimjasevic
Copy link
Contributor

@neongreen, this is a yet another reminder about the question above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants