Skip to content

logs: View logs from older deployments/builds with --version - #5393

Merged
openshift-bot merged 1 commit into
openshift:masterfrom
0xmichalis:support-older-deployment-logs
Oct 31, 2015
Merged

openshift-bot merged 1 commit into
openshift:masterfrom
0xmichalis:support-older-deployment-logs

Conversation

@0xmichalis

Copy link
Copy Markdown
Contributor

@0xmichalis 0xmichalis changed the title logs: Support view logs from older deployments logs: Support viewing logs from older deployments Oct 26, 2015
@0xmichalis

Copy link
Copy Markdown
Contributor Author

Docs here: openshift/openshift-docs#879

Comment thread pkg/cmd/cli/cmd/logs.go Outdated

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 is currently an int, I'd like to see it as an int until we have a reason to loosen it.

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.

Since you're here and builds also have numbers, can you wire that up as well?

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.

Since you're here and builds also have numbers, can you wire that up as well?

Currently in deployments the object gets resolved in the server while in builds we do this in the client. What you are asking for can only be achieved by adding a version field in BuildLogOptions and doing the same thing that already happens in deployments (or we could continue to resolve the object in the client but that would still be incosistent). Is this fine?

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.

Also what should happen if someone hit oc logs build/ruby-1 --version=2? I guess we should error out?

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.

Also what should happen if someone hit oc logs build/ruby-1 --version=2? I guess we should error out?

yes

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.

Currently in deployments the object gets resolved in the server while in builds we do this in the client. What you are asking for can only be achieved by adding a version field in BuildLogOptions and doing the same thing that already happens in deployments (or we could continue to resolve the object in the client but that would still be incosistent). Is this fine?

Adding to BuildLogOptions and using to resolve client side would work. Seems like we might want a bc/logs endpoint, but that's out of scope for this.

@0xmichalis 0xmichalis changed the title logs: Support viewing logs from older deployments logs: View logs from older deployments/builds with --version Oct 27, 2015
@0xmichalis

Copy link
Copy Markdown
Contributor Author

@deads2k updated to have --version work for bcs, too.

@bparees you may want to have a look.

@0xmichalis

Copy link
Copy Markdown
Contributor Author

[test]

Comment thread pkg/client/buildlogs.go Outdated

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.

We don't really need to serialize this... But for the sake of completion.

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.

why the explicit dereference?

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.

nm. i see the field is a ptr.

@0xmichalis

Copy link
Copy Markdown
Contributor Author

Docs for build logs: openshift/openshift-docs#1112

Comment thread test/cmd/builds.sh Outdated

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 shouldn't work. test-cmd only starts a master, no nodes, so the pod shouldn't ever be in a running state.

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 indeed didn't. Will move to e2e

@deads2k deads2k self-assigned this Oct 27, 2015
@deads2k

deads2k commented Oct 27, 2015

Copy link
Copy Markdown
Contributor

Comment on a test that I don't think will work.

lgtm otherwise.

Comment thread test/fixtures/failing-dc.yaml Outdated

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.

Line ending

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.

killed it

@0xmichalis

Copy link
Copy Markdown
Contributor Author

new-app flake

re[test]

@0xmichalis 0xmichalis closed this Oct 27, 2015
@0xmichalis 0xmichalis reopened this Oct 27, 2015
Comment thread pkg/build/api/v1beta3/types.go Outdated

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.

buildConfig or build?

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.

fixed to build

@bparees

bparees commented Oct 27, 2015

Copy link
Copy Markdown
Contributor

bunch of questions but basically lgtm.

@smarterclayton

Copy link
Copy Markdown
Contributor

Merge removed, this doesn't have API approval.

@0xmichalis

Copy link
Copy Markdown
Contributor Author

@openshift/api-review

needs to [test] at least

@0xmichalis 0xmichalis closed this Oct 27, 2015
@0xmichalis 0xmichalis reopened this Oct 27, 2015
Comment thread pkg/build/api/v1/types.go Outdated

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.

int64

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.

Should this be consistent with DeploymentLogOptions.Version?

Version *int

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.

updated both LogOptions objects to use int64

@0xmichalis

Copy link
Copy Markdown
Contributor Author

[merge]

@0xmichalis

Copy link
Copy Markdown
Contributor Author
!!! Error in hack/../test/end-to-end/../../hack/util.sh:272
    'return 1' exited with status 1
Call stack:
    1: hack/../test/end-to-end/../../hack/util.sh:272 os::build:wait_for_end(...)
    2: hack/../test/end-to-end/core.sh:150 main(...)
Exiting with status 1
Error from server: User "e2e-user" cannot list all buildconfigs in the cluster

@0xmichalis

Copy link
Copy Markdown
Contributor Author

And from the test tag, again the UI failure

!!! Error in hack/../test/end-to-end/core.sh:300
    'grunt test-e2e' exited with status 3
Call stack:
    1: hack/../test/end-to-end/core.sh:300 main(...)
Exiting with status 1

[FAIL] !!!!! Test Failed !!!!

@0xmichalis

Copy link
Copy Markdown
Contributor Author

[merge]

@0xmichalis

Copy link
Copy Markdown
Contributor Author

[merge] no 12

@0xmichalis

Copy link
Copy Markdown
Contributor Author

btw the last merge didn't even run:(

@0xmichalis

Copy link
Copy Markdown
Contributor Author

🙏 🙏 🙏 🙏 🙏

@liggitt

liggitt commented Oct 30, 2015

Copy link
Copy Markdown
Contributor

have you had a clean test run? are we sure nothing in this PR is causing failures (sprinkled among other actual flakes)?

@deads2k

deads2k commented Oct 30, 2015

Copy link
Copy Markdown
Contributor

