Stream: committers
Topic: build failed?
David Pyke (May 05 2021 at 18:36):
I pushed changes which work locally but is failing on the build:
Candidate for CodeableReference: [ClinicalImpression.prognosis]
This was a Full Build 1.333 58sec 4839MB
FHIR build failure @ Wed, May 5, 2021 18:31+0000 0.109 58sec 4839MB
Error: null
java.lang.NullPointerException
at java.util.ResourceBundle.containsKey(ResourceBundle.java:1821)
at org.hl7.fhir.utilities.i18n.I18nBase.messageExistsForLocale(I18nBase.java:50)
at org.hl7.fhir.utilities.i18n.I18nBase.formatMessage(I18nBase.java:67)
at org.hl7.fhir.validation.BaseValidator.ruleHtml(BaseValidator.java:422)
at org.hl7.fhir.definitions.validation.ResourceValidator.rule(ResourceValidator.java:124)
at org.hl7.fhir.definitions.validation.ResourceValidator.checkSearchParams(ResourceValidator.java:383)
at org.hl7.fhir.definitions.validation.ResourceValidator.check(ResourceValidator.java:217)
at org.hl7.fhir.definitions.validation.ResourceValidator.check(ResourceValidator.java:594)
at org.hl7.fhir.tools.publisher.Publisher.validate(Publisher.java:1786)
at org.hl7.fhir.tools.publisher.Publisher.execute(Publisher.java:608)
at org.hl7.fhir.tools.publisher.Publisher.main(Publisher.java:473)
Task :publish FAILED
David Pyke (May 05 2021 at 18:36):
How do I fix things so it works?
David Pyke (May 05 2021 at 18:36):
https://dev.azure.com/fhir-pipelines/fhir-publisher/_build/results?buildId=20210505.1
David Pyke (May 05 2021 at 18:37):
It looks like ClinicalImpression.prognosis is failing and I didn't touch that...
Mark Iantorno (May 05 2021 at 18:39):
Are you able to build locally?
Mark Iantorno (May 05 2021 at 18:39):
or do you just push to test
Mark Iantorno (May 05 2021 at 18:42):
The master pipeline hasn't run since April 14th, so I'm going to run it now to ensure we don't get the same error on master (just to verify that this isn't related to an external change that caused the build to fail)
Mark Iantorno (May 05 2021 at 18:43):
once that's done, we'll know if it's changes you made, or if it's something else that we can look into
Mark Iantorno (May 05 2021 at 18:43):
it's running now here: https://dev.azure.com/fhir-pipelines/fhir-publisher/_build/results?buildId=3348&view=results
David Pyke (May 05 2021 at 18:44):
The local build worked fine.
Mark Iantorno (May 05 2021 at 18:45):
what command did you run to build
David Pyke (May 05 2021 at 18:45):
David Pyke (May 05 2021 at 18:45):
But it didnt' do a full build,
Mark Iantorno (May 05 2021 at 18:46):
Why did it not do a full build?
Mark Iantorno (May 05 2021 at 18:46):
Can you do me a favour and run this command in the terminal ./gradlew clean build
David Pyke (May 05 2021 at 18:47):
running now
Mark Iantorno (May 05 2021 at 18:47):
actually cancel that sorry
Mark Iantorno (May 05 2021 at 18:47):
run this instead
Mark Iantorno (May 05 2021 at 18:47):
./gradlew clean publish
Mark Iantorno (May 05 2021 at 18:47):
sorry, it's been a while since I set this up
David Pyke (May 05 2021 at 18:47):
oh good. the clean build failed
Mark Iantorno (May 05 2021 at 18:48):
try publish
David Pyke (May 05 2021 at 18:48):
Now it's doing a full build. Same error as the CI build
Mark Iantorno (May 05 2021 at 18:48):
yeah okay
Mark Iantorno (May 05 2021 at 18:48):
I will add clean to the command in publish.sh
Mark Iantorno (May 05 2021 at 18:48):
it means that something was cached locally on your system that was allowing the pass
Mark Iantorno (May 05 2021 at 18:49):
let me just verify that master branch builds on the pipeline
David Pyke (May 05 2021 at 18:49):
So, do we go back to the ClinicalImpression gang and have them fix this? It's not my resource
Mark Iantorno (May 05 2021 at 18:50):
Well, one sec
Mark Iantorno (May 05 2021 at 18:50):
so if master branch passes
Mark Iantorno (May 05 2021 at 18:50):
that means that it was a change in the pr that is _most likely_ causing the error
Mark Iantorno (May 05 2021 at 18:51):
because the only delta between what is passing and what is failing is the changes in that PR
Mark Iantorno (May 05 2021 at 18:51):
can you please check out the master branch and check if it build locally for you
Mark Iantorno (May 05 2021 at 18:51):
while we're testing at this
Mark Iantorno (May 05 2021 at 18:51):
git checkout master
Mark Iantorno (May 05 2021 at 18:51):
./gradlew clean publish
Mark Iantorno (May 05 2021 at 18:52):
We just need to eliminate any potential sources of errors
Mark Iantorno (May 05 2021 at 18:52):
before we start asking other people to investigate any changes they may or may not have made
David Pyke (May 05 2021 at 18:53):
Another partial build...
Mark Iantorno (May 05 2021 at 18:53):
I don't understand what you mean by that
Mark Iantorno (May 05 2021 at 18:53):
it fails?
Mark Iantorno (May 05 2021 at 18:53):
or it succeeds?
David Pyke (May 05 2021 at 18:54):
it's only building diagnosticreport and consent
David Pyke (May 05 2021 at 18:54):
but it succeeded
Mark Iantorno (May 05 2021 at 18:54):
when you run the command ./gradlew clean publish it only does a partial build
Mark Iantorno (May 05 2021 at 18:54):
?
Mark Iantorno (May 05 2021 at 18:55):
That should not be the case...unless something has been changed
Mark Iantorno (May 05 2021 at 18:55):
the publish command should run the entire build
David Pyke (May 05 2021 at 18:55):
I'll run it again
Mark Iantorno (May 05 2021 at 18:55):
can you copy paste the output and send to me please
Mark Iantorno (May 05 2021 at 18:56):
it should be taking like 20ish min
Mark Iantorno (May 05 2021 at 18:56):
and do an entire build
David Pyke (May 05 2021 at 18:57):
I'll have to run it again and capture the entire build. Which should force a full build.
Mark Iantorno (May 05 2021 at 18:58):
By running the cradle command it should force a full build...I'm curious as to why it is not on your machine
Mark Iantorno (May 05 2021 at 18:59):
I think the log will shed light on this
David Pyke (May 05 2021 at 18:59):
I'm running it again now.
Mark Iantorno (May 05 2021 at 18:59):
Kk
David Pyke (May 05 2021 at 19:01):
this time it's a full build
Mark Iantorno (May 05 2021 at 19:03):
yeah that ./gradlew clean publish should always produce a full build. I am unsure why it would not on your machine
David Pyke (May 05 2021 at 19:04):
next time I make changes, I'll remember to capture the build
Mark Iantorno (May 05 2021 at 19:04):
if there is an issue it can help the investigation
Mark Iantorno (May 05 2021 at 19:05):
however, most of the time, the pipelines are the place to go to get proper log outs and investigate
Mark Iantorno (May 05 2021 at 19:05):
they are usually the "source of truth"
Mark Iantorno (May 05 2021 at 19:08):
@David Pyke the master branch just succeeded publishing in the pipeline
Mark Iantorno (May 05 2021 at 19:09):
So this would lead me to believe this is due to a change in the PR
David Pyke (May 05 2021 at 19:09):
Weird. I guess I needed a pull first because it just passed here too
Mark Iantorno (May 05 2021 at 19:10):
yeah it's always a good idea to pull the current master into your local branch before merging to ensure that it is up to date
David Pyke (May 05 2021 at 19:11):
okay. So, do I need to redo the PR or is all good now?
Mark Iantorno (May 05 2021 at 19:11):
you will need to pull master into your current branch
Mark Iantorno (May 05 2021 at 19:11):
test the build, then commit and push
David Pyke (May 05 2021 at 19:11):
Okay, done.
David Pyke (May 05 2021 at 19:11):
I'll try again
Mark Iantorno (May 05 2021 at 19:12):
then the CI will try and build again
Mark Iantorno (May 05 2021 at 19:12):
So, a while back there were some good GitHub tips posted on the committers zulip channel on using github
Mark Iantorno (May 05 2021 at 19:12):
I've posted them here: https://hl7.github.io/docs/using_github/
Mark Iantorno (May 05 2021 at 19:12):
With some editing
David Pyke (May 05 2021 at 19:39):
Okay, due to some strange issues with git wanting me to stash changes I didn't make (buildOffline.bat and clean.bat) I gave up and re cloned the whole thing. All my changes are there, the branch is merged with master but my branch still fails due to ClinicalImpression.prognosis.
David Pyke (May 05 2021 at 19:39):
I'll give a coffee to anyone who can save me from the madness
David Pyke (May 05 2021 at 19:57):
Okay, deleted my branch, switched to master, pulled (up to date), started a new branch, copied in the two files I changed and now it fails again due to ClinicalImpression.prognosis. So, something in my files is highlighting a problem in ClinicalImpression.
David Pyke (May 05 2021 at 19:59):
Candidate for CodeableReference: [ClinicalImpression.prognosis]
Candidate for CodeableReference: [EvidenceReport.section.entry]
Value Set http://hl7.org/fhir/ValueSet/all-languages: ownership clash patient vs conformance
Code System urn:ietf:bcp:47: ownership clash patient vs conformance
Candidate for CodeableReference: [Permission.processingActivity.party]
...process profiles (base) 2.488 21sec 769MB
...process profiles (resources) 0.057 21sec 799MB
...process profiles (extensions) 0.775 22sec 1221MB
register http://hl7.org/fhir/StructureDefinition/shareablemeasure
Grahame Grieve (May 05 2021 at 20:21):
@Mark Iantorno you know you're talking about a different build than @David Pyke ?
Mark Iantorno (May 05 2021 at 22:47):
I thought we were talking about the publisher?
Mark Iantorno (May 05 2021 at 22:47):
HL7/fhir?
Grahame Grieve (May 05 2021 at 23:34):
oh hmm maybe not.
Grahame Grieve (May 05 2021 at 23:36):
I just couldn't figure out why a gradle clean was relevant to the problem
Grahame Grieve (May 05 2021 at 23:36):
the problem is that it's getting a null exception reading from messages.properties
Grahame Grieve (May 05 2021 at 23:36):
don't know why that would be happening though
Mark Iantorno (May 06 2021 at 00:45):
the build might not have been pulling the latest dependencies for the build process
Mark Iantorno (May 06 2021 at 00:45):
I'm wrong clean does not blow away cache, it just cleans the local generated files
Mark Iantorno (May 06 2021 at 00:46):
might have had old files cached
Mark Iantorno (May 06 2021 at 00:47):
I really do feel that this is a git issue
Mark Iantorno (May 06 2021 at 00:47):
@David Pyke could you follow the instructions on https://hl7.github.io/docs/using_github/ and try again
Mark Iantorno (May 06 2021 at 00:47):
use the commands there
Mark Iantorno (May 06 2021 at 00:47):
let me know if you have any issues
David Pyke (May 06 2021 at 00:49):
I have done all that. still fails at the same place
David Pyke (May 06 2021 at 00:50):
I have even started from a clean clone of the repo, created a new branch, copied in the files that I changed and the build fails. That can't be a git issue
Mark Iantorno (May 06 2021 at 00:51):
then if (a) master builds on your machine, (b) the git process works...I would say it's something to do with the changes
Mark Iantorno (May 06 2021 at 00:51):
occam's razor
David Pyke (May 06 2021 at 01:15):
That's my thought But I'm only changing consent and the event extensions spreadsheet in source.profiles...
David Pyke (May 06 2021 at 13:06):
So, if anyone would like to try this themselves, I will happily give you the files to test
David Pyke (May 06 2021 at 13:07):
@Grahame Grieve @Lloyd McKenzie
John Moehrke (May 06 2021 at 13:20):
I could try... what do you want me to try
David Pyke (May 06 2021 at 13:22):
Create a branch with these two files.
event-extensions-spreadsheet.xml structuredefinition-Consent.xml
See if it fails for you with a problem with ClinicalImpression.prognosis
David Pyke (May 06 2021 at 13:23):
the event extensions file goes into source/profiles
John Moehrke (May 06 2021 at 13:25):
okay, I am building current now
John Moehrke (May 06 2021 at 13:26):
There is a trick you need to do when editing the structuredefinition rather than the spreadsheet. I think you must delete the sheet and have the build create it again
John Moehrke (May 06 2021 at 13:40):
and build twice
David Pyke (May 06 2021 at 13:41):
So it works for you?
John Moehrke (May 06 2021 at 13:42):
I am still building current... sorry I don't have a gaming computer
Mark Iantorno (May 06 2021 at 13:42):
I have a 'gaming computer'
Mark Iantorno (May 06 2021 at 13:42):
and it still takes 20+ min
Mark Iantorno (May 06 2021 at 13:42):
don't worry
David Pyke (May 06 2021 at 13:42):
I have a linux box and it takes me 6
Mark Iantorno (May 06 2021 at 13:46):
to do a full build takes 6 min?
Mark Iantorno (May 06 2021 at 13:46):
I don't believe you.
David Pyke (May 06 2021 at 13:47):
Next time I do a build that completes, I'll send you the build log
John Moehrke (May 06 2021 at 13:54):
I get a failure
John Moehrke (May 06 2021 at 13:54):
Exception in thread "main" java.lang.Error: The element context 'Consent.performer' is not valid @ event-extensions-spreadsheet.xml
David Pyke (May 06 2021 at 13:56):
That's weird. That should have been changed to Consent.grantee
David Pyke (May 06 2021 at 13:56):
I must have sent you the wrong file
John Moehrke (May 06 2021 at 13:57):
likely
John Moehrke (May 06 2021 at 13:57):
try again
David Pyke (May 06 2021 at 14:01):
event-extensions-spreadsheet.xml
David Pyke (May 06 2021 at 15:19):
And this time it all worked. So, whatever was causing the weird error has gone away
Mark Iantorno (May 06 2021 at 15:20):
your build is working now locally?
David Pyke (May 06 2021 at 15:22):
Yep, and the CI build passed too
Mark Iantorno (May 06 2021 at 15:23):
can you send me the PR
Mark Iantorno (May 06 2021 at 15:30):
So I'm investigating now, and I'm pretty sure this build was failing because the branch had not been updated to the latest changes on master. You can compare the PRs here (https://github.com/HL7/fhir/pull/1263/files), the original, with the changes here (https://github.com/HL7/fhir/pull/1265/files), the latest that passed. There are notable differences between the two PRs
David Pyke (May 06 2021 at 15:31):
I did pulls against master for both but maybe git didn't like me yesterday. It's a stupid git, after all
Mark Iantorno (May 06 2021 at 15:33):
Yeah I'm not sure what may have happened locally for you. Next time you have issues, let me know the git commands your are running, and I can offer advice. I can also update the wiki with better instructions if needed
Last updated: Apr 12 2022 at 19:14 UTC