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

Delta package on detached head contains extra components from the target branch #320

Closed
1 task
bru-naka opened this issue Jul 21, 2022 · 3 comments
Closed
1 task
Assignees
Labels
question Further information is requested

Comments

@bru-naka
Copy link

Issue verification check:

  • is the current repository fully deployable at the commit SHA provided with the 'from' parameter of the command?

What is the problem?


Running SGD on a docker container in gitlab, the pipeline is triggered on a Merge Request from feature branches to validate the components getting merged into develop branch. The delta is being calculated from lastTag on develop, to HEAD (detached).
If the develop branch has new commits (and tags), and its ahead of feature branch, running the delta causes the output to contain components from the develop branch that have not been modified on the feature branch.
I'm not sure if this is an issue or if it should behave like this - any help is appreciated.

What is the parameter and the value you used with it?

sfdx sgd:source:delta -a $SF_API_VERSION --from $latestTag --to HEAD --output $CI_PROJECT_DIR/build-files/ --generate-delta -i .dx-delta-ignore

What is the expected result?

Only files that have been modified should be added to the delta package.

What is the actual result?

Delta package contains files modified in source branch AND target branch, if target is ahead of source.

Steps to reproduce


  • develop branch HEAD with tag T1
  • feature-test branches out of develop
  • commits happen in both feature and develop branches (separate developments, different files modified) - new develop tag T2
  • on merge request, run delta from HEAD (feature) to T2
  • delta contains files that were modified on develop branch

Execution context


Operating System:
#1 SMP PREEMPT Thu Mar 17 17:05:54 UTC 2022

yarn version:
1.22.19

node version:
v18.6.0

git version:
git version 2.30.2

sfdx version:
sfdx-cli/7.159.0 linux-x64 node-v18.6.0

sgd plugin version:
sfdx-git-delta 5.3.0

More information (optional)


@bru-naka bru-naka added the bug Something isn't working label Jul 21, 2022
@bru-naka bru-naka changed the title Delta package on detached head contains extra components from the source branch Delta package on detached head contains extra components from the target branch Jul 21, 2022
@scolladon scolladon added question Further information is requested and removed bug Something isn't working labels Jul 21, 2022
@scolladon
Copy link
Owner

scolladon commented Jul 21, 2022

Hi @sfdcbruno,

Thanks for raising this question !

I think what you want is to get the content of your branch compared to its ancestor point (without containing what has been merged into your base branch) after your branch has been created.

There was a previous question with the same requirement here that made us update the README to explain how to do this using git

@bru-naka
Copy link
Author

Thank you @scolladon! This is exactly what I needed, works like a charm!

@scolladon
Copy link
Owner

Glad to help!

Enjoy incremental deployment!

I can see you are using a docker container to host sfdx-cli and sgd I guess.
I know some other people in our community are having trouble to run sgd inside docker.
They mainly have a successful installation of the plugin (or a silent failure), but when they list the installed plugin sgd does not appear.

Could you open a discussion in this repo and explain how you use sgd inside docker please ? I think it could be very helpful to everyone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants