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

feat(redis): expose logging configuration #850

Merged
merged 4 commits into from
Mar 30, 2023

Conversation

pivotal-marcela-campo
Copy link
Member

@pivotal-marcela-campo pivotal-marcela-campo commented Mar 29, 2023

slow logs and engine logs can be sent to cloudwatch

#184471699

Checklist:

Copy link
Member

@blgm blgm left a comment

Choose a reason for hiding this comment

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

Happy for this to be merged, but I would suggest improving the initialisation of values in the Terraform tests to avoid unexpected issues: https://onsi.github.io/ginkgo/#avoid-spec-pollution-dont-initialize-variables-in-container-nodes

Another thought is that I don't think you necessarily get much value from a test that does:

Context("...", Ordered, func(){
  BeforeAll(func(){
    ...setup
  })

  It("test1",func(){
   ...
  })

  It("test2",func() {
    ...
  })
})

Over:

It("...",func() {
  ..setup

  By("step 1")
  ....

  By("step 2")
  ...
})

I wonder if these tests would be simpler to read and maintain if written in the latter style.

})

Context("engine_log loggroup configuration", func() {
kmsKeyId := ""
Copy link
Member

Choose a reason for hiding this comment

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

Because this is an ordered test, setting values outside of a BeforeEach() works, but I'd strongly recommend against it because the test starting on line 381 has:

"retention_in_days": BeNumerically("==", retentionInDays),

If another piece of code were to update the value of retentionInDays then the test would continue to pass, but it would not be testing what you think it's testing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixing this

@pivotal-marcela-campo pivotal-marcela-campo merged commit 434e9b4 into main Mar 30, 2023
@pivotal-marcela-campo pivotal-marcela-campo deleted the expose_logging_184471699 branch April 3, 2023 15:01
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