Skip to content

[#29803] Fix nil pointer access in logRuntimeDependencies#29804

Merged
jrmccluskey merged 1 commit intoapache:masterfrom
jrmccluskey:pointerFinger
Dec 18, 2023
Merged

[#29803] Fix nil pointer access in logRuntimeDependencies#29804
jrmccluskey merged 1 commit intoapache:masterfrom
jrmccluskey:pointerFinger

Conversation

@jrmccluskey
Copy link
Copy Markdown
Contributor

Corrects a nil pointer usage when Python containers are built through processArtifactsInSetupOnlyMode()

Fixes #29803


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@jrmccluskey
Copy link
Copy Markdown
Contributor Author

R: @damccorm @riteshghorse
CC: @tvalentyn

@github-actions
Copy link
Copy Markdown
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c3d130c) 38.23% compared to head (048b951) 38.23%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #29804      +/-   ##
==========================================
- Coverage   38.23%   38.23%   -0.01%     
==========================================
  Files         696      696              
  Lines      101879   101879              
==========================================
- Hits        38956    38949       -7     
- Misses      61307    61312       +5     
- Partials     1616     1618       +2     
Flag Coverage Δ
go 53.93% <ø> (-0.02%) ⬇️

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.

@@ -409,7 +409,7 @@ func installSetupPackages(ctx context.Context, logger *tools.Logger, files []str
if err := pipInstallPackage(ctx, logger, files, workDir, workflowFile, false, true, nil); err != nil {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we want to do the same for installExtraPackages and pipInstallPackages?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can clean this up after the fact to a cleaner pattern, IIRC an issue similar to the one this fixes popped up when I was implementing the buffered logger originally which led to needing to handle the nil logger in the setup-only mode case.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, @jrmccluskey ! Could you please file an issue to follow up? thank you!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Filed #29819

@lostluck
Copy link
Copy Markdown
Contributor

It is an odd pattern that at present:

  • setup passes down a nil logger,
  • then we manually re-build/wrap with buffered loggers wherever we actually do log something.

I'd expect us to pass around the buffered logger type from the top, instead of arbitrarily trying to re-construct it.

Stuff to clean up when it's not a release blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Failing Test]: Python Container Builds Fail with SIGSEGV: segmentation violation

4 participants