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

[BEAM-10545] Added the inspector of PCollections and pipelines #12626

Merged
merged 3 commits into from Sep 2, 2020

Conversation

KevinGG
Copy link
Contributor

@KevinGG KevinGG commented Aug 19, 2020

  1. Added the InteractiveInspector component and its sub components. The
    hierarchy can be found in the code documentation.
  2. The component allows listing all user defined pipelines and
    PCollections in the kernel of the current notebook session,
    displaying pipeline graphs, and visualizing PCollection data.

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

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • 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.

Post-Commit Tests Status (on master branch)

Lang SDK Dataflow Flink Samza Spark Twister2
Go Build Status --- Build Status --- Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status --- Build Status --- Build Status ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Portable --- Build Status --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests

See CI.md for more information about GitHub Actions CI.

@KevinGG
Copy link
Contributor Author

KevinGG commented Aug 19, 2020

R: @prodonjs

PTAL!

Copy link

@prodonjs prodonjs left a comment

Choose a reason for hiding this comment

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

Sorry for the delay. I started on Friday and forgot I didn't submit. Just a few small nits but feel free to submit as-is if you like.

}

render(): React.ReactNode {
const pcollListItems = Object.entries(this.props.pcolls).map(

Choose a reason for hiding this comment

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

Just a nit, but you could probably move this and the onClick function out to private methods to make the logical separation a bit more readable. Or, since there is no state to this component, you could write it as a pure functional component that accepts props and returns the React node.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I've moved the logic out into private functions.

}

renderOptions(): React.ReactNode {
if (this.props.model.inspectableType === 'pcollection') {

Choose a reason for hiding this comment

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

nit you can reduce the nesting level for the pcollection case if you put put the inverse condition first and short-circuit the return for the empty span.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Inverted the condition and the return statements.

@codecov
Copy link

codecov bot commented Aug 27, 2020

Codecov Report

Merging #12626 into master will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12626      +/-   ##
==========================================
- Coverage   40.22%   40.22%   -0.01%     
==========================================
  Files         454      454              
  Lines       53669    53670       +1     
==========================================
  Hits        21587    21587              
- Misses      32082    32083       +1     
Impacted Files Coverage Δ
...beam/runners/interactive/background_caching_job.py 25.00% <0.00%> (-0.25%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa345db...dc3144d. Read the comment docs.

@KevinGG
Copy link
Contributor Author

KevinGG commented Aug 27, 2020

R: @pabloem

PTAL, thx!

Do we have a way to re-trigger Python tests / Python Unit Tests (macos-latest, 3.6, py36) (pull_request) and Python tests / Python Unit Tests (macos-latest, 3.7, py37) (pull_request) without having to close and re-open the pull request?

@KevinGG
Copy link
Contributor Author

KevinGG commented Aug 31, 2020

Run Python PreCommit

@KevinGG
Copy link
Contributor Author

KevinGG commented Aug 31, 2020

Run Python2_PVR_Flink PreCommit

KevinGG and others added 3 commits August 31, 2020 13:37
1. Added the InteractiveInspector component and its sub components. The
   hierarchy can be found in the code documentation.
2. The component allows listing all user defined pipelines and
   PCollections in the kernel of the current notebook session,
   displaying pipeline graphs, and visualizing PCollection data.
@KevinGG
Copy link
Contributor Author

KevinGG commented Aug 31, 2020

Rebased to head to resolve failures in Python tests.

@KevinGG
Copy link
Contributor Author

KevinGG commented Sep 1, 2020

Run Typescript PreCommit

@pabloem
Copy link
Member

pabloem commented Sep 1, 2020

@KevinGG - so IIUC, all of these elements will eventually be used once the side panel is activated here:

'JupyterLab extension apache-beam-jupyterlab-sidepanel is activated!'
- is that correct?

@KevinGG
Copy link
Contributor Author

KevinGG commented Sep 1, 2020

@KevinGG - so IIUC, all of these elements will eventually be used once the side panel is activated here:

'JupyterLab extension apache-beam-jupyterlab-sidepanel is activated!'

  • is that correct?

Yes. The next PR will bring in all the boilerplates to use all these components.

@pabloem pabloem merged commit cfe172f into apache:master Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants