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

Add PatchResources to FhirIO. #14691

Merged
merged 8 commits into from
May 6, 2021
Merged

Add PatchResources to FhirIO. #14691

merged 8 commits into from
May 6, 2021

Conversation

msbukal
Copy link
Contributor

@msbukal msbukal commented Apr 29, 2021

References:
https://cloud.google.com/healthcare/docs/reference/rest/v1beta1/projects.locations.datasets.fhirStores.fhir/patch
https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#patching_a_fhir_resource
https://cloud.google.com/healthcare/docs/how-tos/fhir-resources#conditionally_patching_a_fhir_resource

The Google Cloud FHIR service doesn't support neither Patch nor Conditional Patch within bundles, so it requires its own connector.


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.

ValidatesRunner compliance status (on master branch)

Lang ULR 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
Build Status
Build Status
Build Status
Python --- Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status Build Status Build Status --- Build Status ---

Examples testing status on various runners

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

Post-Commit SDK/Transform Integration Tests Status (on master branch)

Go Java Python
Build Status Build Status Build Status
Build Status
Build Status

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status 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
Java tests

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

@msbukal
Copy link
Contributor Author

msbukal commented Apr 30, 2021

R: @pabloem

@pabloem
Copy link
Member

pabloem commented May 4, 2021

there's spotless errors: https://ci-beam.apache.org/job/beam_PreCommit_Spotless_Commit/15767/console

You can run the spotlessApply gradle task on the gradle package, and that should fix the spotless errors.


There's also a compile error: https://scans.gradle.com/s/y7kzzhs6dsx5g/console-log?task=:sdks:java:io:google-cloud-platform:compileJava

@pabloem
Copy link
Member

pabloem commented May 4, 2021

@msbukal
Copy link
Contributor Author

msbukal commented May 4, 2021

I think everything should be fixed now :)

@pabloem
Copy link
Member

pabloem commented May 4, 2021

Run Java PreCommit

Copy link
Member

@pabloem pabloem left a comment

Choose a reason for hiding this comment

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

Added a couple comments.

Copy link
Member

@pabloem pabloem left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks! Just the one comment.

@@ -1417,8 +1432,107 @@ public void executeBundles(ProcessContext context) {
}
}

/** The type Patch resources. */
public static class PatchResources extends PTransform<PCollection<Input>, Write.Result> {

Copy link
Member

Choose a reason for hiding this comment

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

it might be good to add a non-public constructor here to ensure users won't create this transform directly, and they will use the FhirIO.patchResources directly. Thoughts?

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 agree it makes sense, added a private constructor.

@pabloem
Copy link
Member

pabloem commented May 6, 2021

Run Java PostCommit

@pabloem
Copy link
Member

pabloem commented May 6, 2021

LGTM. I'll merge once postcommits are passing.

@pabloem pabloem merged commit e37bede into apache:master May 6, 2021
@TheNeuralBit
Copy link
Member

It looks like somehow this broke beam_PostCommit_Java_DataflowV2 (BEAM-12310), could someone take a look?

@pabloem
Copy link
Member

pabloem commented May 7, 2021

hm sorry about that. I missed running the Dataflow postcommits. @msbukal do you have time to take a look?

@msbukal
Copy link
Contributor Author

msbukal commented May 7, 2021

In the failure linked, it looks like it's failing to read resources/ files on line:

https://github.com/msbukal/beam/blob/227b954fb86d2b31e298df6895984a41c49e3ef4/sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIOTestUtil.java#L67

I'm not sure how the failure could be introduced by this change, as I didn't modify this file at all. I also can't reproduce the error so not sure how to look further, is this a flake or a consistent failure?

@pabloem
Copy link
Member

pabloem commented May 7, 2021

hmm here' sthe history of test suite runs: https://ci-beam.apache.org/job/beam_PostCommit_Java_DataflowV2/

@TheNeuralBit
Copy link
Member

Can we try rolling back? It is a consistent failure.

Note that the failures are both in FhirIOPatchIT, which was added in this PR.

@TheNeuralBit
Copy link
Member

For a repro, you will need to run on Dataflow v2, it seems fine on Dataflow v1. The simplest way is probably to just execute the same task used in the Jenkins job:

tasks(":runners:google-cloud-dataflow-java:postCommitRunnerV2")

@msbukal
Copy link
Contributor Author

msbukal commented May 11, 2021

I get that it's coming from FhirIOPatchIT, but I can't find any differences between how FhirIOPatchIT and FhirIO[X]IT call
FhirIOTestUtil, so I'm not sure what's causing the initialization failure.

@TheNeuralBit
Copy link
Member

Yeah I agree it's surprising, but since it's clear this PR broke a PostCommit we should roll it back first, then diagnose why. Please see https://beam.apache.org/contribute/postcommits-policies-details/#rollback_first

@boyuanzz
Copy link
Contributor

From https://ci-beam.apache.org/job/beam_PostCommit_Java_DataflowV2/, we can see that the failure is consistent. Do you want to propose a rollback or you want me to help on that?

@msbukal
Copy link
Contributor Author

msbukal commented May 14, 2021

Ah sorry, I wasn't aware that the rollback is something I am supposed to do. How do you make a rollback? I might not have the time to do this.

boyuanzz pushed a commit to boyuanzz/beam that referenced this pull request May 14, 2021
@boyuanzz
Copy link
Contributor

Sent out revert PR: #14816

boyuanzz added a commit that referenced this pull request May 15, 2021
…#14691 from Add PatchResources to FhirIO."

[BEAM-12310] Revert "Merge pull request #14691 from Add PatchResources to FhirIO."
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.

None yet

4 participants