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

Only clone git repository once at the beginning on the run #109

Merged
merged 28 commits into from
Nov 2, 2020
Merged

Conversation

olblak
Copy link
Member

@olblak olblak commented Oct 29, 2020

This PR refactor the main engine by

  • Adding a new stage named "prepare" where we can clone needed git repositories only once.
  • Exports the GitHub parameter Directory in order to define custom directories from updatecli.
  • Simplifies the condition spec interface by moving the logic to the package which satisfies the interface. Now the condition interface requires two interface method condition(version) and conditionFromSCM(version, scm)
  • Simplifies the target spec interface by moving the logic to the package which satisfies the interface. Now the target interface requires two interface method target and targetFromSCM
  • Reorganise code under core and plugins directory
  • Allow git/github to add several files in once

Time:
./bin/updatecli apply --config --values 21,07s user 1,95s system 66% cpu 34,422 total

Init git repository in clone function

Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
@olblak olblak changed the title Only clone git repository once at the beginning on the run [WIP] Only clone git repository once at the beginning on the run Oct 29, 2020
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Use short variable assignment

Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
Add configuration file name with an issue

Signed-off-by: Olivier Vernin <olivier@vernin.me>
Signed-off-by: Olivier Vernin <olivier@vernin.me>
@olblak olblak changed the title [WIP] Only clone git repository once at the beginning on the run Only clone git repository once at the beginning on the run Nov 2, 2020
@olblak olblak merged commit f3f0137 into master Nov 2, 2020
@olblak olblak added the enhancement New feature or request label Nov 4, 2020
@jetersen
Copy link
Member

jetersen commented Nov 4, 2020

🚀 Great job on this major refactoring. Nice to see those performance gains!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants