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

Orchestrator should ignore packageDirectories without a "package" attribute #842

Closed
rody opened this issue Feb 16, 2022 · 1 comment
Closed
Assignees
Labels
enhancement enhancement to existing feature

Comments

@rody
Copy link
Contributor

rody commented Feb 16, 2022

Orchestrator requires all packageDirectories in the sfdx-project.json to be declared as packages (i.e. it requires package and versionNumber attributes).

Salesforce DX allows to declare directories that are not packages. This is quite useful when you want to have a specific path for the metadata that you pull from a Scratch Org.

To Reproduce
Add the following to the packageDirectories in sfdx-project.json:

{
  "path": "tmp",
  "default": true
}

and run sfdx sfpowerscripts:orchestrator:build

It results in the following error

ERROR running sfpowerscripts:orchestrator:build:  The sfdx-project.json is invalid, Please fix the following errors

1: /packageDirectories/2: must have required property 'package' {
    "missingProperty": "package"
}
2: /packageDirectories/2: must have required property 'versionNumber' {
    "missingProperty": "versionNumber"

Expected behavior
The tmp packageDirectory is ignored from the list of packages to create (because it does not have a package or versionNumber attribute). The other packages are built.
Optionally a info message could be displayed saying that the directory is ignored because it's not a package.

Implementation note: If package is present but not versionNumber (and vice-versa), then sfpowerscripts should fail with an error message, since the package definition is incomplete.

@azlam-abdulsalam azlam-abdulsalam self-assigned this Feb 16, 2022
@azlam-abdulsalam azlam-abdulsalam added the enhancement enhancement to existing feature label Feb 16, 2022
@azlam-abdulsalam azlam-abdulsalam added this to the Release - April 2022 milestone Feb 16, 2022
@azlam-abdulsalam
Copy link
Contributor

Thanks @rody for raising this. Will try to add this as part of April's release

sfpowerscripts-release automation moved this from To do to Done Jun 14, 2022
sfpowerscripts-roadmap automation moved this from Now to Delivered Jun 14, 2022
azlam-abdulsalam pushed a commit that referenced this issue Jun 16, 2022
…ckages

Add support for unpackaged metadata. This was removed as sfpowerscripts do parallel development and
working directory didnt copy the unpackaged directory. Support is added to copy unpackaged directory
and copy the folder to appropriate working directory. sfdx-project.json is then aligned for
sucessful preparation of the package. The unpackaged is a package directory and it will be upto the
user to determine the behaviour during validate,prepare or deploy. This along with changes in #842
which will skip the directories

fix #958
azlam-abdulsalam added a commit that referenced this issue Jun 16, 2022
…ckages (#1056)

* feat(sfp-package): add support for unpackaged metadata in unlocked packages

Add support for unpackaged metadata. This was removed as sfpowerscripts do parallel development and
working directory didnt copy the unpackaged directory. Support is added to copy unpackaged directory
and copy the folder to appropriate working directory. sfdx-project.json is then aligned for
sucessful preparation of the package. The unpackaged is a package directory and it will be upto the
user to determine the behaviour during validate,prepare or deploy. This along with changes in #842
which will skip the directories

fix #958

* fix(logs): remove temporary logs
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement enhancement to existing feature
Development

No branches or pull requests

2 participants