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

Modifications to Run integration Tests With Sail Operator #300

Merged
merged 7 commits into from
Apr 8, 2025

Conversation

ctartici
Copy link
Contributor

Please provide a description of this PR:

To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

  • Ambient
  • Configuration Infrastructure
  • Docs
  • Dual Stack
  • Installation
  • Networking
  • Performance and Scalability
  • Extensions and Telemetry
  • Security
  • Test and Release
  • User Experience
  • Developer Infrastructure
  • Upgrade
  • Multi Cluster
  • Virtual Machine
  • Control Plane Revisions

Please check any characteristics that apply to this pull request.

  • Does not have any user-facing changes. This may include CLI changes, API changes, behavior changes, performance improvements, etc.

@ctartici ctartici requested a review from fjglira February 24, 2025 12:05
@openshift-ci openshift-ci bot added the size/L label Feb 24, 2025
@ctartici ctartici requested review from dgn, asmigala and MaxBab February 24, 2025 12:07
@@ -135,6 +135,13 @@ base_cmd=("go" "test" "-p" "1" "-v" "-count=1" "-tags=integ" "-vet=off" "-timeou
"--istio.test.tag=${TAG}"
"--istio.test.openshift")

# Append sail operator setup script to base command
if [ "${OPERATOR_TYPE:-}" == "sail" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to initialize at the beginning of the file OPERATOR_TYPE with some default value, but I don't like the name of the var. We are going to run the sail-operator-setup bash script to avoid doing some hacks or workaround when we want to run this integration test on OCP and against sail operator-based installed control plane, I think we can name this var something like CONTROL_PLANE_INSTALLER (The same as the istio flag) and the default value should be istio. And you can add here also some notes to explain the flags

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, Check the script we will need later to delete SKIP_TEST_RUN because it is not going to be used anymore, but this can be done after the merge of the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You need to initialize at the beginning of the file OPERATOR_TYPE with some default value, but I don't like the name of the var. We are going to run the sail-operator-setup bash script to avoid doing some hacks or workaround when we want to run this integration test on OCP and against sail operator-based installed control plane, I think we can name this var something like CONTROL_PLANE_INSTALLER (The same as the istio flag) and the default value should be istio. And you can add here also some notes to explain the flags

CONTROL_PLANE_INSTALLER is referring to this file in istio flag. So it might be confusing to use it for something else. I can change it to CONTROL_PLANE_TYPE and default it to istio on top of the script. WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it can be CONTROL_PLANE_SOURCE? And the values can be sail or istio

@@ -0,0 +1,8 @@
apiVersion: sailoperator.io/v1alpha1
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe rename this file to istio-cni.yaml only

Copy link
Contributor

@fjglira fjglira left a comment

Choose a reason for hiding this comment

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

I like this :), I leave some comments mostly for clarity. Please tell me and I can add a new job to start running test over this new way to execute the test

Comment on lines 55 to 65
WORKDIR="$2"
IOP_FILE="$2"/iop.yaml
SAIL_IOP_FILE="$(basename "${IOP_FILE%.yaml}")-sail.yaml"
Copy link
Contributor

Choose a reason for hiding this comment

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

Add note to explain what is the iop file

IOP_FILE="$2"/iop.yaml
SAIL_IOP_FILE="$(basename "${IOP_FILE%.yaml}")-sail.yaml"

ISTIO_VERSION="${ISTIO_VERSION:-v1.24.1}"
Copy link
Contributor

Choose a reason for hiding this comment

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

The current Istio version is 1.24.2; is there any chance to fill this by default? I don't know if it is possible to be honest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One option is to use "latest" as istio version, I am not sure if it works for istio-cni but works for istiod. If you think its better idea I can modify default to latest and test it

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, try this

INGRESS_GATEWAY_SVC_NAMESPACE="${INGRESS_GATEWAY_SVC_NAMESPACE:-istio-system}"
ISTIOCNI_NAMESPACE="${ISTIOCNI_NAMESPACE:-istio-cni}"

ISTIOCNI="${PROW}/config/sail-operator/istioCNI-cr.yaml"
Copy link
Contributor

Choose a reason for hiding this comment

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

If you change the name of the file, this will need to change also

@ctartici ctartici requested a review from FilipB February 24, 2025 12:59
@fjglira
Copy link
Contributor

fjglira commented Feb 24, 2025

/test istio-integration-telemetry

@fjglira
Copy link
Contributor

fjglira commented Feb 25, 2025

/retest

@ctartici
Copy link
Contributor Author

/test istio-telemetry-sail-controlpane

Copy link

openshift-ci bot commented Feb 25, 2025

@ctartici: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test istio-integration-helm
/test istio-integration-pilot
/test istio-integration-telemetry

