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-48899 Add CX and Fragment types to app table #6237

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

CalebJamesH
Copy link
Collaborator

@CalebJamesH CalebJamesH commented Feb 26, 2025

@liferay-continuous-integration
Copy link
Collaborator

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

If your code changes were already tested in another pull, reference that pull in this pull so the test results can be analyzed.

If your pull was never tested, comment "ci:test" to run the PR Tester for this pull.

@CalebJamesH CalebJamesH changed the title LPD-48899 LPD-48899 Add CX and Fragment types to app table Feb 26, 2025
@CalebJamesH
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

✔️ 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: 26ff042a7230aca438731909c0ff739a4ecaa938

Sender Branch:

Branch Name: LPD-48899-resend-3
Branch GIT ID: 099984c63fc0d3257c9cb2ca70d7c58e4907299d

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

@liferay-continuous-integration
Copy link
Collaborator

@kevenleone
Copy link
Collaborator

ci:stop

@liferay-continuous-integration
Copy link
Collaborator

						<h1>Unable to generate test report.</h1><p>Jenkins encountered the following error while generating test report:</p><pre><code>Sourced file: inline evaluation of: `` 						 							import com.liferay.jenkins.results.parser.Build; 							import co . . . '' : TargetError : at Line: 72 : in file: inline evaluation of: `` 						 							import com.liferay.jenkins.results.parser.Build; 							import co . . . '' : throw e ; 

Target exception: java.lang.NullPointerException: Cannot invoke "String.equals(Object)" because "stableJobResult" is null

Base Branch:

Branch Name: master

Branch GIT ID: 26ff042a7230aca438731909c0ff739a4ecaa938

Job Summary:

Job Link: test-portal-acceptance-pullrequest(master)

For more details click here.

@liferay-continuous-integration
Copy link
Collaborator

@CalebJamesH CalebJamesH added the Frontend Indicates the PRs made by Solutions' frontend team label Feb 26, 2025
@kevenleone
Copy link
Collaborator

Just starting reviewing :)

@CalebJamesH CalebJamesH force-pushed the LPD-48899-resend-3 branch 3 times, most recently from b054cd3 to 66a8b63 Compare February 28, 2025 14:08
@CalebJamesH CalebJamesH force-pushed the LPD-48899-resend-3 branch 2 times, most recently from 86ab2f3 to 0d81aea Compare February 28, 2025 14:48
@CalebJamesH
Copy link
Collaborator Author

ci:test:sf

@CalebJamesH
Copy link
Collaborator Author

ci:test:relevant

@CalebJamesH
Copy link
Collaborator Author

ci:test:stable

@liferay-continuous-integration
Copy link
Collaborator

❌ ci:test:sf - 0 out of 1 jobs passed in 6 minutes

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 55d8c2f17994f074d988d0d80d66c6adc55a5949

Sender Branch:

Branch Name: LPD-48899-resend-3
Branch GIT ID: 0d81aea48d99350f4eb67a5bcc7385880c34cae7

0 out of 1jobs PASSED
For more details click here.
     [exec] > Task :packageRunCheckFormat
     [exec] yarn run v1.13.0
     [exec] \$ node-scripts check:ci
     [exec] 
     [exec] ?????? Running preflight checks...
     [exec] 
     [exec] ?????? Checking outdated tsconfig.json files ...
     [exec] 
     [exec] ?????? Running TypeScript checks on modified files...
     [exec] ?????? A total of 8 CPUs were detected: launching tsc using 8 workers
     [exec] 
     [exec] ?????? Running format checks on modified files...
     [exec] Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.
     [exec]    /opt/dev/projects/github/liferay-portal/workspaces/liferay-marketplace-workspace/client-extensions/liferay-marketplace-custom-element/src/pages/CustomerDashboard/pages/Apps/App/Licenses/Licenses.tsx
     [exec]      1:1  error  File has format errors.  (format check)
     [exec]    
     [exec]    ??? 1 problem (1 error, 0 warnings)
     [exec]    
     [exec]    
     [exec] ??? CI checks failed.
     [exec] error Command failed with exit code 1.
     [exec] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
     [exec] 
     [exec] > Task :packageRunCheckFormat FAILED
     [exec] Gradle build finished at 2025-02-28 15:41:51.695.
     [exec] 
     [exec] 
     [exec] FAILURE: Build failed with an exception.
     [exec] 
     [exec] * What went wrong:
     [exec] Execution failed for task ':packageRunCheckFormat'.
     [exec] > Process 'command '/opt/dev/projects/github/liferay-portal/build/node/bin/node'' finished with non-zero exit value 1
     [exec] 
     [exec] * Try:
     [exec] > Run with --info or --debug option to get more log output.
     [exec] > Run with --scan to get full insights.
     [exec] > Get more help at https://help.gradle.org.
     [exec] 
     [exec] * Exception is:
     [exec] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':packageRunCheckFormat'.
     [exec]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda\$executeIfValid\$1(ExecuteActionsTaskExecuter.java:148)
     [exec]   at org.gradle.internal.Try\$Failure.ifSuccessfulOrElse(Try.java:282)
     [exec]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:146)

@liferay-continuous-integration
Copy link
Collaborator

@CalebJamesH
Copy link
Collaborator Author

ci:test:sf

@CalebJamesH
Copy link
Collaborator Author

ci:test:stable

@CalebJamesH
Copy link
Collaborator Author

ci:test:relevant

@liferay-continuous-integration
Copy link
Collaborator

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

Click here for more details.

Base Branch:

Branch Name: master
Branch GIT ID: 55d8c2f17994f074d988d0d80d66c6adc55a5949

Sender Branch:

Branch Name: LPD-48899-resend-3
Branch GIT ID: 5fbc137a4c9c8fa85c8718ea1c15d1f9155d19c6

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

@liferay-continuous-integration
Copy link
Collaborator

Copy link
Collaborator

@kevenleone kevenleone left a comment

Choose a reason for hiding this comment

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

@CalebJamesH looks really nice, I left a comment to update some types

SOLUTIONS7 = 'SOLUTIONS7',
SOLUTIONS30 = 'SOLUTIONS30',
}

export const ORDER_TYPES_LABELS: {[key: string]: string} = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

No need to add the type since is automatically inferred here, what could be done is to add the as const to add the real keys and values as type

Suggested change
export const ORDER_TYPES_LABELS: {[key: string]: string} = {
export const ORDER_TYPES_LABELS = {

[ORDER_TYPES.FRAGMENT]: 'Fragment',
[ORDER_TYPES.SOLUTIONS7]: 'Solutions 7',
[ORDER_TYPES.SOLUTIONS30]: 'Solutions 30',
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably the best option

Suggested change
};
} as const;

Comment on lines +13 to +18
export const ProductTypeLabels: {[key: string]: string} = {
[ProductType.CLIENT_EXTENSION]: 'Client Extension',
[ProductType.CLOUD]: 'Cloud',
[ProductType.DXP]: 'DXP',
[ProductType.FRAGMENT]: 'Fragment',
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
export const ProductTypeLabels: {[key: string]: string} = {
[ProductType.CLIENT_EXTENSION]: 'Client Extension',
[ProductType.CLOUD]: 'Cloud',
[ProductType.DXP]: 'DXP',
[ProductType.FRAGMENT]: 'Fragment',
};
export const ProductTypeLabels = {
[ProductType.CLIENT_EXTENSION]: 'Client Extension',
[ProductType.CLOUD]: 'Cloud',
[ProductType.DXP]: 'DXP',
[ProductType.FRAGMENT]: 'Fragment',
} as const;

Comment on lines +8 to +14
const productTypeERC: {[key: string]: {}} = {
[ProductType.CLIENT_EXTENSION]: {externalReferenceCode: 'CLIENT_EXTENSION'},
[ProductType.CLOUD]: {externalReferenceCode: 'CLOUDAPP'},
[ProductType.DXP]: {externalReferenceCode: 'DXPAPP'},
[ProductType.FRAGMENT]: {externalReferenceCode: 'FRAGMENT'},
};

Copy link
Collaborator

Choose a reason for hiding this comment

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

Prevent redundancy

Suggested change
const productTypeERC: {[key: string]: {}} = {
[ProductType.CLIENT_EXTENSION]: {externalReferenceCode: 'CLIENT_EXTENSION'},
[ProductType.CLOUD]: {externalReferenceCode: 'CLOUDAPP'},
[ProductType.DXP]: {externalReferenceCode: 'DXPAPP'},
[ProductType.FRAGMENT]: {externalReferenceCode: 'FRAGMENT'},
};
const productTypeERC = {
[ProductType.CLIENT_EXTENSION]: 'CLIENT_EXTENSION',
[ProductType.CLOUD]: 'CLOUDAPP',
[ProductType.DXP]: 'DXPAPP',
[ProductType.FRAGMENT]: 'FRAGMENT',
} as const;

Comment on lines +18 to +21
return (
(productTypeERC[productSpecification] as OrderType) ||
({externalReferenceCode: 'NOTYPE'} as OrderType)
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return (
(productTypeERC[productSpecification] as OrderType) ||
({externalReferenceCode: 'NOTYPE'} as OrderType)
);
return {externalReferenceCode: productTypeERC[productSpecification] || 'NOTYPE'}));

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.

4 participants