Skip to content

Migrate upgrade tests to use new framework#4519

Merged
knative-prow-robot merged 18 commits into
knative:masterfrom
cardil:feature/new-upgrade-tests
Nov 27, 2020
Merged

Migrate upgrade tests to use new framework#4519
knative-prow-robot merged 18 commits into
knative:masterfrom
cardil:feature/new-upgrade-tests

Conversation

@cardil
Copy link
Copy Markdown
Contributor

@cardil cardil commented Nov 12, 2020

Fixes #4518

Proposed Changes

  • Refactors upgrade tests to utilize new upgrade framework

@knative-prow-robot knative-prow-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 12, 2020
@knative-prow-robot
Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@knative-prow-robot knative-prow-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 12, 2020
@knative-prow-robot knative-prow-robot added the area/test-and-release Test infrastructure, tests or release label Nov 12, 2020
@cardil cardil changed the title Migrate upgrade tests to use new framework [WIP] Migrate upgrade tests to use new framework Nov 12, 2020
@google-cla google-cla Bot added the cla: yes Indicates the PR's author has signed the CLA. label Nov 12, 2020
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 12, 2020

Codecov Report

Merging #4519 (f0905b1) into master (ede5a2a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4519   +/-   ##
=======================================
  Coverage   81.31%   81.31%           
=======================================
  Files         290      290           
  Lines        8157     8157           
=======================================
  Hits         6633     6633           
  Misses       1126     1126           
  Partials      398      398           

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 ede5a2a...2c74fa7. Read the comment docs.

@cardil cardil force-pushed the feature/new-upgrade-tests branch from 53b68fb to 0aa5b8c Compare November 12, 2020 19:07
@cardil
Copy link
Copy Markdown
Contributor Author

cardil commented Nov 12, 2020

/test pull-knative-eventing-upgrade-tests

@zhongduo
Copy link
Copy Markdown
Contributor

/assign @zhongduo
Can you remove Draft and WIP when it can be reviewed?

@cardil
Copy link
Copy Markdown
Contributor Author

cardil commented Nov 12, 2020

@zhongduo sure. After it is completed.

@cardil
Copy link
Copy Markdown
Contributor Author

cardil commented Nov 13, 2020

/test pull-knative-eventing-upgrade-tests

@cardil
Copy link
Copy Markdown
Contributor Author

cardil commented Nov 16, 2020

Blocked by knative/pkg#1911

@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 17, 2020
@cardil cardil force-pushed the feature/new-upgrade-tests branch from 4f2dd57 to cd5a8bb Compare November 17, 2020 23:03
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 17, 2020
@cardil cardil changed the title [WIP] Migrate upgrade tests to use new framework Migrate upgrade tests to use new framework Nov 17, 2020
@cardil cardil marked this pull request as ready for review November 17, 2020 23:03
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 24, 2020
…de-tests

Conflicts fixed:
 *	go.sum
 *	vendor/modules.txt
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 24, 2020
Comment thread go.mod Outdated
@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 24, 2020
We need to point ourselves to specific directory as our scripts are
location sensitive.
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 25, 2020
@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 25, 2020
@cardil cardil marked this pull request as ready for review November 25, 2020 16:54
@knative-prow-robot knative-prow-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Nov 25, 2020
@cardil
Copy link
Copy Markdown
Contributor Author

cardil commented Nov 25, 2020

This one is ready for review @aliok @zhongduo.

The log output for upgrade tests looks sweet in my opinion. As well as Junit method names! 🎉 🥳

This relies on knative/hack#30 to be merged.

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 25, 2020
Comment thread hack/generate-yamls.sh
readonly KO_YAML_FLAGS="${KO_YAML_FLAGS} ${KO_FLAGS} --platform=all"

if [[ -n "${TAG}" ]]; then
if [[ -n "${TAG:-}" ]]; then
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what was the issue here @cardil ? just curious

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.

When using strict bash setting of set -Eeuo pipefail that fails because of -u: fail on unset variable being dereferenced.

Bash could know if variable is unset or empty.

@aliok
Copy link
Copy Markdown
Member

aliok commented Nov 26, 2020

/lgtm
/approve
/hold

Looks good to me but I would leave the final approval to @zhongduo

Thanks a lot @cardil

@knative-prow-robot knative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 26, 2020
@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 26, 2020
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aliok, cardil

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

The pull request process is described here

Details 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

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 26, 2020
Copy link
Copy Markdown
Contributor

@zhongduo zhongduo left a comment

Choose a reason for hiding this comment

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

The complexity of this PR are in hack and pkg repo, this is a refactoring to use the new framework. It looks good to me. All my comments are nits, please feel free to ignore them and unhold.

c.Log.Info("Running shell function: ", shellfunc)
err := callShellFunction(shellfunc)
if err != nil {
c.T.Error(err)
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 this be Fatal instead? Or I am guessing the Operation caller will call Fatal when there is an error in installation, right?

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 will break operations, yeah.

Comment on lines +25 to +30
ops := []string{
"install_head",
"install_channel_crds",
"install_mt_broker",
"install_sugar",
}
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.

I am a little bit concerned about this as sometimes there may be hacky code in bash script to install it properly, eg waiting to make sure all the pods in the previous step are running before applying next. I am wondering if there is a bash function that does all these installations and we can just call the bash function instead. But for sure we can change it later if such a bash function is required.

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.

There are no such function. Each of those functions has appropriate waits built inside, so it isn't needed.

Current code executes them directly: https://github.com/knative/eventing/pull/4519/files#diff-1c4d417537c9878a5068005f79761334318400204068c4dfd4a7656226bfefe1L61-L64

limitations under the License.
*/

package installation
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.

I wonder if we can just use install instead.

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.

I used installation as I wanted noun, packages should be nouns. install is a verb.

That's why I think installation is better one.

@cardil
Copy link
Copy Markdown
Contributor Author

cardil commented Nov 27, 2020

/unhold

Unholding as I think I satisfied @zhongduo question. If don't, please comment, and we could follow up.

@knative-prow-robot knative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 27, 2020
@knative-prow-robot knative-prow-robot merged commit 6065b38 into knative:master Nov 27, 2020
@cardil cardil deleted the feature/new-upgrade-tests branch November 27, 2020 00:58
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. area/test-and-release Test infrastructure, tests or release cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Eventing upgrade tests to use new upgrade framework (knative/pkg#1652)

4 participants