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

test do not merge: debug "user-1" exists in IPA test failures #7560

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
135 changes: 6 additions & 129 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
container: quay.io/sssd/ci-client-devel:latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
id: dependencies
uses: ./.github/actions/install-dependencies

- name: Configure sssd
uses: ./.github/actions/configure

- name: make
shell: bash
working-directory: x86_64
run: |
source ../contrib/fedora/bashrc_sssd
make CFLAGS+="$SSS_WARNINGS -Werror -Wno-error=deprecated-declarations"

- name: make check
shell: bash
working-directory: x86_64
run: |
source ../contrib/fedora/bashrc_sssd
make CFLAGS+="$SSS_WARNINGS -Werror -Wno-error=deprecated-declarations" check

- name: make distcheck
shell: bash
working-directory: x86_64
run: |
source ../contrib/fedora/bashrc_sssd
make distcheck

- uses: actions/upload-artifact@v4
if: always()
with:
name: build
path: |
x86_64/config.log
x86_64/config.h
x86_64/test-suite.log
if-no-files-found: ignore

prepare:
runs-on: ubuntu-latest
permissions:
Expand All @@ -69,75 +22,8 @@ jobs:
id: matrix
run: ./contrib/ci/get-matrix.py --action

intgcheck:
needs: [prepare, build]
strategy:
fail-fast: false
matrix:
tag: ${{ fromJson(needs.prepare.outputs.matrix).intgcheck }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: sssd

- name: Setup containers
uses: SSSD/sssd-ci-containers/actions/setup@master
with:
path: sssd-ci-containers
tag: ${{ matrix.tag }}
limit: dns client
override: |
services:
client:
image: ${REGISTRY}/ci-client-devel:${TAG}
volumes:
- ../sssd:/sssd:rw

- name: Run integration tests
uses: SSSD/sssd-ci-containers/actions/exec@master
with:
working-directory: /sssd
script: ./contrib/ci/run --moderate

- name: Print logs
uses: next-actions/print-logs@master
if: always()
with:
working-directory: ./sssd/ci-build-debug
files: |
test-suite.log
ci-make-intgcheck.log
ci-make-distcheck.log

- name: Upload main artifacts
if: always()
uses: actions/upload-artifact@v4
with:
if-no-files-found: ignore
name: ${{ matrix.tag }}-intgcheck
path: |
./sssd/var/log/sssd/*.log
./sssd/ci-build-debug/ci-*.log
./sssd/ci-build-debug/config.log
./sssd/ci-build-debug/test-suite.log
./sssd/ci-build-debug/ci-mock-result/*.log
./sssd/ci-build-debug/src/tests/cwrap/test-suite.log

- name: Upload valgrind artifacts
if: always()
uses: actions/upload-artifact@v4
with:
if-no-files-found: ignore
name: ${{ matrix.tag }}-intgcheck-valgrind
path: |
./sssd/ci-build-debug/*.valgrind.log

system:
needs: [prepare, build]
needs: [prepare]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -291,7 +177,11 @@ jobs:

mkdir -p $GITHUB_WORKSPACE/artifacts
source .venv/bin/activate
pytest \
MH_CONNECTION_DEBUG=yes pytest \
--mh-collect-logs=always \
--mh-collect-artifacts=always \
-k test_passkey \
--mh-topology=ipa \
--color=yes \
--show-capture=no \
--mh-config=./mhc.yaml \
Expand All @@ -314,16 +204,3 @@ jobs:
install.log
pytest.log
pytest-collect.log

result:
name: All tests are successful
if: ${{ always() }}
runs-on: ubuntu-latest
needs: [build, intgcheck, system]
steps:
- name: Fail on failure
if: |
needs.build.result != 'success'
|| needs.intgcheck.result != 'success'
|| needs.system.result != 'success'
run: exit 1
15 changes: 13 additions & 2 deletions contrib/fedora/make_srpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,21 @@ sed -e "s/@PACKAGE_NAME@/$PACKAGE_NAME/" \
> "$RPMBUILD/SPECS/$PACKAGE_NAME.spec"

NAME="$PACKAGE_NAME-$PACKAGE_VERSION"
TARBALL="$RPMBUILD/SOURCES/$NAME.tar.gz"

git archive --format=tar --prefix="$NAME"/ \
--remote="file://$SRC_DIR" \
HEAD \
| gzip > "$RPMBUILD/SOURCES/$NAME.tar.gz"
HEAD | gzip > "$TARBALL"

# fallback to tar if git archive failed
# tar may include more files so git archive is preferred
tar -tzf "$TARBALL" &> /dev/null
if [ $? -ne 0 ]; then
rm -f "$TARBALL"
pushd "$SRC_DIR"
tar -cvzf "$TARBALL" --transform "s,^,$NAME/," *
popd
fi

cp "$SRC_DIR"/contrib/*.patch "$RPMBUILD/SOURCES" 2>/dev/null
add_patches "$RPMBUILD/SPECS/$PACKAGE_NAME.spec" \
Expand Down
2 changes: 2 additions & 0 deletions src/tests/system/mhc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ domains:

- hostname: master.ipa.test
role: ipa
artifacts:
- /var/log/iparestore.log
config:
client:
ipa_domain: ipa.test
Expand Down
2 changes: 1 addition & 1 deletion src/tests/system/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ git+https://github.com/next-actions/pytest-mh
git+https://github.com/next-actions/pytest-ticket
git+https://github.com/next-actions/pytest-tier
git+https://github.com/next-actions/pytest-output
git+https://github.com/SSSD/sssd-test-framework
git+https://github.com/pbrezina/sssd-test-framework@citest
Loading