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

fix: Use PR head commit in artifact naming instead of merge commit #1643

Conversation

Bowenislandsong
Copy link
Member

The env var GITHUB_SHA shows merge commit and is not related to worflow trigger unlike the discription on GITHUB. This fix changes the variable to look at the head commit aka. the commit that actually triggers the workflow.

Description of the change:

Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@Bowenislandsong
Copy link
Member Author

/hold
need to verify the uploaded artifact indeed contains a SHA value that trigged the workflow.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 16, 2020
@Bowenislandsong
Copy link
Member Author

/hold cancel
Artifact e2e-test-output-bbeb3644b061b5692ba87115113b0dcb1c7f12c8-171359250 has been successfully uploaded!

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 16, 2020
@Bowenislandsong
Copy link
Member Author

The PR failed tests for 1 times with 1 individual failed tests and 5 skipped tests.

totaltestcount: 1
flaketestcount: 1
skippedtestcount: 5
flaketests:

  • classname: End-to-end
    name: CSV API service resource not migrated if not adoptable
    counts: 1
    details:
    • count: 1
      error: |4-

      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/test/e2e/csv_e2e_test.go:2985
      
      	Error Trace:	csv_e2e_test.go:3064
      	            				runner.go:113
      	            				runner.go:64
      	            				it_node.go:26
      	            				spec.go:215
      	            				spec.go:138
      	            				spec_runner.go:200
      	            				spec_runner.go:170
      	            				spec_runner.go:66
      	            				suite.go:62
      	            				ginkgo_dsl.go:226
      	            				ginkgo_dsl.go:214
      	            				e2e_test.go:54
      	Error:      	Received unexpected error:
      	            	timed out waiting for the condition
      
      /home/runner/work/operator-lifecycle-manager/operator-lifecycle-manager/vendor/github.com/stretchr/testify/require/require.go:1005
      
    meandurationsec: 305.124136
    skippedtests:
  • classname: End-to-end
    name: Subscription updates existing install plan
    counts: 1
    details: []
    meandurationsec: 0.001395
  • classname: End-to-end
    name: Subscriptions create required objects from Catalogs Given a Namespace when
    a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should install the operator
    successfully
    counts: 1
    details: []
    meandurationsec: 6.515597
  • classname: End-to-end
    name: Subscriptions create required objects from Catalogs Given a Namespace when
    a CatalogSource is created with a bundle that contains prometheus objects
    creating a subscription using the CatalogSource should have created the expected
    prometheus objects
    counts: 1
    details: []
    meandurationsec: 6.200362
  • classname: End-to-end
    name: Catalog image update
    counts: 1
    details: []
    meandurationsec: 0.00045
  • classname: End-to-end
    name: Installing bundles with new object types when a bundle with a pdb, priorityclass,
    and VPA object is installed should create the additional bundle objects
    counts: 1
    details: []
    meandurationsec: 0

@@ -14,5 +14,5 @@ jobs:
if: ${{ failure() }}
uses: actions/upload-artifact@v2
with:
name: e2e-test-output-${{ github.sha }}-${{ github.run_id }}
name: e2e-test-output-${{ github.event.pull_request.head.sha }}-${{ github.run_id }}
Copy link
Member

Choose a reason for hiding this comment

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

is github.event.pull_request.head available when this workflow is run against master?

Copy link
Member Author

@Bowenislandsong Bowenislandsong Jul 16, 2020

Choose a reason for hiding this comment

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

Do you mean when it is a commit instead of a PR?
We use PR for commenting purpose. Gather all the commits for a PR (by commit SHAs) and comment on the PR. If it is a commit to the master without PR, the result should be counted towards periodic report instead of PR comment. So it should be fine right? wdyt. Thanks

Copy link
Member Author

Choose a reason for hiding this comment

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

I am not entirely understanding the question here because this PR is opened against the master.

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, I get it now, you are saying if we run this test without a PR what would happen. I have not tried it. I'll check

@Bowenislandsong
Copy link
Member Author

Bowenislandsong commented Jul 16, 2020

/hold
need to experiment what head pr sha is if a test is triggered from a commit.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 16, 2020
The env var GITHUB_SHA shows merge commit and is not related to worflow trigger unlike the discription on GITHUB. This fix changes the variable to look at the head commit aka. the commit that actually triggers the workflow.
@Bowenislandsong
Copy link
Member Author

/hold cancel
https://github.com/Bowenislandsong/gmail-bot/runs/878105902?check_suite_focus=true
https://github.com/Bowenislandsong/gmail-bot/pull/2/checks

the new change is able to provide commit sha for both commit and PR changes.

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 16, 2020
@njhale
Copy link
Member

njhale commented Jul 16, 2020

Nice job!

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 16, 2020
@Bowenislandsong
Copy link
Member Author

/retest

@awgreene
Copy link
Member

/lgtm

@ecordell
Copy link
Member

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Bowenislandsong, ecordell

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 16, 2020
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@Bowenislandsong
Copy link
Member Author

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

4 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

29 similar comments
@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

@Bowenislandsong
Copy link
Member Author

The PR failed tests for 0 times with 0 individual failed tests and 0 skipped tests.

totaltestcount: 0
flaketestcount: 0
skippedtestcount: 0
flaketests: []
skippedtests: []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants