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

(aws-eks): Ability to suppress selected warnings #15079

Closed
2 tasks
lucaswilric opened this issue Jun 11, 2021 · 4 comments
Closed
2 tasks

(aws-eks): Ability to suppress selected warnings #15079

lucaswilric opened this issue Jun 11, 2021 · 4 comments
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service effort/medium Medium work item – several days of effort feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. feature-request A feature should be added or improved. p2

Comments

@lucaswilric
Copy link

Introduce a means of selectively suppressing warnings

Use Case

The @aws-eks/Cluster construct sometimes emits warnings for which the most appropriate response is to ignore them. See #14724 for an example of this.

Non-actionable warnings introduce a usability issue because they make it harder to spot warnings that do need action.

To remedy this, it would be useful to have some way of selectively suppressing errors that we know to be non-actionable, to avoid confusion for folks who are new to our codebase, and to help us reliably notice warnings that we need to pay attention to.

Proposed Solution

The following workaround suppresses warnings by bypassing the Cluster construct's standard interface:

(Works with aws-cdk version 1.104.1)

import * as eks from "@aws-cdk/aws-eks";

function filterSomeWarning(cluster: eks.Cluster) {
  const node = cluster.node._actualNode;

  (node as any)._metadata = node.metadata.filter(
    (m) => m.type != "aws:cdk:warning" || !m.data.includes("Some substring of the warning message")
  );
}

Although this works, it is not really satisfactory, because it is undocumented and relies on knowledge of CDK's internal workings, which could theoretically change at any time.

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@lucaswilric lucaswilric added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 11, 2021
@github-actions github-actions bot added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label Jun 11, 2021
@peterwoodworth peterwoodworth added p2 effort/medium Medium work item – several days of effort labels Jun 11, 2021
@peterwoodworth
Copy link
Contributor

I am marking this issue as p2, which means that we are unable to work on this immediately.

We use +1s to help prioritize our work, and are happy to revaluate this issue based on community feedback. You can reach out to the cdk.dev community on Slack to solicit support for reprioritization.

@peterwoodworth peterwoodworth added feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. and removed needs-triage This issue or PR still needs to be triaged. labels Jun 11, 2021
@otaviomacedo otaviomacedo removed their assignment Jun 11, 2021
@cayman-amzn
Copy link

Another possible solution: #23403

@peterwoodworth
Copy link
Contributor

I think we can close this in favor of the one you've opened @cayman-amzn, thanks for bringing this to our attention 🙂

@github-actions
Copy link

github-actions bot commented Feb 3, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service effort/medium Medium work item – several days of effort feature/enhancement A new API to make things easier or more intuitive. A catch-all for general feature requests. feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

4 participants