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

Update status check job to check status of precursor jobs #605

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

jrhemstad
Copy link
Collaborator

@jrhemstad jrhemstad commented Oct 24, 2023

Description

In our CI, we have a final job called ci that depends on all the prior jobs via needs:. This job is intended to be used as a status check such that a PR cannot be merged if this job has not been completed successfully.

However, the status check job was not working as intended. Most importantly, if predecessor jobs were skipped, then the CI job would be skipped. Skipped jobs report as successful for the purpose of status checks:

image

This is not what we want. We want the status check job to always run, and exit if any of the predecessor jobs failed.

This boils down to two things:

  • Make the ci job always run by using if ${{ always() }}
  • Make the ci job explicitly check the status of precursor jobs. This uses a slick trick of using a wildcard in needs.*.result to avoid having to re-list all of the jobs.

@jrhemstad jrhemstad requested review from a team as code owners October 24, 2023 19:38
@jrhemstad jrhemstad requested review from jarmak-nv and alliepiper and removed request for a team October 24, 2023 19:38
Normally you want to avoid `always()` in favor of `!cancelled()`, but in this case we want to use `always()` because using `!cancelled()` would lead to the `ci` job being skipped, which would report as a success for the status check.
@jarmak-nv
Copy link
Collaborator

jarmak-nv commented Oct 24, 2023

Do you think it's possible that the issues described here impact us? actions/runner#1540

I'm not 100% sure if indirect dependencies might cause problems, but just wanted to bring it to your attention if you hadn't seen it.

I think after re-reading this, we might want to change the

        if: >-
          ${{
               contains(needs.*.result, 'failure')
            || contains(needs.*.result, 'cancelled')
            || contains(needs.*.result, 'skipped')
          }}

to

        if: >-
          ${{
               contains(needs.*.result == 'failure')
            || contains(needs.*.result == 'cancelled')
            || contains(needs.*.result == 'skipped')
          }}

But again, not fully certain on this.

@jrhemstad
Copy link
Collaborator Author

Do you think it's possible that the issues described here impact us? actions/runner#1540

My reading is that this doesn't apply because we're not doing the contains logic as a job level conditional, but a step level conditional.

@jarmak-nv
Copy link
Collaborator

My reading is that this doesn't apply because we're not doing the contains logic as a job level conditional, but a step level conditional.

Oh right I always mix those up

Copy link
Collaborator

@jarmak-nv jarmak-nv left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@jrhemstad jrhemstad merged commit 2a23cfb into main Oct 25, 2023
513 of 515 checks passed
@miscco miscco deleted the jrhemstad-patch-9 branch March 7, 2024 19:34
alliepiper added a commit to alliepiper/cccl that referenced this pull request May 3, 2024
alliepiper added a commit that referenced this pull request May 3, 2024
alliepiper added a commit that referenced this pull request May 10, 2024
…mensions type template (#1485)

* CUDA hierarchy dimensions initial commit

* Fixes to sources from pull request
Fix missing _CCCL_HOST_DEVICE and add missing ones
Change index_type to dimensions_index_type
License year fixes

* Cmake fixes
Add cmake files for package management, for now hardcode version 0.1
Make CCCL package include CUDA_Next
Add C++17 target properties to CUDA_Next

* Readme fixes with minimal starting support matrix

* Fix typo in a comment

Co-authored-by: Michael Schellenberger Costa <miscco@nvidia.com>

* Fix readme typo

Co-authored-by: Allard Hendriksen <allard@allardhendriksen.nl>

* Update CMake and add CI for CudaNext.

* Disable CudaNext install rules, targets, and build options by default.

Must define `CCCL_ENABLE_UNSTABLE` to opt-in to any
usage of CudaNext.

* Rename headers to .cuh.

* Document `CCCL_ENABLE_UNSTABLE` option for exposing CudaNext targets.

* Use a new CI matrix for CudaNext, update README.

* Fix compilation issues on clang and MSVC

MSVC needs a compilation flag to correctly report the c++ standard,
which is needed to make dim3 usable in constexpr context
Clang had several issues.
First one was using references in constexpr context like
static_assert(x.func()), where x is a reference.
Second one was issues with defaulted constructors in constexpr context
Third one was an issue with tuple layout when passed into a kernel

* Fix clang-format

* Trim CI matrix a bit and add compiler specific flags
This change removes two oldest GCC versions 7,8 from the CI
It seems there is a bug in those versions that are not worth working around
This change also adds a new CudaNextCudaConfig.cmake file
It contains some compiler specific flags
(I hope I followed the convention correctly)
Finally it includes some small fixes in the code

* Add validity checks to inspect_changes.sh

* Add cuda_next to inspect_changes

* Update pr.yml with CUDA_NEXT info

* Add compiler flag interface target.

* Fix some trivial warnings in the default gcc devcontainer.

* Update container image name for msvc2022+CTK12.0.

* Tweak warning flags.

* More warning flag tweaks.

* Add cuda-next devcontainers.

* More warnings.

* Move extended lambdas to non-static functions
On Windows extented lambda can't be defined
inside a static function. Our testing use extended
lambdas in catch2 test cases, which are static.
This change moves them to a separate function

* Temporarily disable c++17 builds on Windows
mdspan is not supported with c++17 on Windows.
The only feature that is in cuda_next right now relies on
std::extents from that header. I want to explore supporting
std::extents in c++17, so for now just disable c++17
Windows builds, until a long term solution is picked

* Fix MSVC compilation errors
maybe_unused was needed for some reason for
one if constexpr branch and some explicit casts

* Clang format fixes

* Fix CUDA 12.0 test issue with constexpr
For some reason MSVC complains about constexpr in that test,
but it seems to work without it.
While at it, slightly refactor hierarchy
level creating functions.

* Remove remining c++17 Windows build

* Disable Wextra in cuda_next builds
NVCC + clang complains about something
in internal implementation of extended lambda.
Disable Wextra until its fixed

* [pre-commit.ci] auto code formatting

* Change cuda_next namespace to cuda::experimental
Updates are still needed to the build system, header guards and README

* Separate dims description library to a separate PR
This PR will now focus only on the needed
CUDA Experimental infrastructure
A follow-up PR will bring the library back

* Don't fail on bad-alloc for large memory test.

* Rebuild CI infra, add nightly workflow.

* regenerate devcontainers

* Branch protection WAR: #605 Reprise

* Infra: rename CudaNext -> cudax

* Update devcontainers.

* Update inspect changes conflict.

* Fix condition check.

[skip-tests] since this is only changing infra.

* Copy/paste error.

* [pre-commit.ci] auto code formatting

* Allow CMAKE_BUILD_TYPE to be set for cudax.

* Disable cudax CI until the project is ready.

---------

Co-authored-by: Michael Schellenberger Costa <miscco@nvidia.com>
Co-authored-by: Allard Hendriksen <allard@allardhendriksen.nl>
Co-authored-by: Allison Piper <alliepiper16@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Eric Niebler <eniebler@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants