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

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

Open
AnantSahTeli opened this issue May 31, 2023 · 23 comments · May be fixed by #924
Open

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

AnantSahTeli opened this issue May 31, 2023 · 23 comments · May be fixed by #924
Assignees
Labels
bug Something isn't working

Comments

@AnantSahTeli
Copy link

AnantSahTeli commented May 31, 2023

Issue verification check:

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

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

  • branch release/SFQA -> FETCH_HEAD
    (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": []
    }
@AnantSahTeli AnantSahTeli added the bug Something isn't working label May 31, 2023
@scolladon
Copy link
Owner

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
Copy link
Author

Thanks @scolladon

I will check if SF team.

@rondinardo
Copy link

@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
Copy link
Owner

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
Copy link
Author

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.

@AnantSahTeli AnantSahTeli reopened this Jun 7, 2023
@scolladon
Copy link
Owner

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
Copy link
Author

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
Copy link
Contributor

mcarvin8 commented Jun 20, 2023

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

@scolladon
Copy link
Owner

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
Copy link
Contributor

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

@scolladon
Copy link
Owner

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

@aalmogg
Copy link

aalmogg commented Aug 3, 2023

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
Copy link
Owner

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
Copy link

aalmogg commented Aug 3, 2023

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

@scolladon
Copy link
Owner

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
Copy link

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
Copy link
Owner

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
Copy link

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

@scolladon
Copy link
Owner

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:

  • both sfdx and sf cli
  • mac, linux and windows os
  • node 18 and 20 (sfdx supported version)

@AnantSahTeli
Copy link
Author

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

image

@scolladon
Copy link
Owner

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
Copy link

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
Copy link
Owner

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.

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

Successfully merging a pull request may close this issue.

9 participants