KEMBAR78
Fix integration test dependencies to build and cosmetic changes by krk · Pull Request #1502 · async-profiler/async-profiler · GitHub
Skip to content

Conversation

krk
Copy link
Contributor

@krk krk commented Sep 23, 2025

Before this PR, all integration tests depended on all builds, causing e.g. linux-x64 integration tests to wait for macos build.

This is now fixed with some cosmetic changes to make the UI look like attached:

image

Previous look and structure

image

Motivation and context

Integration tests should not wait for builds on unrelated OS/archs.

How has this been tested?

By the current PR github action.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Baraa-Hasheesh
Copy link
Contributor

This looks nice,

But it might introduce some undesired behaviour
For example if you break unit tests on macOS, the Linux integration tests would still run

https://github.com/Baraa-Hasheesh/async-profiler/actions/runs/17956941491

Comment on lines 7 to 9
type: string
required: true
description: "Platform identifier (linux-x64, linux-arm64, macos)"
Copy link
Member

Choose a reason for hiding this comment

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

What are these definitions for? Are they even visible anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are for the developer, not visible in UI afaik.

Copy link
Member

Choose a reason for hiding this comment

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

For developers, you mean, for me and you? :) But this looks like some formal API description, not quite human-friendly. In other words, it's just too much boilerplate to explain trivial things.

build-and-upload-binaries:
build-linux-arm64:
name: build / linux-arm64
uses: ./.github/workflows/build.yml
Copy link
Member

Choose a reason for hiding this comment

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

Why do all paths start with ./? Doesn't it work without it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't work without.

java-version: ${{ matrix.java-version }}
architecture: ${{ matrix.architecture || '' }}

integ-containers:
Copy link
Member

Choose a reason for hiding this comment

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

What do you mean by "containers" here?
Why is it separate from integ-linux-x64 and integ-linux-arm64 that also run in containers?

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 meant "non-default", considering public.ecr.aws/async-profiler/asprof-builder-x86 and public.ecr.aws/async-profiler/asprof-builder-arm default. Will find a better name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Merged in to integ-linux-x64.

Copy link
Member

Choose a reason for hiding this comment

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

There is nothing special about these containers. The only difference is that integ-linux-* run in the same containers that are used for building artifacts, but this does not really matter. My points is, division by "default" and "non-default" is not justitied, let's keep it uniform.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, removed the "default" vs. "non-default" separation.


integ-linux-arm64:
name: integration test / linux-arm64
needs: [build-jars, build-linux-arm64]
Copy link
Member

Choose a reason for hiding this comment

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

Integration tests previously did not depend on build-jars? What has changed?

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 catch, removing.

container-image: public.ecr.aws/async-profiler/asprof-builder-alpine:corretto-11
- test-platform: linux-x64-AL2
container-image: public.ecr.aws/async-profiler/asprof-builder-amazonlinux:2
container-volumes: '["/tmp/node20:/__e/node20"]'
Copy link
Contributor

@fandreuz fandreuz Sep 24, 2025

Choose a reason for hiding this comment

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

There used to be a comment here to explain why this cryptic config is needed. Can we keep it?

image: public.ecr.aws/async-profiler/asprof-builder-amazonlinux:2
# GHA provides Node.js by attaching a volume to the container. The container path is
# '/__e/node20', and it's not writable unless we override it via 'container.volumes'.
volumes: '["/tmp/node20:/__e/node20"]'

run: "[ ! -f /root/setup.sh ] || /root/setup.sh"
- name: Setup Java
uses: actions/setup-java@v4
if: ${{ !contains(inputs.test-platform, 'alpine') }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we keep the comment here to explain why Alpine is excluded?

# https://github.com/actions/setup-java/issues/678#issuecomment-2446279753
if: matrix.runson.display != 'alpine'

@krk
Copy link
Contributor Author

krk commented Sep 24, 2025

For example if you break unit tests on macOS, the Linux integration tests would still run

This is a feature. No point in cancelling linux tests when macos tests are failing. Linux tests may fail or pass and that could give the developer an idea of what may be wrong.

@apangin
Copy link
Member

apangin commented Sep 24, 2025

On your screenshots, previous workflow ran for 4:41, whereas the new "optimized" one ran for more than a minute longer. Why is that?

@krk
Copy link
Contributor Author

krk commented Sep 24, 2025

On your screenshots, previous workflow ran for 4:41, whereas the new "optimized" one ran for more than a minute longer. Why is that?

It may have to do with waiting for a GHA runner, as I was triggering runs in quick succession before I took the screenshot.

@apangin apangin merged commit e3f646a into async-profiler:master Sep 26, 2025
20 checks passed
@apangin
Copy link
Member

apangin commented Sep 26, 2025

@krk Can job titles be shortened? This is unreadable:

image

@krk krk mentioned this pull request Sep 26, 2025
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.

4 participants