Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
build:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
uses: ./.github/workflows/build.yml
integration:
if: github.event_name == 'schedule' || github.event_name == 'push' || github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id
uses: ./.github/workflows/integration.yml
# Virtual job that can be configured as a required check before a PR can be merged.
all-required-checks-done:
name: All required checks done
Expand All @@ -40,6 +43,7 @@ jobs:
- test
- codeql
- build
- integration
runs-on: ubuntu-latest
steps:
- run: echo "All required checks done"
95 changes: 95 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Integration
Copy link
Member

Choose a reason for hiding this comment

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

I think this is more of an e2e test than an integration one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed


on:
workflow_call:

permissions:
contents: read

jobs:
kind:
name: Kind
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Go
id: setup-go
uses: ./.github/actions/setup-go-cache
with:
cache-prefix: go-integration-kind

- name: Starting Armada cluster
run: make kind-all

- name: Create queue
Copy link
Member

Choose a reason for hiding this comment

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

I am more in favour of an approach where the test is defined in a bash script, as we can also execute it locally.

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 agree, but all this boils down to:

./bin/app/armadactl create queue example
./bin/app/armadactl submit dev/quickstart/example-job.yaml

which is taken from the README.md.

The boilerplate code is hopefully only temporary until #321 is fixed.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think #321 will be fixed, as Armada is eventually consistent by design, and clients should handle retries.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

would be nice if the armadactl would have an option to wait for the consistency, then users wouldn't need to implement that individually

Copy link
Member

Choose a reason for hiding this comment

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

Might be worthwhile opening an Issue in the https://github.com/armadaproject/armada repository.

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 have found scripts/e2e-test.sh, moving code there and invoking this from CI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The existing scripts/e2e-test.sh does not work for me locally and on Github c04d991:
https://github.com/armadaproject/armada-operator/actions/runs/13973241267/job/39120298108?pr=355#step:4:608

Problem is that

make docker-build

produces a docker image that does not work:

$ docker run --rm -it gresearch/armada-operator:v0.5.0-8-g4da5900
exec /armada-operator: no such file or directory

@dejanzele any suggestions?

run: |
# Create queue
for second in {1..60}
do
if ./bin/app/armadactl create queue example 2> armadactl-${second}.log
then
if [[ second -eq 1 ]]
then
echo "Successfully created queue 'example'"
else
echo "Successfully created queue 'example' after ${second}s"
echo "Previously failed due to:"
cat armadactl-$((second-1)).log
fi
exit
fi
sleep 1
done

echo "Failed to create queue 'example' after ${second}s"
cat armadactl-${second}.log >&2
exit 1

- name: Test queue exists
run: |
# Test queue exists
for second in {1..60}
do
if ./bin/app/armadactl get queue example 2> armadactl-${second}.log
then
if [[ second -eq 1 ]]
then
echo "Successfully inspected queue 'example'"
else
echo "Successfully inspected queue 'example' after ${second}s"
echo "Previously failed due to:"
cat armadactl-$((second-1)).log
fi
exit
fi
sleep 1
done

echo "Failed to inspected queue 'example' after ${second}s"
cat armadactl-${second}.log >&2
exit 1

- name: Submit job
run: |
# Submit job
for second in {1..60}
do
if ./bin/app/armadactl submit dev/quickstart/example-job.yaml 2> armadactl-${second}.log
then
if [[ attempt -eq 1 ]]
then
echo "Successfully submitted job"
else
echo "Successfully submitted job after ${second}s"
echo "Previously failed due to:"
cat armadactl-$((second-1)).log
fi
exit
fi
sleep 1
done

echo "Failed to submitted job after ${second}s"
cat armadactl-${second}.log >&2
exit 1