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(opensearch): cannot disable cluster logging #29205

Merged
merged 8 commits into from
Mar 18, 2024

Conversation

sigJoe
Copy link
Contributor

@sigJoe sigJoe commented Feb 21, 2024

Issue # (if applicable)

#29294

Reason for this change

Currently cannot disable opensearch logging

Description of changes

If log parameters are explicitly set to false rather than undefined, it populates the logPublishingOptions with config to disable that logging

Description of how you validated changes

I added unit tests, although to be honest jest is giving me lots of trouble and I'm out of time for the day so I'll just create this pR and see what happens. Fingers crossed the PR test check is clean and I can pretend I know what I'm doing.

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/medium Medium work item – several days of effort p2 labels Feb 21, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team February 21, 2024 20:42
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@sigJoe sigJoe changed the title fix(opensearch) Disable OpenSearch logging if explicitly specified fix(opensearch): Disable OpenSearch logging if explicitly specified Feb 21, 2024
@sigJoe sigJoe changed the title fix(opensearch): Disable OpenSearch logging if explicitly specified fix(opensearch): disable OpenSearch logging if explicitly specified Feb 22, 2024
@aws-cdk-automation aws-cdk-automation dismissed their stale review February 22, 2024 15:23

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@sigJoe
Copy link
Contributor Author

sigJoe commented Feb 22, 2024

Clarification Request: Please advise. I did my best before asking, but I don't understand what the PR checks are complaining about or how to fix it.

Update: I figured it out.

@aws-cdk-automation aws-cdk-automation added the pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run label Feb 22, 2024
@sigJoe sigJoe force-pushed the opensearch-allow-disable-logging branch from b14e432 to fdccd5b Compare February 26, 2024 14:30
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 26, 2024
Copy link
Contributor

@lpizzinidev lpizzinidev left a comment

Choose a reason for hiding this comment

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

Looks good 👍
There is only one file that should be removed from the PR imo.
Also, can you please update the title to describe the bug (not the solution).

tests.txt Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this file included? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I based my test on what I thought were existing patterns, and this file contained a list of all the tests so I inserted mine as well
/shrug

I'll remove it now

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Mar 2, 2024
@sigJoe sigJoe changed the title fix(opensearch): disable OpenSearch logging if explicitly specified fix(opensearch): cannot disable cluster logging Mar 4, 2024
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

Changes look good, one question in mind before approving.

tests.txt Outdated
@@ -1 +1 @@
@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-auto-delete-objects.js
@aws-cdk-testing/framework-integ/test/aws-s3/test/integ.bucket-auto-delete-objects.js
Copy link
Contributor

Choose a reason for hiding this comment

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

curious why GH is highlighting this change but they seem to be identical?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was missing a newline. Sorry about that. It's fixed now

GavinZZ
GavinZZ previously approved these changes Mar 15, 2024
Copy link
Contributor

mergify bot commented Mar 15, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Mar 15, 2024
Copy link
Contributor

mergify bot commented Mar 15, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot dismissed GavinZZ’s stale review March 18, 2024 16:54

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 3aea1c3
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@GavinZZ GavinZZ merged commit c7fcaf7 into aws:main Mar 18, 2024
9 checks passed
@sigJoe sigJoe deleted the opensearch-allow-disable-logging branch March 18, 2024 21:26
ahammond pushed a commit to ahammond/aws-cdk that referenced this pull request Mar 26, 2024
### Issue # (if applicable)

aws#29294

### Reason for this change

Currently cannot disable opensearch logging

### Description of changes

If log parameters are explicitly set to false rather than undefined, it
populates the logPublishingOptions with config to disable that logging

### Description of how you validated changes

I added unit tests, although to be honest jest is giving me lots of
trouble and I'm out of time for the day so I'll just create this pR and
see what happens. Fingers crossed the PR test check is clean and I can
pretend I know what I'm doing.

### Checklist
- [x] My code adheres to the [CONTRIBUTING
GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and
[DESIGN
GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license*

---------

Co-authored-by: GZ <yuanhaoz@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK bug This issue is a bug. effort/medium Medium work item – several days of effort p2 pr/reviewer-clarification-requested The contributor has requested clarification on feedback, a failing build, or a failing PR Linter run
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants