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

On Windows it does not work all the time it seems #134

Closed
1 task
dkadam77 opened this issue Apr 22, 2021 · 8 comments · Fixed by #138
Closed
1 task

On Windows it does not work all the time it seems #134

dkadam77 opened this issue Apr 22, 2021 · 8 comments · Fixed by #138
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@dkadam77
Copy link

Issue verification check :

  • does the current repository is fully deployable at the commit sha given to the from parameter of the command ?

On Windows ..it generates the empty package file (I mean XML without any objects in it) and none of other options works,


@dkadam77 dkadam77 added the bug Something isn't working label Apr 22, 2021
@dkadam77
Copy link
Author

I have tested it within Intellij terminal then it does not work ...but when i use VSCode terminal or usual windows terminal then it does work.

@dkadam77 dkadam77 changed the title On Windows it does not work it seems On Windows it does not work all the time it seems Apr 22, 2021
@scolladon scolladon added the reproduction steps needed Need reproduction steps to further with the analysis label Apr 22, 2021
@scolladon
Copy link
Owner

Hi @dkadam77 !

Thanks for your interest and for contributing to make this plugin better !

It seems this issue is not related to the plugin itself but it is more related to the environment which execute it.
Is there any difference between the terminal in VSCode, the windows terminal and the terminal in Intellij ?

@bru-naka
Copy link

I'm facing a similar issue - It's creating an empty package in VSCode terminal and windows cmd. However, works when using git bash.

@dkadam77
Copy link
Author

dkadam77 commented Apr 23, 2021

Hi @dkadam77 !

Thanks for your interest and for contributing to make this plugin better !

It seems this issue is not related to the plugin itself but it is more related to the environment which execute it.
Is there any difference between the terminal in VSCode, the windows terminal and the terminal in Intellij ?

I am not sure what is the difference between the terminals in intellij, VSCode and Win Command prompts. But it is strange that it behaves differently in different orgs.

The re-production steps are -

  1. I used below commands in IntelliJ followed by VSCode and finally on Win CMD

sfdx sgd:source:delta --to HEAD --from HEAD^ --output .
sfdx sgd:source:delta --to HEAD --from HEAD^ --output changed-sources/ --generate-delta

for intellij terminal - Failed (created empty package and no source code in output dir)
for VSCode - Passed
for Win CMD - Passed

I have one other question; say you have checked-in the code and it has identified the diff between last 2 check-ins but deployment is somehow failed for this. Meanwhile another check-in happened and if I run the command again then it will identify the diff between last 2 check-ins. Is there any way to identify the diff between the last successful deployment check-in (it may have multiple check-ins in between) to the latest check-in so that I should be able to deploy the code from last deploy failure and not just last check-in diff?? Appreciate your response.

@scolladon
Copy link
Owner

Hi!

Thanks for the reproduction steps.
Could you try by protecting the parameter from being interpreted by the terminal using double quote and tell us the result please ?

$ sfdx sgd:source:delta --to "HEAD" --from "HEAD^" --output .
$ sfdx sgd:source:delta --to "HEAD" --from "HEAD^" --output changed-sources/ --generate-delta

To answer your question:

I have one other question; say you have checked-in the code and it has identified the diff between last 2 check-ins but deployment is somehow failed for this. Meanwhile another check-in happened and if I run the command again then it will identify the diff between last 2 check-ins. Is there any way to identify the diff between the last successful deployment check-in (it may have multiple check-ins in between) to the latest check-in so that I should be able to deploy the code from last deploy failure and not just last check-in diff?? Appreciate your response.

The parameters --to and --from takes any git commit sha pointer (commit sha, short commit sha, branch name, tag, git expression like HEAD, etc). So you can design a tag creation to apply to a commit when it is successfully deployed and base the deployments from that tag (using --from parameter)

@scolladon scolladon removed the reproduction steps needed Need reproduction steps to further with the analysis label Apr 27, 2021
@PawelWozniak
Copy link

PawelWozniak commented Apr 27, 2021

I have the same issue. PowerShell 7.1.3, CMD, Terminal in VSCode. In all of them, I am getting an empty package.xml
sfdx-cli/7.98.0 win32-x64 node-v15.14.0

@dkadam77
Copy link
Author

Hi!

Thanks for the reproduction steps.
Could you try by protecting the parameter from being interpreted by the terminal using double quote and tell us the result please ?

$ sfdx sgd:source:delta --to "HEAD" --from "HEAD^" --output .
$ sfdx sgd:source:delta --to "HEAD" --from "HEAD^" --output changed-sources/ --generate-delta

To answer your question:

I have one other question; say you have checked-in the code and it has identified the diff between last 2 check-ins but deployment is somehow failed for this. Meanwhile another check-in happened and if I run the command again then it will identify the diff between last 2 check-ins. Is there any way to identify the diff between the last successful deployment check-in (it may have multiple check-ins in between) to the latest check-in so that I should be able to deploy the code from last deploy failure and not just last check-in diff?? Appreciate your response.

The parameters --to and --from takes any git commit sha pointer (commit sha, short commit sha, branch name, tag, git expression like HEAD, etc). So you can design a tag creation to apply to a commit when it is successfully deployed and base the deployments from that tag (using --from parameter)

Hello,

I tried below and it worked for me. By protecting the parameter from being interpreted by the terminal using double quote it seems to be working in intellij terminal as well. Now I can do it from Windows CMD, VSCode Terminal as well as IntelliJ terminal as well. Thanks.

$ sfdx sgd:source:delta --to "HEAD" --from "HEAD^" --output .
$ sfdx sgd:source:delta --to "HEAD" --from "HEAD^" --output changed-sources/ --generate-delta

@scolladon scolladon added the documentation Improvements or additions to documentation label Apr 28, 2021
@PawelWozniak
Copy link

For me this still is not working but this one is working:
sfdx sgd:source:delta --to "HEAD" --from "HEAD~1" --output delta

use HEAD~1 instead of HEAD^
It might be due to merging. As my flow is that I merge feature to develop branch and then doing delta on develop. Then deploying package.xml to PROD.
It seems that there is a difference between ~ and ^. Done some reading but still, it isn't clear for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants