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

Fixes target group replacement and extra logging #199

Merged
merged 1 commit into from
Feb 6, 2023

Conversation

DavidSeptimus-Klotho
Copy link
Contributor

@DavidSeptimus-Klotho DavidSeptimus-Klotho commented Feb 4, 2023

Fixes #196

Fixes the fix() function for the broken rule by changing the replacement character from _ to - and hides debug logging behind a flag.

Standard checks

  • Unit tests: Any special considerations? no
  • Docs: Do we need to update any docs, internal or public? no
  • Backwards compatibility: Will this break existing apps? If so, what would be the extra work required to keep them working? no

@@ -56,3 +56,12 @@ export const targetGroup = {
}
},
}

console.log(
(
Copy link

Choose a reason for hiding this comment

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

Just out of curiosity, what does the extra parenthesis do? (It's not a problem, I'm just wondering if there's something neat going on I don't know :) )

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 accidentally committed the line of code I was using to reproduce the issue. That was just a workaround to be able to invoke the fix function, which TypeScript complains about on its own because it might be undefined.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can use ! for cases where you know better than the compiler to assert that it isn't undefined.

@@ -56,3 +56,12 @@ export const targetGroup = {
}
},
}

console.log(
(
Copy link
Contributor

Choose a reason for hiding this comment

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

Can use ! for cases where you know better than the compiler to assert that it isn't undefined.

@@ -1,6 +1,9 @@
import Multimap = require('multimap')
import * as sha256 from 'simple-sha256'

// Set debug = true to enable additional logging
let debug = false
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Would it be possible to make this a config value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as in pulumi config?

Copy link

Choose a reason for hiding this comment

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

There's also pulumi.log.[debug|info|etc], though I don't know exactly how they work. Maybe the verbose flag sets it?

@github-actions
Copy link

github-actions bot commented Feb 6, 2023

Package Line Rate Health
github.com/klothoplatform/klotho/pkg/analytics 2%
github.com/klothoplatform/klotho/pkg/annotation 23%
github.com/klothoplatform/klotho/pkg/cli 4%
github.com/klothoplatform/klotho/pkg/core 21%
github.com/klothoplatform/klotho/pkg/env_var 82%
github.com/klothoplatform/klotho/pkg/exec_unit 53%
github.com/klothoplatform/klotho/pkg/infra/kubernetes 59%
github.com/klothoplatform/klotho/pkg/infra/kubernetes/helm 39%
github.com/klothoplatform/klotho/pkg/input 63%
github.com/klothoplatform/klotho/pkg/lang 38%
github.com/klothoplatform/klotho/pkg/lang/dockerfile 0%
github.com/klothoplatform/klotho/pkg/lang/golang 19%
github.com/klothoplatform/klotho/pkg/lang/javascript 47%
github.com/klothoplatform/klotho/pkg/lang/python 60%
github.com/klothoplatform/klotho/pkg/lang/yaml 0%
github.com/klothoplatform/klotho/pkg/logging 7%
github.com/klothoplatform/klotho/pkg/multierr 95%
github.com/klothoplatform/klotho/pkg/provider/aws 59%
github.com/klothoplatform/klotho/pkg/runtime 75%
github.com/klothoplatform/klotho/pkg/static_unit 33%
github.com/klothoplatform/klotho/pkg/validation 73%
github.com/klothoplatform/klotho/pkg/yaml_util 79%
Summary 40% (3793 / 9454)

@DavidSeptimus-Klotho DavidSeptimus-Klotho merged commit e6dee4c into main Feb 6, 2023
@DavidSeptimus-Klotho DavidSeptimus-Klotho deleted the patterns branch February 6, 2023 15:04
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.

sanitization for target groups is not working
2 participants