The following commands are available to trigger optional jobs:

/test istio-telemetry-sail-controlplane

Use /test all to run all jobs.

In response to this:

/test istio-telemetry-sail-controlpane

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ctartici
Copy link
Contributor Author

/retest

@fjglira
Copy link
Contributor

fjglira commented Feb 25, 2025

Important: Adding do not merge label until INSTALL_SAIL_OPERATOR is set to false

Copy link

openshift-ci bot commented Feb 28, 2025

@ctartici: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

/test istio-integration-helm
/test istio-integration-pilot
/test istio-integration-telemetry

The following commands are available to trigger optional jobs:

/test istio-telemetry-sail-controlplane

Use /test all to run all jobs.

In response to this:

/test ci/prow/istio-telemetry-sail-controlplane

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@ctartici
Copy link
Contributor Author

/test istio-telemetry-sail-controlplane

metadata:
name: default
spec:
namespace: ${ISTIOCNI_NAESPACE}
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo:

Suggested change
namespace: ${ISTIOCNI_NAESPACE}
namespace: ${ISTIOCNI_NAMESPACE}

@ctartici ctartici force-pushed the master branch 2 times, most recently from f9ef06b to e16e671 Compare March 4, 2025 10:29
@ctartici
Copy link
Contributor Author

/test istio-telemetry-sail-controlplane

@ctartici
Copy link
Contributor Author

/test istio-telemetry-sail-controlplane

1 similar comment
@ctartici
Copy link
Contributor Author

/test istio-telemetry-sail-controlplane

@ctartici
Copy link
Contributor Author

/test istio-telemetry-sail-controlplane

spec:
namespace: ${ISTIOCNI_NAMESPACE}
version: ${ISTIO_VERSION}
profile: openshift
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: is a profile needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure about this. Got the yaml from our jenkins config files. I can remove and test it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's test in a consecutive PR

Copy link
Contributor

@fjglira fjglira left a comment

Choose a reason for hiding this comment

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

lgtm in general I just leave some minor comments

@fjglira
Copy link
Contributor

fjglira commented Apr 3, 2025

If is ready, you can set the PR to ready to review to execute the prow jobs

@ctartici ctartici marked this pull request as ready for review April 3, 2025 13:10
IOP_FILE="$2"/iop.yaml
SAIL_IOP_FILE="$(basename "${IOP_FILE%.yaml}")-sail.yaml"

ISTIO_VERSION="${ISTIO_VERSION:-v1.24-latest}"
Copy link
Contributor

Choose a reason for hiding this comment

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

the current master branch of Istio is 1.25 but we do not support it officially, in our main branch we can deploy master. Maybe worth checking if we can set an alias here to deploy by default the master alias

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is this file stating version: https://github.com/ctartici/istio_ossm/blob/master/VERSION but it has 1.26 for now. Where should I read the version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, using the versions.yaml file will be the best I think

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@fjglira fjglira left a comment

Choose a reason for hiding this comment

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

Just one more comment related to the Istio resource version

@ctartici
Copy link
Contributor Author

ctartici commented Apr 3, 2025

/test istio-integration-telemetry

Copy link

openshift-ci bot commented Apr 7, 2025

@ctartici: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/istio-pilot-sail-controlplane 0e8c623 link false /test istio-pilot-sail-controlplane
ci/prow/istio-telemetry-sail-controlplane 6d2370e link false /test istio-telemetry-sail-controlplane

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@ctartici
Copy link
Contributor Author

ctartici commented Apr 7, 2025

/test istio-integration-helm

Comment on lines +71 to +75
# get istio version from versions.yaml
VERSION_FILE="https://raw.githubusercontent.com/istio-ecosystem/sail-operator/$CONVERTER_BRANCH/pkg/istioversion/versions.yaml"
if [ -z "${ISTIO_VERSION:-}" ]; then
ISTIO_VERSION="$(curl -s "$VERSION_FILE" | grep -E 'name: v[0-9]+\.[0-9]+' | sed -E 's/.*(v[0-9]+\.[0-9]+).*/\1/' | sort -Vr | head -n1)-latest"
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Very small change: I think it will be better to set also branch alternative to be able to run in the master branch against the master of the versions.yaml and we can set it later for another branch the same. It will be a small change

Copy link
Contributor

@fjglira fjglira left a comment

Choose a reason for hiding this comment

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

really change

Copy link
Contributor

@fjglira fjglira left a comment

Choose a reason for hiding this comment

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

Let's merge this and start to make changes from there if they are needed

@openshift-merge-bot openshift-merge-bot bot merged commit 85e1ac5 into openshift-service-mesh:master Apr 8, 2025
4 checks passed
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.

3 participants