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

LPS-195155 Implement saving of FDS item actions in DSM #3639

Closed
wants to merge 5 commits into from

Conversation

markocikos
Copy link
Collaborator

@markocikos markocikos commented Sep 5, 2023

References

What is the goal of this PR?

We are implementing persistence for FDS Actions, UI to save and reorder FDS Actions, and doing some minor improvements on the way.

See technical notes inline.

TODO in a separate task:

  • we could have icon instead of icon name in Icon field in the orderable table.
  • we could have localized Type in the orderable table.

What does it look like?

vokoscreenNG-2023-09-11_11-36-36.mp4

@liferay-continuous-integration
Copy link
Collaborator

CI is automatically triggering the following test suites:

  •     ci:test:relevant
  •     ci:test:sf

@liferay-continuous-integration
Copy link
Collaborator

✔️ 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: e2734632486accdb4ef0ea2df712365c77e85932

Sender Branch:

Branch Name: LPS-195155
Branch GIT ID: 761de1b7738fbe2fafbe795a182727029012cdce

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

@liferay-continuous-integration
Copy link
Collaborator

@liferay-continuous-integration
Copy link
Collaborator

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

❌ ci:test:relevant - 261 out of 280 jobs passed in 2 hours 34 minutes

Click here for more details.

This pull is eligible for reevaluation. When this upstream build has completed, using the following CI command will compare this pull request result against a more recent upstream result:

ci:reevaluate:1407401_5776

Base Branch:

Branch Name: master
Branch GIT ID: e2734632486accdb4ef0ea2df712365c77e85932

Upstream Comparison:

Branch GIT ID: 7b59b646e9940eb948022c184f2ae57c14b46b51
Jenkins Build URL: EE Development Acceptance (master) - 4798 - 2023-09-05[00:40:06]

ci:test:stable - 30 out of 30 jobs PASSED
30 Successful Jobs:
    ci:test:relevant - 261 out of 280 jobs PASSED

    19 Failed Jobs:

    261 Successful Jobs:
      For more details click here.

      Failures unique to this pull:

      1. ...
      Test bundle downloads:

      @liferay-continuous-integration
      Copy link
      Collaborator

      ObjectField objectField = ObjectFieldUtil.createObjectField(
      ObjectFieldConstants.BUSINESS_TYPE_TEXT,
      ObjectFieldConstants.DB_TYPE_STRING, true, false, null, label, name,
      false);
      Copy link
      Collaborator Author

      Choose a reason for hiding this comment

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

      "required", the last argument, is hardcoded to false. If it is not, Objects backend API will throw an error.

      Comment on lines +402 to +392
      notOrdered = storedFDSSorts.filter(
      (filter) => !fdsSortsOrderArray.includes(String(filter.id))
      );
      Copy link
      Collaborator Author

      Choose a reason for hiding this comment

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

      This is a bugfix of a case I found by accident. It is possible that the ordered CSV contains a lot of values, and a smaller amount of saved value(s) are not in it. This happens when you delete items externally.

      Steps:

      1. Create few actions in DSM UI.
      2. Save in any order.
      3. Delete all action items through published "FDS Action" Objects page.
      4. Create an item in DSM UI.

      What happens:

      • New item is not displayed. Length check in this line does not include it.

      I applied all ordering fixes to Sorts, Filters and Actions.

      }

      setFDSSorts([...ordered, ...notOrdered]);
      setFDSSorts([...notOrdered, ...ordered]);
      Copy link
      Collaborator Author

      @markocikos markocikos Sep 6, 2023

      Choose a reason for hiding this comment

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

      I'm placing unordered before ordered here, to ensure new items are on top.

      @@ -376,14 +376,12 @@ const Sorting = ({
      useEffect(() => {
      const getFDSSort = async () => {
      const response = await fetch(
      `${API_URL.FDS_VIEWS}/${fdsView.id}?nestedFields=${OBJECT_RELATIONSHIP.FDS_VIEW_FDS_SORT}`
      `${API_URL.FDS_SORTS}?filter=(${OBJECT_RELATIONSHIP.FDS_VIEW_FDS_SORT_ID} eq '${fdsView.id}')&nestedFields=${OBJECT_RELATIONSHIP.FDS_VIEW_FDS_SORT}&sort=dateCreated:desc`
      Copy link
      Collaborator Author

      @markocikos markocikos Sep 6, 2023

      Choose a reason for hiding this comment

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

      I'm adding sort by creation date, to put the newest unordered item first.

      Also, I'm using exact resource endpoint, that supports sorting, pagination etc.

      Comment on lines -287 to -326
      <ClayForm.Group>
      <label htmlFor="headlessActionKeyInput">
      {Liferay.Language.get(
      Copy link
      Collaborator Author

      @markocikos markocikos Sep 6, 2023

      Choose a reason for hiding this comment

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

      I'm removing this whole form group, because the headless action key is not in the line action type.

      const confirmationMessageFormElementId = `${namespace}ConfirmationMessage`;
      const confirmationMessageTypeFormElementId = `${namespace}ConfirmationMessageType`;

      const ConfirmationMessageRow = () => (
      Copy link
      Collaborator Author

      @markocikos markocikos Sep 6, 2023

      Choose a reason for hiding this comment

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

      Buying space. No state in this component, so we should be safe.

      Copy link
      Collaborator

      Choose a reason for hiding this comment

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

      I spent quite some time debugging this, but abstracting the row into this component bugged the InputLocalized component inside it, so I will be removing this abstraction in a follow-up. cc @dsanz this is the thing we talked about on friday

      @markocikos
      Copy link
      Collaborator Author

      One dependency merged, one to go.

      @markocikos
      Copy link
      Collaborator Author

      I added two commits to PR, one applying new toast utils throughout DSM, and another with minor style fixes. I don't plan on adding any additional changes. As soon as the spritemap PR is merged, I'll set this as ready for review.

      @liferay-continuous-integration
      Copy link
      Collaborator

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

      ❌ ci:test:relevant - 255 out of 276 jobs passed in 2 hours 45 minutes

      Click here for more details.

      Base Branch:

      Branch Name: master
      Branch GIT ID: d7210e871573904fcf486a55af02f57f5a2d2c74

      Upstream Comparison:

      Branch GIT ID: d7210e871573904fcf486a55af02f57f5a2d2c74
      Jenkins Build URL: EE Development Acceptance (master) - 7 - 2023-09-11[15:19:48]

      ci:test:stable - 30 out of 30 jobs PASSED
      30 Successful Jobs:
        ci:test:relevant - 255 out of 276 jobs PASSED

        21 Failed Jobs:

        255 Successful Jobs:
          For more details click here.

          Failures unique to this pull:

          1. functional-tomcat90-mysql57-chrome100-jdk8/5/18
                 [exec] * What went wrong:
                 [exec] 
                 [exec] See the profiling report at: file:///opt/dev/projects/github/liferay-portal/portal-web/build/reports/profile/profile-2023-09-12-03-49-56.html
                 [exec] A fine-grained performance profile is available: use the --scan option.
                 [exec] 
                 [exec] Execution failed for task ':writePoshiProperties'.
                 [exec] > Process 'command '/opt/java/jdk1.8.0_121-x64/bin/java'' finished with non-zero exit value 1
                 [exec] 
                 [exec] * Try:
                 [exec] > Run with --stacktrace option to get the stack trace.
                 [exec] > Run with --info or --debug option to get more log output.
                 [exec] > Run with --scan to get full insights.
                 [exec] 
                 [exec] * Get more help at https://help.gradle.org
                 [exec] 
                 [exec] BUILD FAILED in 7m 29s
                 [exec] Result: 1
                 [echo] The following error occurred while executing this line:
                 [echo] /opt/dev/projects/github/liferay-portal/build-test-batch.xml:5383: The following error occurred while executing this line:
                 [echo] /opt/dev/projects/github/liferay-portal/build-test-batch.xml:1742: The following error occurred while executing this line:
                 [echo] /opt/dev/projects/github/liferay-portal/build-test.xml:15007: Warning: Could not find file /opt/dev/projects/github/liferay-portal/portal-web/test.generated.properties to copy.
            

            record-testray-logs:
            [beanshell] Unable to delete because file does not exist /opt/dev/projects/github/liferay-jenkins-ee/testray/prepared_rsync_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/1046139631.txt
            [beanshell] Executing commands: git remote -v
            [beanshell] Found Git remotes: github-dev, origin, upstream
            [beanshell] Remote execution starting with 1 threads.
            [beanshell] Executing commands: ssh -o NumberOfPasswordPrompts=0 root@test-1-17 'mkdir -p "/mnt/mfs-hdd1-10.0.10/jenkins/testray-results/production/logs/2023-09/test-1-30/test-portal-acceptance-pullrequest(master)/7791/functional-tomcat90-mysql57-chrome100-jdk8/5/18"'
            [beanshell] Average thread duration: 388ms
            [beanshell] Busy slaves:0
            [beanshell] Finished slaves:1
            [beanshell] Target slaves:1
            [beanshell] Total duration: 389
            [beanshell] Remote execution completed in 389ms.
            [beanshell] Remote execution starting with 1 threads.

            1. ...
          2. semantic-versioning-jdk8/0/0
                 [exec] > Task :dxp:apps:multi-factor-authentication:multi-factor-authentication-ip-address-impl:compileJava FAILED
            [exec]
            [exec] > Task :dxp:apps:commerce:commerce-organization-web:packageRunBuild
            [exec] Bundling took 30s
            [exec]
            [exec] > Task :dxp:apps:commerce:commerce-shop-by-diagram-web:packageRunBuild
            [exec] Bundling took 30s
            [exec]
            [exec] > Task :dxp:apps:document-library-opener:document-library-opener-onedrive-web:jar
            [exec] warning: Unused Import-Package instructions: [org.brotli., org.tukaani.]
            [exec] warning: Classes found in the wrong directory: {META-INF/versions/9/module-info.class=module-info}
            [exec]
            [exec] > Task :dxp:apps:document-library-opener:document-library-opener-onedrive-web:autoUpdateXml SKIPPED
            [exec]
            [exec] > Task :dxp:apps:commerce:commerce-organization-web:packageRunBuild
            [exec] Minification summary:
            [exec] Files processed: 751
            [exec] Files with errors: 547
            [exec] Before size: 2476420
            [exec] After size: 1659533
            [exec] Delta: 816887
            [exec] Elapsed: 6.88
            [exec] BUILD SASS: Built build/node/packageRunBuild/resources/.sass-cache/style/main.css
            [exec] Received 0
            [exec] Done in 43.97s.
            [exec]
            [exec] > Task :dxp:apps:commerce:commerce-shop-by-diagram-web:packageRunBuild
            [exec] Minification summary:
            [exec] Files processed: 751
            [exec] Files with errors: 547
            [exec] Before size: 2506431
            [exec] After size: 1679878
            [exec] Delta: 826553
            [exec] Elapsed: 6.47
            [exec] BUILD SASS: Built build/node/packageRunBuild/resources/.sass-cache/css/diagram.css
            [exec] BUILD SASS: Built build/node/packageRunBuild/resources/.sass-cache/css/shop-by-diagram-edit-page.css
            [exec] Received 0
            [exec] Done in 42.06s.
            [exec] Gradle build finished at 2023-09-12 11:55:27.227.
            [exec]
            [exec] Execution optimizations have been disabled for 2 invalid unit(s) of work during this build to ensure correctness.
            [exec] Please consult deprecation warnings for more details.
            [exec] 5461 actionable tasks: 5392 executed, 69 up-to-date
            [exec]
            [exec]
            [exec] FAILURE: Build failed with an exception.
            [exec]
            [exec] * What went wrong:
            1. com.liferay.jenkins.Jenkins

          Failures in common with acceptance upstream results at d7210e8:
          1. ...
          Test bundle downloads:

          @liferay-continuous-integration
          Copy link
          Collaborator

          @markocikos
          Copy link
          Collaborator Author

          ci:forward

          @liferay-continuous-integration
          Copy link
          Collaborator

          CI is automatically triggering the following test suites:

          •     ci:test:relevant
          •     ci:test:sf
          •     ci:test:stable

          The pull request will automatically be forwarded to the user brianchandotcom If the following test suites pass:

          •     ci:test:relevant
          •     ci:test:sf
          •     ci:test:stable

          @liferay-continuous-integration
          Copy link
          Collaborator

          Skipping previously passed test suites:

          • ci:test:sf
          • ci:test:stable

          @JerryAdrianoo
          Copy link

          Hey @markocikos these failures are not related to your changes!
          Testray Comparison.

          @liferay-continuous-integration
          Copy link
          Collaborator

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

          ❌ ci:test:relevant - 255 out of 275 jobs passed in 1 hour 56 minutes

          Click here for more details.

          Base Branch:

          Branch Name: master
          Branch GIT ID: d7210e871573904fcf486a55af02f57f5a2d2c74

          Upstream Comparison:

          Branch GIT ID: d7210e871573904fcf486a55af02f57f5a2d2c74
          Jenkins Build URL: EE Development Acceptance (master) - 7 - 2023-09-11[15:19:48]

          ci:test:stable - 30 out of 30 jobs PASSED
          30 Successful Jobs:
            ci:test:relevant - 255 out of 275 jobs PASSED

            20 Failed Jobs:

            255 Successful Jobs:
              For more details click here.

              Failures unique to this pull:


              Failures in common with acceptance upstream results at d7210e8:
              1. ...
              Test bundle downloads:

              @liferay-continuous-integration
              Copy link
              Collaborator

              @markocikos
              Copy link
              Collaborator Author

              ci:forward:force

              @liferay-continuous-integration
              Copy link
              Collaborator

              CI is automatically triggering the following test suites:

              •     ci:test:relevant
              •     ci:test:sf
              •     ci:test:stable

              The pull request will automatically be forwarded to the user brianchandotcom if the following test suites complete:

              •     ci:test:relevant
              •     ci:test:sf
                AND If the following test suites pass:
              •     ci:test:stable

              @liferay-continuous-integration
              Copy link
              Collaborator

              Skipping previously completed test suites:

              • ci:test:relevant
              • ci:test:sf
                AND Skipping previously passed test suites:
              • ci:test:stable

              @liferay-continuous-integration
              Copy link
              Collaborator

              All required test suite(s) completed.
              Forwarding pull request to brianchandotcom.
              Console

              @liferay-continuous-integration
              Copy link
              Collaborator

              Error has occurred while attempting to forward pull request to brianchandotcom. Retrying in 1 minute...
              See console log for detail:Full Console

              1 similar comment
              @liferay-continuous-integration
              Copy link
              Collaborator

              Error has occurred while attempting to forward pull request to brianchandotcom. Retrying in 1 minute...
              See console log for detail:Full Console

              @liferay-continuous-integration
              Copy link
              Collaborator

              Error has occurred while forwarding pull request to brianchandotcom.
              Please try again later or contact the CI team for assistance.
              See console log for details: Full Console

              @markocikos
              Copy link
              Collaborator Author

              Manual forward brianchandotcom#140636

              @markocikos markocikos closed this Sep 13, 2023
              @markocikos markocikos deleted the LPS-195155 branch June 3, 2024 10:01
              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.

              5 participants