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

feat(contracts): PluginRepo refactor part II #589

Closed
wants to merge 14 commits into from

Conversation

josemarinas
Copy link
Contributor

@josemarinas josemarinas commented May 1, 2024

Description

  • contains many external functions that are not part of IPluginRepo
  • being able to specify an initialVersion making

Task ID: OS-1330

Type of change

See the framework lifecycle in packages/contracts/docs/framework-lifecycle to decide what kind of change this pull request is.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran all tests with success and extended them if necessary.
  • I have updated the CHANGELOG.md file in the root folder.
  • I have updated the DEPLOYMENT_CHECKLIST file in the root folder.
  • I have updated the UPDATE_CHECKLIST file in the root folder.
  • I have updated the Subgraph and added a QA URL to the description of this PR.

@josemarinas josemarinas force-pushed the f/OS-1330-pluginrepo-refactor-part-II branch from 158a919 to 6d235d5 Compare May 2, 2024 10:44
Copy link

Choose a reason for hiding this comment

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

my insights on this matter

Currently, the createVersion function handles both the creation of new plugin versions and the definition of the initial one if none exists. However, with the upcoming addition of the ability to initialize plugin versions to specific builds, it might be a good time to separate these duties.

The idea would be to redefine the responsibilities of the createVersion function to focus solely on generating new plugin versions based on provided release information. And introduce a new function, initializePluginVersion (or a similar name), dedicated exclusively to initializing plugin versions to specific releases and builds, or to the first one if they are zero.

This new function will be called only once because is for initialization purposes only, while the createVersion one could be called every time a new version is needed.

/// @param _pluginSetup The address of the plugin setup contract.
/// @param _buildMetadata The build metadata URI.
/// @param _releaseMetadata The release metadata URI.
function updateVersionMappings(

Choose a reason for hiding this comment

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

convention is to prefix internal variables and methods with an underscore

Base automatically changed from f/OS-676-refactor-plugin-repo to develop May 10, 2024 07:40
@novaknole novaknole closed this Nov 5, 2024
@novaknole novaknole deleted the f/OS-1330-pluginrepo-refactor-part-II branch November 5, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants