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

Profiles required on HDD when packaging, despite their existence in .forceignore #341

Closed
triestelaporte opened this issue Mar 13, 2020 · 4 comments
Labels
area:packaging owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team.

Comments

@triestelaporte
Copy link

I had some automatically created profiles surf down into my IDE from a SO, I didn't want these in a package, so very early on in the project I added this to my .forceignore:

force-app/main/default/profiles/Admin.profile
force-app/main/default/profiles/Custom%3A Marketing Profile.profile
force-app/main/default/profiles/Custom%3A Sales Profile.profile
force-app/main/default/profiles/Custom%3A Support Profile.profile
force-app/main/default/profiles/authtest Profile.profile

I was tired of seeing the files on my hard drive, so this morning I deleted them, knowing they were not packaged anyway.

Verified by examining all existing versions of package, none include the profiles

well, after I cleaned up my drive, I tried to make a new version, and I got this:

"message": "We couldn't create this package version because new components were added or existing components were deleted. Add components {Profile=[Custom%3A Support Profile, Custom%3A Marketing Profile, Admin, Custom%3A Sales Profile, authtest Profile]} back into the package version, and create the package version again.",

so I went back through my local history and grabbed the profiles, put them back and I ran the exact same command

"Status": "Success",

examine package after this, still does not contain profiles, as expected

@triestelaporte
Copy link
Author

I think the profiles snuck into a version of the package at some point, but we set up ancestry to the previous version and killed the one that had the profiles once upon a time.

@shetzel shetzel transferred this issue from forcedotcom/sfdx-core Mar 13, 2020
@eblazer
Copy link

eblazer commented May 18, 2023

This strategy works through 7.200.4. It appears that even though these profiles are included in the .forceignore file, they are still included in the package.xml sent to Salesforce but not actually packaged.

However starting with 7.200.5, my builds fail because they are now not included in the package.xml sent to Salesforce.

@preddivari preddivari added the owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. label Sep 21, 2023
@github-actions
Copy link

We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.

@shetzel
Copy link
Contributor

shetzel commented Oct 4, 2023

I believe this issue is now fixed and is similar to several newer issues such as:
#620
#2336

Profiles are searched within all package directories defined in sfdx-project.json. .forceignore does not apply in this search, which is by design. Only aspects of the profiles that are relevant to the metadata being packaged are used.

@shetzel shetzel closed this as completed Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:packaging owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team.
Projects
None yet
Development

No branches or pull requests

5 participants