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

W-17980476: add functionality to exclude md types from connection resolver #1532

Closed

Conversation

EstebanRomero84
Copy link
Contributor

@EstebanRomero84 EstebanRomero84 commented Mar 28, 2025

What does this PR do?

  • Adds new optional parameter to connectionResolver class. This parameter is used to exclude specific types from the result.
  • Update CSB to pass the list of excluded types to CS. This fixes a bug where components in folders where included in the resulting CB even if they where not included in the list md types to be retrieved.

What issues does this PR fix or reference?

@W-17980476@
forcedotcom/cli#3232

Functionality Before

Calling sf project generate manifest --from-org my-org --name package --excluded-metadata Dashboard --excluded-metadata Report doesn't exclude Dashboard and Report components from the resulting manifest.

Functionality After

Calling sf project generate manifest --from-org my-org --name package --excluded-metadata Dashboard --excluded-metadata Report excludes Dashboard and Report components from the resulting manifest.

@EstebanRomero84 EstebanRomero84 requested a review from a team as a code owner March 28, 2025 15:57

private requestBatchSize: number;

public constructor(connection: Connection, registry = new RegistryAccess(), mdTypes?: string[]) {
public constructor(
Copy link
Member

@WillieRuemmele WillieRuemmele Mar 31, 2025

Choose a reason for hiding this comment

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

I don't love that we're adding another parameter to the constructor. Though it should be a non-breaking change, it still makes me hesitate.

can we do the same logic, but inverting it using mdTypes?

if it's not in mdTypes don't search for, or return it?

or in ComponentSetBuilder, before returning the CS, run it through a filter and remove any of the excluded types?

@EstebanRomero84 EstebanRomero84 deleted the er/exclude-mdtypes-in-connectionResolver branch April 7, 2025 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants