Skip to content

Remove waiting loops for kubernetes resources from Makefile #189

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

Merged

Conversation

sutaakar
Copy link
Contributor

Fixes #188

@openshift-ci openshift-ci bot requested review from dimakis and Maxusmusti July 20, 2023 08:08
@sutaakar
Copy link
Contributor Author

/retest

@sutaakar sutaakar requested a review from anishasthana July 24, 2023 06:28
@sutaakar
Copy link
Contributor Author

/retest

1 similar comment
@sutaakar
Copy link
Contributor Author

/retest

@sutaakar sutaakar requested a review from astefanutti July 24, 2023 12:23
@@ -73,6 +73,13 @@ jobs:
sleep 1
kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${OLM_VERSION}/olm.yaml

- name: Wait for default CatalogSource to start
run: |
make wait-for-catalog-source
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you feel strong about defining the wait logic in the Makefile? I understand it may be to factorize the logic, but it's really a one-liner, and would make the test workflow easier to read.

Also I think kubectl wait supports --for=jsonpath, so instead of:

$ timeout 120 bash -c 'while [[ "$$(kubectl get catalogsource/'$(CATALOG_SOURCE_NAME)' -n '$(CATALOG_SOURCE_NAMESPACE)' -o json | jq -r .status.connectionState.lastObservedState)" != "READY" ]]; do sleep 5 && echo "$$(kubectl get catalogsource/'$(CATALOG_SOURCE_NAME)' -n '$(CATALOG_SOURCE_NAMESPACE)' -o json | jq -r .status.connectionState.lastObservedState)" ; done'

This could be:

$ kubectl wait -n ${CATALOG_SOURCE_NAMESPACE} catalogsource/'${CATALOG_SOURCE_NAME} --for=jsonpath='{.status.connectionState.lastObservedState}'=READY 

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, will refactor.

@astefanutti
Copy link
Contributor

/lgtm

/approve

@sutaakar sutaakar requested a review from astefanutti July 25, 2023 10:17
@sutaakar sutaakar changed the title Wait until default CatalogSource is intialized in PR check Remove waiting loops for kubernetes resources from Makefile Jul 25, 2023
@astefanutti
Copy link
Contributor

/lgtm

/approve

@openshift-ci openshift-ci bot added the lgtm label Jul 25, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jul 25, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: astefanutti

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-merge-robot openshift-merge-robot merged commit c9929bd into project-codeflare:main Jul 25, 2023
@sutaakar sutaakar deleted the fix-olm-check branch July 25, 2023 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unstable OLM Install and Upgrade PR check
3 participants