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

"File not found" error fixed for SQL inline migration #25453

Merged
merged 17 commits into from
Mar 1, 2024

Conversation

RamyaR29
Copy link
Contributor

"File not found" error fixed for SQL inline migration
The __dirname name here calls for the working directory which is sql extension folder and from there we are navigating to scripts folder to get the required script

image

@coveralls
Copy link

coveralls commented Feb 29, 2024

Pull Request Test Coverage Report for Build 8106254216

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 41.757%

Totals Coverage Status
Change from base Build 8095584987: 0.001%
Covered Lines: 30827
Relevant Lines: 69082

💛 - Coveralls

@@ -875,7 +875,7 @@ export async function createManualIRconfigContentContainer(view: azdata.ModelVie
if (service) {
const account = migrationStateModel._azureAccount;
const subscription = migrationStateModel._sqlMigrationServiceSubscription;
const resourceGroup = migrationStateModel._sqlMigrationServiceResourceGroup.name;
const resourceGroup = service.properties.resourceGroup;
const location = service.location;
const serviceName = service.name;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Service name also should be newer one, right? but if it is working fine locally that we can go ahead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

service name is the name property of the service and this service is assigned in the previous stage with the newly created service.


// inject auth keys in the script
const authKeys = await retrieveAuthKeys(migrationStateModel);
const modifiedScriptContent = await injectKeysIntoShirScriptContent
(authKeys.authKey1, authKeys.authKey2, scriptContent.toString());

// write it back to different file
const modifiedScriptPath = path.join(__dirname, '../../scripts/SHIR-auto-configuration-with-auth-keys.ps1');
const modifiedScriptPath = path.join(__dirname, '../scripts/SHIR-auto-configuration-with-auth-keys.ps1');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is why we should add these string constants, otherwise we need to update at everyplace. And there is risk of missing some of them.

@RamyaR29 RamyaR29 merged commit 34cbc32 into main Mar 1, 2024
17 checks passed
@RamyaR29 RamyaR29 deleted the ramya/single-click-shir-redesign branch March 1, 2024 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants