Skip to content

integration: test LiveUpdate multiple images one manifest [ch3115]#2014

Merged
maiamcc merged 16 commits into
masterfrom
maiamcc/integ-test-two-images-one-manifest
Aug 13, 2019
Merged

integration: test LiveUpdate multiple images one manifest [ch3115]#2014
maiamcc merged 16 commits into
masterfrom
maiamcc/integ-test-two-images-one-manifest

Conversation

@maiamcc

@maiamcc maiamcc commented Aug 8, 2019

Copy link
Copy Markdown
Contributor

Hello @,

Please review the following commits I made in branch maiamcc/integ-test-two-images-one-manifest:

3886567 (2019-08-08 11:24:36 -0400)
integration: test LiveUpdate multiple images one manifest [ch3115]

Code review reminders, by giving a LGTM you attest that:

  • Commits are adequately tested
  • Code is easy to understand and conforms to style guides
  • Incomplete code is marked with TODOs
  • Code is suitably instrumented with logging and metrics


ctx, cancel = context.WithTimeout(f.ctx, time.Minute)
defer cancel()
fourthPods := f.WaitForAllPodsReady(ctx, "app=twoimages")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should probably do this after the Curl call, like you did on line 36. right now this will probably execute before the live-update even has a change to run

FROM golang:1.11-alpine
WORKDIR /go/src/github.com/windmilleng/integration/live_update_two_images_one_manifest/sparkle
ADD sparkle .
ADD start.sh .

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fwiw, i noticed that Chuck's Dockerfiles loaded this directly from github

ADD https://raw.githubusercontent.com/windmilleng/rerun-process-wrapper/master/start.sh .

and that might be a pattern using

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

hmm interesting. do we think that will speed up run time of our integ. tests?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

no, just reduces the amount of copying to do

@maiamcc

maiamcc commented Aug 8, 2019

Copy link
Copy Markdown
Contributor Author

@nicks added a lil more functionality (now testing crash rebuild as well) if you wanna take a look

@maiamcc
maiamcc requested review from landism and nicks August 8, 2019 16:01
@maiamcc

maiamcc commented Aug 8, 2019

Copy link
Copy Markdown
Contributor Author

actually, hold off reviewing, I discovered a bug: we report that we've operated on all containers that we know about, even if we only operated on a subset of them (cuz only a subset of the images had changed files)

@maiamcc
maiamcc force-pushed the maiamcc/integ-test-two-images-one-manifest branch from b705e75 to b879955 Compare August 8, 2019 22:10
@maiamcc

maiamcc commented Aug 8, 2019

Copy link
Copy Markdown
Contributor Author

@nicks @landism okay should be ready 🤞

@maiamcc

maiamcc commented Aug 9, 2019

Copy link
Copy Markdown
Contributor Author

bump - would love re-review, i added some stuff

}

func (f *k8sFixture) WaitForAllPodsInPhase(ctx context.Context, selector string, phase v1.PodPhase) []string {
func (f *k8sFixture) WaitForOnePodWithAllContainersReady(ctx context.Context, selector string, timeout time.Duration) string {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This new n parameter adds a bunch of complexity, but I couldn't find any justification for it. What's wrong with waiting on all pods? Can you leave some comments on what this is for?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it was to address a blip i was seeing locally (where I'd get multiple ready pods back, presumably from catching the crash rebuild at exactly the wrong time) -- but I can leave this out unless other people start seeing that blip/it starts happening on CI

msg = "Timed out waiting for all pods to be ready."
}

for {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

could this use the WaitUntil helpers?

)

const (
sparkleUrl = "http://localhost:8100"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you move these constants into the function? otherwise we'll run into issues where other functions use them accidentally


const (
sparkleUrl = "http://localhost:8100"
tadaUrl = "http://localhost:8101"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Whoops, you're right!

@maiamcc

maiamcc commented Aug 13, 2019

Copy link
Copy Markdown
Contributor Author

Gonna run tests again to see if they pass again or are flakey 🤞

@maiamcc
maiamcc merged commit ecce413 into master Aug 13, 2019
@maiamcc
maiamcc deleted the maiamcc/integ-test-two-images-one-manifest branch August 13, 2019 19:55
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.

2 participants