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

docs(dr): propose changes to aliasfy package #1418

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

azlam-abdulsalam
Copy link
Contributor

@azlam-abdulsalam azlam-abdulsalam commented Oct 9, 2023

Add a DR proposing change to aliasfy package to eliminate redundancy

Summary generated by Reviewpad on 09 Oct 23 02:47 UTC

This pull request proposes changes to the aliafy package in order to eliminate redundancy. The current implementation of aliasified packages introduces redundancy by duplicating the contents of the 'default' directory across multiple environment-specific directories. The proposed solution is to introduce a layer of inheritance for aliasified packages, where the contents in the 'default' directory will be merged with the contents in the <alias> directory if an alias is matched. By implementing this inheritance mechanism, the PR aims to reduce redundancy, simplify maintenance, and minimize the scope for errors.

Checklist

All items have to be completed before a PR is merged

  • Adhere to Contribution Guidelines
  • Updates to Decision Records considered?
  • Updates to documentation at DX@Scale Guide considered?
  • Tested changes?
  • Unit Tests new and existing passing locally?

Add a DR proposing change to aliasfy package to eliminate redundancy
@reviewpad reviewpad bot requested a review from Rocko1204 October 9, 2023 02:47
@reviewpad reviewpad bot added small Pull request is small waiting-for-review docs labels Oct 9, 2023
@reviewpad
Copy link

reviewpad bot commented Oct 9, 2023

Reviewpad Report

⚠️ Warnings

  • Please link an issue to the pull request

@azlam-abdulsalam azlam-abdulsalam changed the title docs(dr): propose changes to aliafy package docs(dr): propose changes to aliasfy package Oct 9, 2023
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (077009f) 46.80% compared to head (c66998b) 46.80%.

❗ Current head c66998b differs from pull request most recent head e9e918f. Consider uploading reports for the commit e9e918f to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1418   +/-   ##
=======================================
  Coverage   46.80%   46.80%           
=======================================
  Files          70       70           
  Lines        2662     2662           
  Branches      302      302           
=======================================
  Hits         1246     1246           
  Misses       1414     1414           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- If neither is found, an error will be thrown.


- To ensure the changes do not disrupt exising users of the aliasfy feature, this enhanced aliasfy package feature has to be explictly enabled as 'aliasfyv2'in the sfdx-project.json
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we do it the other way around? as in you need to specify V1 if you want to remain on the current thing, so that in the future we can just deprecate V1 without having to maintain this flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like that idea, but that means if the users don't see the announcement, they might inadvertently deploy 'default' components into production.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @azlam-abdulsalam . We have to be backward compatible. I bet most of the org user :latest image (like we at K).

I would suggest being more specific on the name of this enhancement as it provides certain features, not many - inheritance.

Options:

  • alisifiedInheritence
  • aliasfyInheritence
  • enableAlisifiedInheritence
  • enableAlisifyInheritence

Copy link
Contributor Author

Choose a reason for hiding this comment

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

or may be better, we treat it as a default behaviour for all package? @ruslan-kurchenko @rody , if it sees an aliasified folder, it will start doing this behaviour across any source package

Copy link
Contributor

Choose a reason for hiding this comment

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

@azlam-abdulsalam when you refer to all packages, do you mean that some repos would have like a core-crm source package folder and within that have specific dev, sit, uat alias packages inside that package?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@crazynammer that's correct, any packages can have env specific overrides, but at the same time, this idea of aliasified envs is conflicting with our notion of detaching tests from dedicated environments,

@ruslan-kurchenko
Copy link
Contributor

Great enhancement. We recently talked about it with the team as we started to accumulate so many env variables that we need to maintain.

@dieffrei-psignite
Copy link

Nice!!

@pogilvieCB
Copy link

This a a great idea!

Copy link
Contributor

@crazynammer crazynammer left a comment

Choose a reason for hiding this comment

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

I like the idea. We'll just have to keep track of all the toggles for aliasfyv2 in the documentation and any other items like this in the future roadmap.

- If neither is found, an error will be thrown.


- To ensure the changes do not disrupt exising users of the aliasfy feature, this enhanced aliasfy package feature has to be explictly enabled as 'aliasfyv2'in the sfdx-project.json
Copy link
Contributor

Choose a reason for hiding this comment

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

@azlam-abdulsalam when you refer to all packages, do you mean that some repos would have like a core-crm source package folder and within that have specific dev, sit, uat alias packages inside that package?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants