Skip to content

Added s390x arch in Makefiles to build multi arch images and skipped some tests on s390x because of image unavailability#2130

Open
rajnish-jauhari wants to merge 1 commit intoskupperproject:v1from
rajnish-jauhari:v1
Open

Added s390x arch in Makefiles to build multi arch images and skipped some tests on s390x because of image unavailability#2130
rajnish-jauhari wants to merge 1 commit intoskupperproject:v1from
rajnish-jauhari:v1

Conversation

@rajnish-jauhari
Copy link

Added s390x arch in Makefiles to build multi arch images and
Skipping below tests on s390x because of image unavailability :

  • TestGateway/local-gateway-service
  • TestBookinfo
  • TestMongo
  • TestHipsterShop
  • TestPostgres

cc: @hash-d

@hash-d hash-d self-requested a review September 18, 2025 20:06
Copy link
Member

@hash-d hash-d left a comment

Choose a reason for hiding this comment

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

For the tests that cannot be run on Z because of missing images, the cluster's architecture should be checked, instead of the local test machine.

If you're running from an x86 VM pointing to a Z cluster, for example, those tests would not be skipped and the test would fail.

)

func TestBookinfo(t *testing.T) {
if runtime.GOARCH == "s390x" {
Copy link
Member

Choose a reason for hiding this comment

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

Checking runtime.GOARCH is ok for testLocalGatewayService, because that's a local test. For TestBookInfo, however, you should be inspecting the cluster's architecture, not the local machine.

Check how that's done for ARM, you can adapt that for Z.

@rajnish-jauhari rajnish-jauhari force-pushed the v1 branch 2 times, most recently from aaec1ba to b71e806 Compare November 10, 2025 08:22
@rajnish-jauhari
Copy link
Author

@hash-d made the changes as requested by you

Copy link
Member

@hash-d hash-d left a comment

Choose a reason for hiding this comment

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

Please make the check pass, and we should be good to merge.

//Skipping test on s390x architecture as images unavailable for s390x
cluster := base.GetClusterContext()
if err := arch.SkipOnlyS390x(t, cluster); err != nil {
t.Fatal(err)
Copy link
Member

Choose a reason for hiding this comment

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

The check failed because of incorrect Go formatting. This is one such case (missing indent). Please fix these so the check passes.

}

// CheckOnlyS390x skips ONLY if the architecture is s390x
func CheckOnlyS390x(clusters ...*base.ClusterContext) (err error, skip bool) {
Copy link
Member

Choose a reason for hiding this comment

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

It would have been best to generalize Check(), as listed on its TODO, but this works fine

@rajnish-jauhari rajnish-jauhari force-pushed the v1 branch 2 times, most recently from c6c8fbd to 5717795 Compare February 16, 2026 07:02
@hash-d
Copy link
Member

hash-d commented Feb 19, 2026

@rajnish-jauhari, while I'm good with the PR, you'll need to address the build failures.

Here's what I found with help from @fgiorgetti:

  • When connecting to a failed build with SSH, running the same command results in the same error.
  • However, trying to user docker ps also results in error:
circleci@ip-x:~/project$ docker ps
Error response from daemon: client version 1.53 is too new. Maximum supported API version is 1.41
  • Looking into CircleCI documentation for the command install_docker [1], it states:

    Version of Docker to install, defaults to the latest stable release.

  • And there has been some recent Docker releases [2]. In particular, 29.2.0 has been released in the end of January [3]

Our guess is that, while the Docker orb is tied to version 2.6.0, the docker/install-docker step is not (at least not in all its invocations, and in particular it is not in the invocation on build_and_save_test_images), and that the Docker version of the executor is not compatible with the latest Docker release.

So, check .circleci/config.yml, and you'll see other calls to install-docker; try setting the version on all calls to docker-install and see whether the build passes.

[1] https://circleci.com/developer/orbs/orb/circleci/docker#commands-install_docker
[2] https://docs.docker.com/engine/release-notes/
[3] https://docs.docker.com/engine/release-notes/29/#2920

@hash-d
Copy link
Member

hash-d commented Feb 20, 2026

@rajnish-jauhari, it seems the Docker issue is now bypassed, but there are still some code issues. Please review the test failure logs and fix them.

@rajnish-jauhari
Copy link
Author

@hash-d , after making necessary changes, all the checks are now passing, please provide a review regarding the same

Copy link
Member

@hash-d hash-d left a comment

Choose a reason for hiding this comment

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

I think it is ok that formatting changes are introduced on files that are changing for the purposes of the PR, even if they pollute the diff (for the PR review and for future git log analysis).

However, the removals of comments and changes in message strings adds burden to the review and do not really add to the final product.

In fact, some of those changes may be detrimental to the tests. Some comments are there to explain the reason a piece of the code is as it is; logs may have been added to help debug recurring problems.

In specific, for example on test/integration/examples/mongodb/mongo.go, I can't see any changes that relate to the PR. Perhaps they are buried behind the other changes?

The changes on test/integration/examples/bookinfo_test.go are not only unnecessary, they actually change the way the test behaves for other architectures. Are those changes positive? I honestly do not know, but I don't think we want to introduce changes to v1 this late in the game.

Please remove the extraneous changes and submit again.


// Make sure you have a minimum of three members on the replicaset
// https://www.mongodb.com/docs/manual/tutorial/deploy-replica-set/
// https://www.mongodb.com/docs/manual/core/replica-set-architecture-three-members/
Copy link
Member

Choose a reason for hiding this comment

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

Why did you remove these comments?


// Let's wait until the election is settled, for a maximum of 5 min
log.Print("Waiting for the Mongo replicaset primary member election to be settled")
log.Print("Waiting for Mongo replicaset primary election")
Copy link
Member

Choose a reason for hiding this comment

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

Here, too, why make these changes? What's the relation of them with the PR?

job, err := k8s.WaitForJob(pubCluster1.Namespace, pubCluster1.VanClient.KubeClient, jobName, constants.ImagePullingAndResourceCreationTimeout)
jobLogs, _ := k8s.GetJobsLogs(pubCluster1.Namespace, pubCluster1.VanClient.KubeClient, jobName, true)
t.Logf("%s logs:", jobName)
t.Logf("%s", jobLogs)
Copy link
Member

Choose a reason for hiding this comment

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

Why removing those logs?

if err != nil {
t.Fatal(err)
}

Copy link
Member

Choose a reason for hiding this comment

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

The changes above are completely changing how the test behaves, why are you doing that? A shared ClusterTestRunnerBase already exists and is created on test/integration/examples/main_test.go, and was used by this test, why create a new ClusterNeeds?

You probably want to just add arch.SkipOnlyS390x() to Setup() on test/integration/examples/bookinfo/bookinfo.go, instead.

needs := base.ClusterNeeds{
NamespaceId: "perf-archcheck",
PublicClusters: 1,
PrivateClusters: 0,
Copy link
Member

Choose a reason for hiding this comment

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

Same thing as for Mongo test, here: why a new ClusterNeeds?

}

// Cleanup the temporary namespace used for arch detection
defer base.RemoveNamespacesForContexts(r, []int{1}, []int{})
Copy link
Member

Choose a reason for hiding this comment

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

Why a temporary namespace for arch detection? The creation and removal of namespaces add time to the test execution; use the actual namespaces, instead.

Copy link
Member

Choose a reason for hiding this comment

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

Also, probably not the case here as the focus is on v2, but if new namespaces are introduced in the test by future changes, the temporary ones may be left behind, unaltered. It's better to test the actual namespaces, in the place where they are created or accessed by the test, to ensure future changes take the verification you're introducing in mind.

// use build flags or some other technique.
//
// Usage: check first skip; only check err if skip is false. If skip is true, error
// will be non-nil, with information on why skipping
Copy link
Member

Choose a reason for hiding this comment

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

Why removing the Usage documentation?

// will be non-nil, with information on why skipping
//
// TODO: make it more granular, allow for hibrid clusters?
// TODO: allow for list of accepted archs?
Copy link
Member

Choose a reason for hiding this comment

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

These TODOs have not been implemented; why removing them?

…some tests on s390x because of image unavailability
@rajnish-jauhari
Copy link
Author

@hash-d all the requested changes have been made, please review it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants