scolladon / sfdx-git-delta

Generate the sfdx content in source format from two git commits
Other
412 stars 111 forks source link

Warning: Deprecated config name: apiVersion. Please use org-api-version instead #619

Open AnantSahTeli opened 1 year ago

AnantSahTeli commented 1 year ago

Issue verification check:

What is the problem?

Error shown for api version even if its being new flag.

Error appearing (node:191) Warning: Deprecated config name: apiVersion. Please use org-api-version instead. (Use node --trace-warnings ... to show where the warning was created) { "error": null, "output": ".", "success": true, "warnings": [] }

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

Provide the command and the parameters you used sfdx sgd:source:delta --from HEAD^ --to HEAD --repo . --output . --api-version $branch_api_version

What is the expected result?

- the warning should not be there, as i am using the newest flag

What is the actual result?

warning as deprecated parameter

Steps to reproduce


run the below command

sfdx sgd:source:delta --from HEAD^ --to HEAD --repo . --output . --api-version $branch_api_version --source force-app

Execution context


$ uname -v ; yarn -v ; node -v ; git --version ; sfdx --version ; sfdx plugins

Operating System: … linux

yarn version:

node version: …v17.6.0

git version:

sfdx version: …7.202.7

sgd plugin version: …5.19.0

More information (optional)


From http://bitbucket.org/coloplastsalesforce/coloplast-salesforce-repository

scolladon commented 1 year ago

Hi @AnantSahTeli !

Thanks for raising this issue and thanks for contributing in making this project better!

I dig a bit on this one. I was able to reproduce locally, which is weird because we do not have apiVersion parameter. We use api-version. Then I found this information. It seems to be related to sfdx and sf commands, not to the plugin. Could you check your configuration and compare with the doc I linked and let us know if it is helping?

AnantSahTeli commented 1 year ago

Thanks @scolladon

I will check if SF team.

rondinardo commented 1 year ago

@AnantSahTeli Did you get this resolved? If so, please say how. I have followed the above advice. I have deinstalled the entire CLI, deleted every file SF says to delete, reinstalled, reinstalled plug-in, checked stray environment variables, etc. I definitely do not have apiVersion set.

@scolladon how did you reproduce this? sf config set?

scolladon commented 1 year ago

I have not done anything special on my side @rondinardo. This warning already showed up since a few sfdx releases... Not a big help here, I tried using sf but it is not possible to run sgd with sf yet. We have not yet work on the migration (maybe soon).

AnantSahTeli commented 1 year ago

Hi @scolladon, I could not resolve it yet. I contacted salesforce, and they where able to show me that this warning is coming only when using sgd command. all other sfdx or sf commands are running perfectly fine.

So the outcome was its sgd issue. I am still figuring out how to solve this. I tried uninstalling a fresh instance, but didn't help.

scolladon commented 1 year ago

That is very interesting @AnantSahTeli !

Do they provide specific information about why we have this behavior with sgd ? And with who were you in contact with ?

AnantSahTeli commented 1 year ago

I was in contact with Shivanshu Tiwari, and we tested both sf and sfdx with and without api-version parameter. Since they are re-developing everything around sfdx and sf, he has no clear reason of this error.

mcarvin8 commented 1 year ago

I received the same warning while using sf to run the sgd plugin. The package.xml is created successfully regardless of the warning.

scolladon commented 1 year ago

Thank you guys for those information. I'll have a look when possible. No ETA for now as it is not blocking the plugin execution, but I'll try to fix it.

AllanOricil commented 1 year ago

@scolladon maybe u have to change @salesforce/command by this one https://github.com/salesforcecli/sf-plugins-core

scolladon commented 1 year ago

Thanks for this pointer @AllanOricil, I'll have a look soon. It seems to be related to Sf cli migration...

aalmogg commented 1 year ago

Hi

I'm getting the same error when I install the sfdx-git-delta plugin. Do you have any idea how to install this plugin successfully?

scolladon commented 1 year ago

Hi @aalmogg, do you have issue when installing the plugin ? Does it prevent you from installing it ? Or does it occurs when you execute the plugin ?

aalmogg commented 1 year ago

I’m sorry, you right. it happens when I execute sfdx sgd commands.

scolladon commented 1 year ago

I don't know yet exactly why it happens. What I know is it is related to sf v2. I will take care of it soon, I will deal with the plugin migration to sf v2 architecture. I'm finishing a required refactoring first and then I'll migrate

nerealegui commented 1 year ago

I'm having the same issue when using the plugin locally in my machine, nevertheless, the creation of the packages is working correctly. Here is the command I'm using,

sf sgd source delta --to prBranch --from originBranch --repo . --output . --ignore .sgdignore --ignorewarnings

As for the usage in a GitHub runner, I'm being prompted with the following message:

 Warning: sgd source delta is not a sf command.
Did you mean force source delete? [y/n]: 

These are the versions of the dependencies:

OS: Linux (GitHub Runner) and MacOS (Locally)

yarn version: 1.22.19

node version: v20.4.0

git version: 2.39.0

sfdx version: NA --> sf version: 0.1.9

sgd plugin version: 5.24.2

scolladon commented 1 year ago

Hi @nereagit

Thanks for those detailed information.

We have not tested robustly the execution of the plugin with the sf commands We do not have any automated test yet for that.

I plan to work on the sf migration after the current refactoring I'm working on.

Stay tuned!

A30016340 commented 8 months ago

@scolladon Same issue, the package is not updating, hence unable to use the plugin

scolladon commented 7 months ago

Hi @A30016340

Sorry for the late reply, I do not know why I missed it, my bad.

We have improve our testing and now we make sure the plugin is working with:

AnantSahTeli commented 7 months ago

This still seems an issue even after upgrading with node 20 onwards.

image

scolladon commented 7 months ago

Thanks @AnantSahTeli for confirming this on your end too.

We are aware of this warning, the issue we have is: to fix it we need to migrate to sf v2 plugin architecture, and if we do so, everyone using sfdx old cli will not be able to install the plugin. We are waiting for the right time to migrate to this new plugin architecture

khichia9 commented 3 months ago

Hi @scolladon Thank you for your effort in updating sfdx-git-delta to support the latest versions. I understand you may be busy, but I'm curious if it's possible to migrate to SF v2 or resolve the issue soon.

scolladon commented 3 months ago

Hi @khichia9 !

TL;DR;

We know how to fix it We wait for the majority of users to migrate to @salesforce/cli before, to avoid CI installation issues. We track clis weekly downloads to know when to apply the sf v2 plugin architecture refactoring.

Long Story

The impact is not that big in term of code / test changes, we already have a roadmap to apply this change. It is more a customer issue as not everyone have migrated yet to @salesforce/cli and if we move to sf v2 plugin architecture it will breaks for sfdx/cli (deprecated) users.

As you can see there is still a lot of weekly downloads for sfdx/cli (even if it is deprecated) @salesforce/cli starts to be more downloaded, but it was not yet the case a few weeks ago.

We want to wait for this weekly download to be under 10%-5% overall weekly downloads before making this change to make sure the least users possible will be impacted.