have you had a clean test run? are we sure nothing in this PR is causing failures (sprinkled among other actual flakes)?

His latest test made it to the UI e2e and flaked there:

1)  unauthenticated user should be able to log in
  - Error: Angular could not be found on the page https://localhost:9000/ : retries looking for angular exceeded
      at /data/src/github.com/openshift/origin/assets/node_modules/protractor/lib/protractor.js:478:17
    at /data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1582:15
    at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1654:20)
    at notify (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:465:12)
    at notifyAll (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:442:7)
    at resolve (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:420:7)
    at fulfill (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:535:5)
    at Object.webdriver.promise.asap (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:776:5)
    at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1665:25)
    at notify (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:465:12)
==== async task ====
Protractor.get(https://localhost:9000/) - test for angular
    at [object Object].webdriver.WebDriver.schedule (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:345:15)
    at [object Object].Protractor.executeAsyncScript_ (/data/src/github.com/openshift/origin/assets/node_modules/protractor/lib/protractor.js:251:26)
    at [object Object].Protractor.get (/data/src/github.com/openshift/origin/assets/node_modules/protractor/lib/protractor.js:471:8)
    at [object Object].<anonymous> (/data/src/github.com/openshift/origin/assets/test/e2e/test.js:188:15)
    at /data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/jasminewd/index.js:94:14
    at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1654:20)
    at [object Object].webdriver.promise.ControlFlow.runEventLoop_ (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1518:8)
    at [object Object].wrapper [as _onTimeout] (timers.js:261:14)
==== async task ====

https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/6428/

@0xmichalis

Copy link
Copy Markdown
Contributor Author

I'm merging #5396 and then will rebase this and try again

Maybe the 13th will be the lucky one:)

@smarterclayton

Copy link
Copy Markdown
Contributor

A note - if you see flakes, make sure there is an issue open for each one.

On Fri, Oct 30, 2015 at 11:33 AM, David Eads [email protected]
wrote:

have you had a clean test run? are we sure nothing in this PR is causing
failures (sprinkled among other actual flakes)?

His latest test made it to the UI e2e and flaked there:

  1. unauthenticated user should be able to log in
  • Error: Angular could not be found on the page https://localhost:9000/ : retries looking for angular exceeded
    at /data/src/github.com/openshift/origin/assets/node_modules/protractor/lib/protractor.js:478:17
    at /data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1582:15
    at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1654:20)
    at notify (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:465:12)
    at notifyAll (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:442:7)
    at resolve (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:420:7)
    at fulfill (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:535:5)
    at Object.webdriver.promise.asap (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:776:5)
    at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1665:25)
    at notify (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:465:12)
    ==== async task ====
    Protractor.get(https://localhost:9000/) - test for angular
    at [object Object].webdriver.WebDriver.schedule (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:345:15)
    at [object Object].Protractor.executeAsyncScript_ (/data/src/github.com/openshift/origin/assets/node_modules/protractor/lib/protractor.js:251:26)
    at [object Object].Protractor.get (/data/src/github.com/openshift/origin/assets/node_modules/protractor/lib/protractor.js:471:8)
    at [object Object]. (/data/src/github.com/openshift/origin/assets/test/e2e/test.js:188:15)
    at /data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/jasminewd/index.js:94:14
    at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1654:20)
    at [object Object].webdriver.promise.ControlFlow.runEventLoop_ (/data/src/github.com/openshift/origin/assets/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1518:8)
    at [object Object].wrapper as _onTimeout
    ==== async task ====

https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/6428/

—
Reply to this email directly or view it on GitHub
#5393 (comment).

@0xmichalis

Copy link
Copy Markdown
Contributor Author

[test]

@0xmichalis

Copy link
Copy Markdown
Contributor Author

re[test]

@0xmichalis

Copy link
Copy Markdown
Contributor Author

His latest test made it to the UI e2e and flaked there:

It's impossible to get past this failure...

@smarterclayton

Copy link
Copy Markdown
Contributor

[test]

On Oct 30, 2015, at 5:41 PM, OpenShift Bot [email protected] wrote:

continuous-integration/openshift-jenkins/test FAILURE (
https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/6483/)

—
Reply to this email directly or view it on GitHub
#5393 (comment).

@liggitt

liggitt commented Oct 31, 2015

Copy link
Copy Markdown
Contributor

Are you sure you didn't break the UI test by kicking off a second build in the e2e?

This is the error:

1)  authenticated e2e-user with test project should have access to the test project
  - Error: Element not found: .pod-template-build a

And this is what the UI is looking for:

        waitForPresence('.pod-template-build a', '#1');

@liggitt

liggitt commented Oct 31, 2015

Copy link
Copy Markdown
Contributor

I think it is likely your second build made the currently shown deployment use build #2, not #1

@openshift-bot

Copy link
Copy Markdown
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/3884/) (Image: devenv-rhel7_2616)

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin merge up to f5305c5

@0xmichalis

Copy link
Copy Markdown
Contributor Author

registry flake

re[test]

@0xmichalis

Copy link
Copy Markdown
Contributor Author

[test]

2 similar comments
@0xmichalis

Copy link
Copy Markdown
Contributor Author

[test]

@0xmichalis

Copy link
Copy Markdown
Contributor Author

[test]

@openshift-bot

Copy link
Copy Markdown
Contributor

Evaluated for origin test up to f5305c5

@openshift-bot

Copy link
Copy Markdown
Contributor

openshift-bot pushed a commit that referenced this pull request Oct 31, 2015
@openshift-bot
openshift-bot merged commit 6201f3e into openshift:master Oct 31, 2015
@0xmichalis
0xmichalis deleted the support-older-deployment-logs branch November 1, 2015 00:42
@0xmichalis

Copy link
Copy Markdown
Contributor Author

🌞

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.

7 participants