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

LPD-47903 NPE in HttpInvoker due to httpURLConnection.getErrorStream returning null #158601

Conversation

liferay-continuous-integration
Copy link
Collaborator

Forwarded from: liferay-headless#2524 (Took 2 ci:forward attempts in 5 hours 42 minutes)
Console

@jonathanmccann
@liferay-headless

Original pull request comment:

What is this trying to solve?

https://liferay.atlassian.net/browse/LPD-47903

How am I fixing it?

Previously reviewed liferay-headless#2502
Resending with requested changes from #158550 (comment)

In certain cases httpURLConnection.getErrorStream() can return null as defined in the spec - https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/HttpURLConnection.html#getErrorStream()

This was caught in one of Site Management's tests where we expect the action to fail and confirm it fails with the correct status code.

I updated the template to only process the inputStream if it exists. Please let me know your thoughts on the change and if you see an alternative approach that you would prefer instead. Thank you.

How can you verify that it works?

In headless-site-test run gw testIntegration --tests *.SiteResourceTest
In petra-http-invoker run gw test --tests "HttpInvokerTest"

@liferay-continuous-integration
Copy link
Collaborator Author

✔️ ci:test:sf - 1 out of 1 jobs passed in 4 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 93ef501e569609909bd960ab12a448298d442074

Sender Branch:

Branch Name: LPD-47903
Branch GIT ID: 9d16d885ea24d6bba26c4813097df39b9248f8d5

1 out of 1jobs PASSED
1 Successful Jobs:
For more details click here.

@liferay-continuous-integration
Copy link
Collaborator Author

To conserve resources, the PR Tester does not automatically run for forwarded pull requests.

@liferay-continuous-integration
Copy link
Collaborator Author

✔️ ci:test:stable - 25 out of 25 jobs passed

❌ ci:test:relevant - 103 out of 143 jobs passed in 3 hours 46 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 93ef501e569609909bd960ab12a448298d442074

Upstream Comparison:

Branch GIT ID: 93ef501e569609909bd960ab12a448298d442074
Jenkins Build URL: EE Development Acceptance (master) - 1171 - 2025-02-06[12:38:09]

ci:test:stable - 25 out of 25 jobs PASSED
25 Successful Jobs:
    ci:test:relevant - 103 out of 143 jobs PASSED

    40 Failed Jobs:

    103 Successful Jobs:
      For more details click here.

      Failures unique to this pull:

      1. modules-integration-mysql57/1/3
        record-testray-logs:
        [beanshell] INFO: Using GOOGLE_APPLICATION_CREDENTIALS=/root/.gcloud/ci-testray.json
        [beanshell] Unable to delete because file does not exist /opt/dev/projects/github/liferay-jenkins-ee/testray/prepared_s3_logs
        [beanshell] Unable to delete because file does not exist /opt/dev/projects/github/liferay-jenkins-ee/testray/recorded_logs
        [beanshell] Created cache file in /tmp/jenkins-cached-files/863449111.txt
        [beanshell] Executing commands: git remote -v
        [beanshell] Found Git remotes: github-dev, origin, upstream
        [beanshell] Created S3 Object https://storage.cloud.google.com/testray-results/2025-02/test-1-39/test-portal-acceptance-pullrequest(master)/12585/modules-integration-mysql57/1/3/jenkins-console.txt.gz in 277 ms
        [stopwatch] [run.current.job: 2:43.104 sec]
        [beanshell] Created cache file in /tmp/jenkins-cached-files/863449111.txt
        

        BUILD FAILED
        /opt/dev/projects/github/liferay-jenkins-ee/commands/build-common.xml:15408: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build-test-batch.xml:7417: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build-test-batch.xml:2398: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build-test-batch.xml:2583: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build-test-batch.xml:1119: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build.xml:964: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build-common.xml:1698: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build-common.xml:1041: Unable to execute Gradle task: setUpLibs.

        1. com.liferay.jenkins.Jenkins
        2. com.liferay.object.internal.field.business.type.test.MultiselectPicklistObjectFieldBusinessTypeTest.testPostMultiselectPicklistAsArrayOfMaps - UNTESTED
        3. com.liferay.object.service.test.ObjectEntryFolderLocalServiceTest.testAddObjectEntryFolder - UNTESTED
        4. ...
      2. modules-integration-mysql57/1/6
        record-testray-logs:
        [beanshell] INFO: Using GOOGLE_APPLICATION_CREDENTIALS=/root/.gcloud/ci-testray.json
        [beanshell] Unable to delete because file does not exist /opt/dev/projects/github/liferay-jenkins-ee/testray/prepared_s3_logs
        [beanshell] Unable to delete because file does not exist /opt/dev/projects/github/liferay-jenkins-ee/testray/recorded_logs
        [beanshell] Created cache file in /tmp/jenkins-cached-files/-1859637193.txt
        [beanshell] Executing commands: git remote -v
        [beanshell] Found Git remotes: github-dev, origin, upstream
        [beanshell] Created S3 Object https://storage.cloud.google.com/testray-results/2025-02/test-1-39/test-portal-acceptance-pullrequest(master)/12585/modules-integration-mysql57/1/6/jenkins-console.txt.gz in 266 ms
        [stopwatch] [run.current.job: 1:59.575 sec]
        [beanshell] Created cache file in /tmp/jenkins-cached-files/-1859637193.txt

        BUILD FAILED
        /opt/dev/projects/github/liferay-jenkins-ee/commands/build-common.xml:15408: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build-test-batch.xml:7417: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build-test-batch.xml:2398: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build-test-batch.xml:2583: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build-test-batch.xml:1119: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build.xml:964: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build-common.xml:1698: The following error occurred while executing this line:
        /opt/dev/projects/github/liferay-portal/build-common.xml:1041: Unable to execute Gradle task: setUpLibs.

        1. com.liferay.jenkins.Jenkins
        2. com.liferay.layout.utility.page.service.persistence.test.LayoutUtilityPageEntryPersistenceTest.testCreate - UNTESTED
        3. com.liferay.layout.utility.page.service.persistence.test.LayoutUtilityPageEntryPersistenceTest.testRemove - UNTESTED
        4. ...
      3. ...
      Test bundle downloads:

      @brianchandotcom
      Copy link
      Owner

      Merged. Thank you.

      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.

      3 participants