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

Undocumented behavior: Aliasified packages fail to deploy to Production when there is no "prod" folder #119

Open
thraco opened this issue Sep 18, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@thraco
Copy link

thraco commented Sep 18, 2024

Describe the bug
When an aliasified package is deployed to Prod, it fails if it does not contain a prod-specific folder. The Prod deployment does not use the default package.

To Reproduce
Steps to reproduce the behavior:

  • Create an aliasified package without a "prod" folder, but with a "default" folder
  • Attempt to deploy the aliasified package to a Production environment

Per the logs, the default folder is selected, but the deployment fails. The error message received is Error: Aliasfied package 'redhatcrm-loyalty-mgmt-env-specific' does not have an alias with 'prod' or 'default' directory, which is inaccurate, as this package does have a default directory, as shown in the screenshot below.

On reviewing the documentation, I can find no mention of this behavior, but it's clearly specified in the code (

if (orgDetails.isSandbox) {
// If the target org is a sandbox, find a 'default' directory to use as package directory
aliasDir = files.find(
(file) =>
path.basename(file) === 'default' &&
fs.lstatSync(path.join(searchDirectory, file)).isDirectory()
);
}
}
if (!aliasDir) {
throw new Error(
`Aliasfied package '${this.sfpPackage.packageName}' does not have an alias with '${alias}' or 'default' directory`
);
}
).

Expected behavior

  • Documentation and error messaging match the behavior of the application.

Screenshots
Screenshot from 2024-09-18 09-42-16

Platform Details (please complete the following information):

  • OS: Ubuntu 22.04.4 LTS
  • Version: 39.1.0
  • Salesforce CLI(sfdx cli) Version: 2.49.7
  • CI Platform: GitHub Actions
@azlam-abdulsalam azlam-abdulsalam added bug Something isn't working and removed analysis labels Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants