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

Adopt protogetter #5981

Merged
merged 16 commits into from
Nov 14, 2024
Merged

Adopt protogetter #5981

merged 16 commits into from
Nov 14, 2024

Conversation

eapolinario
Copy link
Contributor

@eapolinario eapolinario commented Nov 9, 2024

Tracking issue

Closes #5980

Why are the changes needed?

We shouldn't panic due to incomplete proto messages.

What changes were proposed in this pull request?

I added https://github.com/ghostiam/protogetter to golangci-lint in all components. I removed unused linters and fixed a bunch of warnings.

There are 2 places where I left a comment:

Notice how in both cases we do not return a pointer to a proto struct, which renders the technique used to access potentially nil values in a proto struct invalid, hence the need for // nolint:protogetter whenever we access fields in those two objects (e.g.

Identity: taskExecutionMetadata.GetSecurityContext().RunAs, // nolint:protogetter
)

How was this patch tested?

Unit tests and local sandbox.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Docs link

Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Copy link

github-actions bot commented Nov 9, 2024

Dependency Review

The following issues were found:

  • ✅ 0 vulnerable package(s)
  • ❌ 8 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 17 package(s) with unknown licenses.

View full job summary

@eapolinario
Copy link
Contributor Author

#5977 is going to be fixed by this too.

Copy link

codecov bot commented Nov 9, 2024

Codecov Report

Attention: Patch coverage is 77.75311% with 501 lines in your changes missing coverage. Please review.

Project coverage is 37.03%. Comparing base (24113f6) to head (87eea97).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
...cloudevent/implementations/cloudevent_publisher.go 17.64% 56 Missing ⚠️
flyteadmin/pkg/manager/impl/execution_manager.go 80.63% 36 Missing and 13 partials ⚠️
...teadmin/pkg/manager/impl/node_execution_manager.go 70.58% 15 Missing and 10 partials ⚠️
flyteadmin/pkg/manager/impl/launch_plan_manager.go 70.66% 16 Missing and 6 partials ⚠️
flyteadmin/pkg/manager/impl/metrics_manager.go 80.53% 13 Missing and 9 partials ⚠️
flyteadmin/pkg/manager/impl/workflow_manager.go 67.24% 15 Missing and 4 partials ⚠️
...teadmin/pkg/manager/impl/task_execution_manager.go 66.03% 10 Missing and 8 partials ⚠️
flytecopilot/data/download.go 15.00% 17 Missing ⚠️
.../pkg/manager/impl/executions/quality_of_service.go 69.04% 13 Missing ⚠️
...lyteadmin/pkg/manager/impl/named_entity_manager.go 23.52% 13 Missing ⚠️
... and 74 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5981      +/-   ##
==========================================
+ Coverage   36.97%   37.03%   +0.05%     
==========================================
  Files        1312     1313       +1     
  Lines      131525   131621      +96     
==========================================
+ Hits        48636    48748     +112     
+ Misses      78662    78645      -17     
- Partials     4227     4228       +1     
Flag Coverage Δ
unittests-datacatalog 51.58% <80.45%> (ø)
unittests-flyteadmin 54.09% <77.18%> (+0.01%) ⬆️
unittests-flytecopilot 22.23% <22.72%> (ø)
unittests-flytectl 62.46% <82.72%> (+0.02%) ⬆️
unittests-flyteidl 7.25% <87.17%> (+0.20%) ⬆️
unittests-flyteplugins 53.70% <83.33%> (-0.14%) ⬇️
unittests-flytepropeller 43.11% <ø> (+<0.01%) ⬆️
unittests-flytestdlib 55.18% <ø> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eapolinario eapolinario merged commit b3330ba into master Nov 14, 2024
54 of 55 checks passed
@eapolinario eapolinario deleted the adopt-protogetter branch November 14, 2024 23:32
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.

[Housekeeping] Adopt protogetter linter
2 participants