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

Set required proto fields in repositories #5086

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

eleftherias
Copy link
Contributor

@eleftherias eleftherias commented Nov 28, 2024

Summary

Ref #4952

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@eleftherias eleftherias requested a review from a team as a code owner November 28, 2024 16:31
@eleftherias eleftherias force-pushed the openapi-repos-required branch from cd497d0 to f6cca2f Compare November 28, 2024 16:38
@eleftherias eleftherias force-pushed the openapi-repos-required branch from f6cca2f to 265ed7c Compare November 28, 2024 16:45
@@ -1230,7 +1250,8 @@ message UpstreamRepositoryRef {
pattern: "^[-.[:alnum:]_]+$",
max_len: 200,
},
(buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE
(buf.validate.field).ignore = IGNORE_IF_DEFAULT_VALUE,
(google.api.field_behavior) = REQUIRED
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused by this. We say "IGNORE_IF_DEFAULT_VALUE" then check for optional?

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'm confident that the IGNORE_IF_DEFAULT_VALUE isn't correct because when processing the request we fail if name is unset. I would like to do some additional testing and remove that annotation in a different PR.

@eleftherias eleftherias merged commit 93c054a into mindersec:main Nov 29, 2024
26 checks passed
@eleftherias eleftherias deleted the openapi-repos-required branch November 29, 2024 14:50
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.

2 participants