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

fixing interpolation if a service config string has a -- in it #610

Merged
merged 4 commits into from Jul 7, 2022

Conversation

ryan-cahill
Copy link
Member

Our interpolation was using a forward lookahead for an unlimited amount of characters before, which could catch something like an curl --fail localhost:3000/users || exit 1 in the service config. The -- would fail the regex match, and therefore not find the edges of a service for the graph. The regex has been updated to take this into account, and a test was added

@@ -20,6 +20,7 @@ export default class SecretsDownload extends BaseCommand {
};

static args = [{
non_sensitive: true,
Copy link
Member

Choose a reason for hiding this comment

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

What are non_sensitive secrets?

Copy link
Member

Choose a reason for hiding this comment

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

nvm I see this is used everywhere now

Copy link
Member Author

Choose a reason for hiding this comment

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

Isn't this just the secrets filename? That doesn't seem secret to me

@@ -15,7 +15,7 @@ export class Slugs {

public static ArchitectSlugDescription = `must contain only lower alphanumeric and single hyphens or underscores in the middle; max length ${Slugs.SLUG_CHAR_LIMIT}`;
static CharacterCountLookahead = `(?=.{1,${Slugs.SLUG_CHAR_LIMIT}}(\\${Slugs.NAMESPACE_DELIMITER}|${Slugs.TAG_DELIMITER}|$))`;
public static ArchitectSlugRegexBase = `(?!-)(?!.*--)[a-z0-9-]{1,${Slugs.SLUG_CHAR_LIMIT}}(?<!-)`;
public static ArchitectSlugRegexBase = `(?!-)(?!.{0,${Slugs.SLUG_CHAR_LIMIT}}--)[a-z0-9-]{1,${Slugs.SLUG_CHAR_LIMIT}}(?<!-)`;
Copy link
Member

Choose a reason for hiding this comment

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

Good catch!

@tjhiggins tjhiggins merged commit 7fc8458 into rc Jul 7, 2022
@tjhiggins tjhiggins deleted the fixing-missing-graph-edges branch July 7, 2022 14:06
github-actions bot pushed a commit that referenced this pull request Jul 7, 2022
# [1.18.0-rc.5](v1.18.0-rc.4...v1.18.0-rc.5) (2022-07-07)

### Bug Fixes

* **interpolation:** fixing interpolation if a service config string has a -- in it ([#610](#610)) ([7fc8458](7fc8458))
github-actions bot pushed a commit that referenced this pull request Jul 8, 2022
# [1.18.0](v1.17.2...v1.18.0) (2022-07-08)

### Bug Fixes

* **context:** including error if context doesn't exist and test updates ([#589](#589)) ([adf6f88](adf6f88))
* **interpolation:** fixing interpolation if a service config string has a -- in it ([#610](#610)) ([7fc8458](7fc8458))
* **k8s:** Support k8s 1.24+ ([#608](#608)) ([cfed071](cfed071))

### Features

* **error:** Add sentry error logging ([603ea01](603ea01))
* **platform:** Warn user about unsupported version of Kubernetes. ([3f6b702](3f6b702))
* **register:** Specify which architectures to build for your containers ([f5f81de](f5f81de))
* **secrets:** Can upload and download secrets to accounts an environments. ([0d17b77](0d17b77))
@github-actions
Copy link

github-actions bot commented Jul 8, 2022

🎉 This PR is included in version 1.18.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants