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

CR-5279 - As a user I'll be able to upgrade runtime to a specific version #19

Merged
merged 13 commits into from
Jul 15, 2021

Conversation

noam-codefresh
Copy link
Contributor

No description provided.

* persist runtime.yaml in repo (inside a configmap)
* updated argo-events to v1.4.0
* added managed-by to eventSource and sensor
@noam-codefresh noam-codefresh marked this pull request as ready for review July 14, 2021 07:16
@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2021

Codecov Report

Merging #19 (32a4559) into main (75b1433) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #19   +/-   ##
=======================================
  Coverage   25.13%   25.13%           
=======================================
  Files           1        1           
  Lines         187      187           
=======================================
  Hits           47       47           
  Misses        134      134           
  Partials        6        6           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75b1433...32a4559. Read the comment docs.

}

if urlObj.Query().Get("ref") == "" {
urlObj.Query().Set("ref", version.String())
Copy link
Contributor

Choose a reason for hiding this comment

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

should check wether version was set, it can be nil

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the user doesn't supply a version, the command puts in the current binary version as the version. So when we get to here, it will always contain a valid value.

}

func (r *Runtime) Upgrade(fs fs.FS, newRt *Runtime) ([]AppDef, error) {
newComponents, err := r.Spec.upgrade(fs, &newRt.Spec)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why upgrade only return the components to be created but do the actual delete ? I suggest that it will also do the creation/update

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Creating a new app is a bit more complicated than just deleting it. So I preferred leaving it to autopilot.
In the autopilot, we always do clone->change->commit->push, so I had to call all the RunAppCreate after the commit/push of the rest of the changes (update and delete of applications)
I think we should refactor Autopilot to be able to get an existing filesystem, with an already existing repo cloned to it, and then just make the changes, without commit/push at the end. I already made a plan on how to implement it. It will make a lot of our cli-v2 code much simpler.

@noam-codefresh noam-codefresh merged commit 618c52d into main Jul 15, 2021
@noam-codefresh noam-codefresh deleted the CR-5279 branch July 15, 2021 13:52
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.

4 participants