chore: Add Struct required tags and Server Struct Validator#5371
Merged
X-Guardian merged 11 commits intorunatlantis:mainfrom Mar 9, 2025
Merged
chore: Add Struct required tags and Server Struct Validator#5371X-Guardian merged 11 commits intorunatlantis:mainfrom
required tags and Server Struct Validator#5371X-Guardian merged 11 commits intorunatlantis:mainfrom
Conversation
Signed-off-by: X-Guardian <32168619+X-Guardian@users.noreply.github.com>
Signed-off-by: X-Guardian <32168619+X-Guardian@users.noreply.github.com>
Signed-off-by: X-Guardian <32168619+X-Guardian@users.noreply.github.com>
Signed-off-by: X-Guardian <32168619+X-Guardian@users.noreply.github.com>
required tags and Server Struct Validator
Signed-off-by: X-Guardian <32168619+X-Guardian@users.noreply.github.com>
Signed-off-by: X-Guardian <32168619+X-Guardian@users.noreply.github.com>
jamengual
approved these changes
Mar 3, 2025
chenrui333
approved these changes
Mar 4, 2025
inkel
pushed a commit
to inkel/atlantis
that referenced
this pull request
Mar 18, 2025
…antis#5371) Signed-off-by: X-Guardian <32168619+X-Guardian@users.noreply.github.com>
CaioAugustoo
pushed a commit
to CaioAugustoo/atlantis
that referenced
this pull request
Mar 27, 2025
…antis#5371) Signed-off-by: X-Guardian <32168619+X-Guardian@users.noreply.github.com>
1 task
joe1981al
pushed a commit
to joe1981al/atlantis
that referenced
this pull request
Jun 20, 2025
…antis#5371) Signed-off-by: X-Guardian <32168619+X-Guardian@users.noreply.github.com> Signed-off-by: Joseph McDonald <jojosr2000@gmail.com>
dimisjim
pushed a commit
to dimisjim/atlantis
that referenced
this pull request
Oct 29, 2025
…antis#5371) Signed-off-by: X-Guardian <32168619+X-Guardian@users.noreply.github.com> Signed-off-by: dimisjim <dimitris.moraitidis@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
validate:"required"tag to required fields of structs that are used by the mainServerstruct.validatorcode to the mainServerstruct to validate all the fields in the struct and child structs.validatorvariable toparserValidatorto avoid clashing with the validator package.TestCommandRunnerVCSClientInitializedtest.why
Currently, if required fields are not specified in the
Serverstruct or child structs, the unit tests will not detect this, and are likely to only be exposed in panics deeper in the code.tests
Tested locally.
If a required field has not been specified, the following runtime error will occur at server initialization:
references
api/planreturns status 500 #5322