This repository has been archived by the owner on Mar 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(dr): propose changes to aliafy package
Add a DR proposing change to aliasfy package to eliminate redundancy
- Loading branch information
1 parent
077009f
commit e9e918f
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
decision records/deployments/003-aliasfy-eliminate-redundancy.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Eliminating Redundancy in Aliasified Source and Data Packages | ||
|
||
* Status: Proposed | ||
* Deciders: Azlam, Vu, Zhebin | ||
* Date: | ||
|
||
## Context and Problem Statement | ||
|
||
The current implementation of aliasified packages in sfpowerscripts supports a 'default' directory and environment-specific directories (e.g., `dev`, `sit`, `st`). While this structure ensures flexibility, it introduces redundancy. The contents of the 'default' directory often have to be duplicated across multiple environment-specific directories. This leads to increased maintenance complexity and greater risk of errors. | ||
|
||
Existing Structure: | ||
|
||
``` | ||
src-env-specific-alias-post | ||
└── main | ||
├── default | ||
| └── <contents> | ||
├── dev | ||
│ └── <contents> | ||
├── sit | ||
│ └── <contents> | ||
└── st | ||
└── <contents> | ||
``` | ||
|
||
## Decision | ||
|
||
To alleviate the redundancy and error-prone nature of the current approach, the proposal is to introduce a layer of inheritance for aliasified packages. | ||
|
||
Revised Structure: | ||
|
||
``` | ||
src-env-specific-alias-post | ||
└── main | ||
├── default | ||
| └── <base_contents> | ||
├── dev | ||
│ └── <override_contents> | ||
├── sit | ||
│ └── <override_contents> | ||
└── st | ||
└── <override_contents> | ||
``` | ||
|
||
- sfpowerscripts will continue to try to match the `alias` as it does today. | ||
- If an alias matches, the contents in the `<alias>` directory will be merged with the contents in the `default` directory. | ||
- If there's a conflict, the `<alias>` directory takes precedence. | ||
- If the alias isn't found, it will fall back to the `default` directory. | ||
- 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 | ||
|
||
|
||
By implementing this inheritance mechanism, we reduce redundancy, simplify maintenance, and minimize the scope for errors. |