Skip to content

Conversation

lentzi90
Copy link
Contributor

@lentzi90 lentzi90 commented Dec 12, 2022

What this PR does / why we need it:

Changes the e2e logging solution to avoid By, since By can only be used inside It blocks and similar.
Reverted the workaround for clusterctl upgrade also.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #1414

Special notes for your reviewer:

  1. Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • if necessary:
    • includes documentation
    • adds unit tests

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 12, 2022
@netlify
Copy link

netlify bot commented Dec 12, 2022

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
🔨 Latest commit c4229c9
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/6398197ba2297300088b9113
😎 Deploy Preview https://deploy-preview-1417--kubernetes-sigs-cluster-api-openstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 12, 2022
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 12, 2022
@lentzi90 lentzi90 mentioned this pull request Dec 12, 2022
3 tasks
Revert the workaround in clusterctl upgrade
@lentzi90 lentzi90 force-pushed the lentzi90/e2e-log-fix branch from 3daf0ce to c4229c9 Compare December 13, 2022 06:19
@lentzi90
Copy link
Contributor Author

Checking that this actually solves the issue.
/test pull-cluster-api-provider-openstack-e2e-full-test

@lentzi90
Copy link
Contributor Author

Dec 13 06:26:58 capo-e2e-controller cloud-init[1790]: Package jq is not available, but is referred to by another package.
Dec 13 06:26:58 capo-e2e-controller cloud-init[1790]: This may mean that the package is missing, has been obsoleted, or
Dec 13 06:26:58 capo-e2e-controller cloud-init[1790]: is only available from another source
Dec 13 06:26:58 capo-e2e-controller cloud-init[1790]: E: Package 'jq' has no installation candidate
Dec 13 06:26:58 capo-e2e-controller cloud-init[1790]: Cloud-init v. 21.3-1-g6803368d-0ubuntu1~20.04.4 running 'modules:final' at Tue, 13 Dec 2022 06:25:21 +0000. Up 23.35 seconds.
Dec 13 06:26:58 capo-e2e-controller cloud-init[1790]: 2022-12-13 06:26:58,978 - util.py[WARNING]: Failed to install packages: ['python3', 'git', 'jq']
Dec 13 06:26:58 capo-e2e-controller cloud-init[1790]: 2022-12-13 06:26:58,979 - cc_package_update_upgrade_install.py[WARNING]: 1 failed with exceptions, re-raising the last one
Dec 13 06:26:58 capo-e2e-controller cloud-init[1790]: 2022-12-13 06:26:58,979 - util.py[WARNING]: Running module package-update-upgrade-install (<module 'cloudinit.config.cc_package_update_upgrade_install' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_package_update_upgrade_install.py'>) failed

What? 😳
I'm going to assume there was some temporary issue with the package repositories/mirrors...
/test pull-cluster-api-provider-openstack-e2e-full-test

func Byf(format string, a ...interface{}) {
By("[" + time.Now().Format(time.RFC3339) + "] " + fmt.Sprintf(format, a...))
func Logf(format string, a ...interface{}) {
fmt.Fprintf(GinkgoWriter, "["+time.Now().Format(time.RFC3339)+"] "+format+"\n", a...)
Copy link
Contributor

Choose a reason for hiding this comment

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

this is the key thing we refer from CAPZ?
isntead of By, we use fmt.Fprintf(GinkgoWriter, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lentzi90
Copy link
Contributor Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 13, 2022
@jichenjc
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 13, 2022
@tobiasgiese
Copy link
Member

/approve

thanks :)

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lentzi90, tobiasgiese

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 13, 2022
@k8s-ci-robot k8s-ci-robot merged commit b0f259d into kubernetes-sigs:main Dec 13, 2022
@lentzi90 lentzi90 deleted the lentzi90/e2e-log-fix branch December 13, 2022 09:38
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

e2e: Allow logging outside of It blocks
4 participants