Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Conversation

@noahingh
Copy link
Member

Add deployable_ref field to the configuration to validate the ref which is deployable or not. If it is not matched, it returns an unprocessable entity error.

스크린샷 2021-11-19 오전 3 42 11

@noahingh noahingh added the component: server This issue or pull request is related to the feature of the server-side label Nov 18, 2021
@noahingh noahingh linked an issue Nov 18, 2021 that may be closed by this pull request
Comment on lines +175 to +179
if ok, err := env.IsDeployableRef(d.Ref); err != nil {
return false, err
} else if !ok {
return false, e.NewErrorWithMessage(e.ErrorCodeUnprocessableEntity, "The ref is not matched with 'deployable_ref'.", nil)
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Validate the ref is matched with deployable_ref or not.

Comment on lines +11 to +12
// ErrorCodeConfigRegexpError is the regexp(re2) is invalid.
ErrorCodeConfigRegexpError ErrorCode = "config_regexp_error"
Copy link
Member Author

Choose a reason for hiding this comment

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

Add a new error config_regexp_error to describe an error from the regexp.MatchString

@noahingh noahingh added this to the v0.4 milestone Nov 18, 2021
@noahingh noahingh added the documentation Pull requests improves or adds to documentation label Nov 18, 2021
@noahingh noahingh merged commit fb63d42 into main Nov 18, 2021
@noahingh noahingh deleted the deployable-ref branch November 18, 2021 19:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

component: server This issue or pull request is related to the feature of the server-side documentation Pull requests improves or adds to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restrict Deployable REF

2 participants