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

Pin path migration #103

Merged
merged 2 commits into from
Feb 3, 2025
Merged

Conversation

mykola-kobets-epam
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Jan 26, 2025

Codecov Report

Attention: Patch coverage is 97.41379% with 3 lines in your changes missing coverage. Please review.

Project coverage is 86.43%. Comparing base (b4dbb1e) to head (4ba0f10).
Report is 116 commits behind head on develop.

Files with missing lines Patch % Lines
src/database/database.cpp 89.47% 2 Missing ⚠️
src/config/config.cpp 93.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #103      +/-   ##
===========================================
- Coverage    87.61%   86.43%   -1.18%     
===========================================
  Files           43       39       -4     
  Lines         3092     5139    +2047     
  Branches       225      404     +179     
===========================================
+ Hits          2709     4442    +1733     
- Misses         383      697     +314     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

{
MigrationConfig config {};

config.mMigrationPath = migration.GetValue<std::string>("migrationPath");
config.mMergedMigrationPath = migration.GetValue<std::string>("mergedMigrationPath");

for (const auto& moduleConfig : moduleConfigs) {
aos::common::utils::CaseInsensitiveObjectWrapper object(
moduleConfig.mParams.extract<Poco::JSON::Object::Ptr>());
Copy link
Member

Choose a reason for hiding this comment

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

There's a constructor that accepts poco dynamic var that does extract in the implementation:
CaseInsensitiveObjectWrapper::CaseInsensitiveObjectWrapper(const Poco::Dynamic::Var& var)

Suggested change
moduleConfig.mParams.extract<Poco::JSON::Object::Ptr>());
);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good. thank you. changed

CreateMigrationData(migration);
mMigration->MigrateToVersion(GetVersion());
DropMigrationData();
} catch (const Poco::Exception& e) {
Copy link
Member

Choose a reason for hiding this comment

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

Please use unified version:

Suggested change
} catch (const Poco::Exception& e) {
catch (const std::exception& e) {
return utils::ToAosError(e);
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

}

/**
void Migration::CreateVersionTable()
Copy link
Member

Choose a reason for hiding this comment

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

delete this code if not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

now;
}

*/

Choose a reason for hiding this comment

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

should be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, done.

Signed-off-by: Mykola Kobets <[email protected]>
@al1img al1img merged commit ad37988 into aosedge:develop Feb 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants