Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Quickbuild - "Invalid time value" - error #697

Closed
azlam-abdulsalam opened this issue Sep 20, 2021 · 0 comments · Fixed by #707
Closed

Quickbuild - "Invalid time value" - error #697

azlam-abdulsalam opened this issue Sep 20, 2021 · 0 comments · Fixed by #707
Assignees
Labels
bug Something isn't working

Comments

@azlam-abdulsalam
Copy link
Contributor

Discussed in https://github.com/Accenture/sfpowerscripts/discussions/696

Originally posted by bjanderson70 September 21, 2021
Problem Statement:
I have a github action that fires when I check-in/commit. There appears to be an invalid time-value passed to getFormattedTime in GetFormattedTime.ts

Suggestions? Short of putting a try/catch around the code ...I have not ventured into the sfdx cli to determine what cause this ... looking for some suggestions in the meantime? TIA

Command: - ran in a github action
sfdx sfpowerscripts:orchestrator:quickbuild -v devhub --diffcheck --buildnumber ${GITHUB_RUN_ID} --branch ${GITHUB_REF#refs/heads/} --json --waittime=60

Error Encountered:

Run sfdx sfpowerscripts:orchestrator:quickbuild -v devhub --diffcheck --buildnumber ${GITHUB_RUN_ID} --branch ${GITHUB_REF#refs/heads/} --json --waittime=60
› Warning: sfdx-cli update available from 7.110.0 to 7.116.2.
-----------sfpowerscripts orchestrator ------------------
command: quickbuild
Build Packages Only Changed: true
Config File Path: config/project-scratch-def.json
Artifact Directory: artifacts

Checking last known tags for cqrs-service to determine whether package is to be built...

Utilizing tag cqrs-service_v1.0.0.1251293990 for cqrs-service
Checking for changes in source directory src/utils/cqrs
Checking for changes to package descriptor in sfdx-project.json
Packages scheduled for build
┌─────────┬────────────────────┬────────────────┐
│ Package │ Reason to be built │ Last Known Tag │
└─────────┴────────────────────┴────────────────┘
No packages found to be built.. Exiting..

{
"status": 1,
"name": "RangeError",
"message": "Invalid time value",
"exitCode": 1,
"commandName": "QuickBuild",
"stack": "RangeError: Invalid time value\n at Date.toISOString ()\n at Object.getFormattedTime [as default] (/sfdx_plugins/.local/share/sfdx/node_modules/@dxatscale/sfpowerscripts/lib/utils/GetFormattedTime.js:6:27)\n at QuickBuild. (/sfdx_plugins/.local/share/sfdx/node_modules/@dxatscale/sfpowerscripts/lib/BuildBase.js:89:171)\n at Generator.next ()\n at fulfilled (/sfdx_plugins/.local/share/sfdx/node_modules/@dxatscale/sfpowerscripts/lib/BuildBase.js:5:58)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\nOuter stack:\n at Function.wrap (/sfdx_plugins/.local/share/sfdx/node_modules/@salesforce/core/lib/sfdxError.js:171:27)\n at QuickBuild.catch (/sfdx_plugins/.local/share/sfdx/node_modules/@dxatscale/sfpowerscripts/node_modules/@salesforce/command/lib/sfdxCommand.js:255:67)\n at processTicksAndRejections (internal/process/task_queues.js:95:5)\n at async QuickBuild._run (/sfdx_plugins/.local/share/sfdx/node_modules/@dxatscale/sfpowerscripts/node_modules/@salesforce/command/lib/sfdxCommand.js:95:13)\n at async Config.runCommand (/usr/lib/node_modules/sfdx-cli/node_modules/@oclif/config/lib/config.js:173:24)\n at async SfdxMain.run (/usr/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/main.js:27:9)\n at async SfdxMain._run (/usr/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/command.js:43:20)\n at async Object.run (/usr/lib/node_modules/sfdx-cli/dist/cli.js:162:47)",
"warnings": []
}
Error: Process completed with exit code 1.

azlam-abdulsalam pushed a commit that referenced this issue Sep 25, 2021
…uilt

Build commands should fail when there is nothing to be built. This requirement was not coded as
intended and was rather working due to an another error being thrown by the time caluclation
function

fix #697
@azlam-abdulsalam azlam-abdulsalam self-assigned this Sep 25, 2021
@azlam-abdulsalam azlam-abdulsalam added the bug Something isn't working label Sep 25, 2021
azlam-abdulsalam added a commit that referenced this issue Sep 27, 2021
…uilt (#707)

Build commands should fail when there is nothing to be built. This requirement was not coded as
intended and was rather working due to an another error being thrown by the time caluclation
function

fix #697

Co-authored-by: azlam-abdulsalam <sfpowerscripts@dxscale>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant