Skip to content

AZP/RELEASE: Scheduled DRP testing - #10020

Merged
yosefe merged 1 commit into
openucx:masterfrom
Alexey-Rivkin:topic/DRP-scheduled-testing
Sep 29, 2024
Merged

yosefe merged 1 commit into
openucx:masterfrom
Alexey-Rivkin:topic/DRP-scheduled-testing

Conversation

@Alexey-Rivkin

Copy link
Copy Markdown
Contributor

What

Add scheduled testing for the DRP release environment.

Why ?

https://jirasw.nvidia.com/browse/HPCINFRA-2291 (internal link)

How ?

Scheduled builds to create artifacts but not publish them.

Emergency release procedure:

  1. Disable the main release pipeline.
  2. Proceed as usual.

The DRP release pipeline will check the status of the main release pipeline.
Only if main is disabled will it run the full release cycle including the artifact's publishing.

@Alexey-Rivkin Alexey-Rivkin added the WIP-DNM Work in progress / Do not review label Jul 17, 2024
@Alexey-Rivkin
Alexey-Rivkin force-pushed the topic/DRP-scheduled-testing branch 7 times, most recently from 272e4f6 to 20a1745 Compare July 18, 2024 09:19
@Alexey-Rivkin

Copy link
Copy Markdown
Contributor Author

@Alexey-Rivkin Alexey-Rivkin removed the WIP-DNM Work in progress / Do not review label Jul 18, 2024
@Alexey-Rivkin
Alexey-Rivkin marked this pull request as ready for review July 18, 2024 11:23
@Alexey-Rivkin
Alexey-Rivkin requested a review from dpressle July 18, 2024 16:15
Comment thread buildlib/az-helpers.sh Outdated
then
launch=True
if [[ "$BUILD_DEFINITIONNAME" == *"DRP" ]]
then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

wrong indent

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was a bit more readable that way😪

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMO it's less readable because it does not comply with the if nesting level

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

"then" was definitely wrongly indented, thx

Comment thread buildlib/az-helpers.sh

# DRP release scheduled testing
if [ "${build_reason}" == "Schedule" ]; then
launch=True

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

shouldn't we check *DRP match under this branch?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The scheduler is only set for the DRP pipeline, but it's better to be on the safe side.

variables:
DOCKER_OPT_VOLUMES: -v /hpc/local:/hpc/local
REPO_MIRROR: harbor-pdc.nvidia.com
# REPO_MIRROR: harbor-pdc.nvidia.com

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

remove commented out line?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was supposed to be a temp workaround, but as the PDC mirror is still down, let's keep using the main repo.

@Alexey-Rivkin Alexey-Rivkin left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Applied all remarks

Comment thread buildlib/az-helpers.sh

# DRP release scheduled testing
if [ "${build_reason}" == "Schedule" ]; then
launch=True

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The scheduler is only set for the DRP pipeline, but it's better to be on the safe side.

Comment thread buildlib/az-helpers.sh Outdated
then
launch=True
if [[ "$BUILD_DEFINITIONNAME" == *"DRP" ]]
then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was a bit more readable that way😪

variables:
DOCKER_OPT_VOLUMES: -v /hpc/local:/hpc/local
REPO_MIRROR: harbor-pdc.nvidia.com
# REPO_MIRROR: harbor-pdc.nvidia.com

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This was supposed to be a temp workaround, but as the PDC mirror is still down, let's keep using the main repo.

@Alexey-Rivkin
Alexey-Rivkin force-pushed the topic/DRP-scheduled-testing branch 2 times, most recently from c19d2f0 to 5baa559 Compare July 21, 2024 12:06
Comment thread buildlib/az-helpers.sh Outdated
then
launch=True
if [[ "$BUILD_DEFINITIONNAME" == *"DRP" ]]
then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IMO it's less readable because it does not comply with the if nesting level

variables:
DOCKER_OPT_VOLUMES: -v /hpc/local:/hpc/local
REPO_MIRROR: harbor-pdc.nvidia.com
REPO_MIRROR: harbor.mellanox.com

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

pls remove trailing space

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

sorry

@Alexey-Rivkin
Alexey-Rivkin force-pushed the topic/DRP-scheduled-testing branch from 60321e8 to f3255ec Compare July 21, 2024 12:18
yosefe
yosefe previously approved these changes Jul 21, 2024
@yosefe

yosefe commented Jul 21, 2024

Copy link
Copy Markdown
Member

@Alexey-Rivkin pls squash

@Alexey-Rivkin
Alexey-Rivkin force-pushed the topic/DRP-scheduled-testing branch from f3255ec to 1d42ca1 Compare July 21, 2024 13:49
Comment thread buildlib/az-helpers.sh Outdated
if [ "${build_reason}" == "IndividualCI" ] || \
[ "${build_reason}" == "ResourceTrigger" ]
# DRP release scheduled testing
if [ "${build_reason}" == "Schedule" ] && [[ "$BUILD_DEFINITIONNAME" == *"DRP" ]]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is weird syntax are you using bash or posix? why use both, i would prefer to see this logic using case esac block its much readable in my opinion:

case $build_reason in
    Schedule|*DRP)
        launch=True
    ;;
    IndividualCI|ResourceTrigger)    
        if [[ "$BUILD_DEFINITIONNAME" == *"DRP" ]]
        then
            # Release from DRP only if main pipeline is disabled
            install_az_tools
            launch=$(check_main_pipeline_status)
        else
            launch=True
        fi
    ;;
    PullRequest)
        # In case of pull request, HEAD^ is the branch commit we merge with
        range="$(git rev-parse HEAD^)..${build_sourceversion}"
        for sha1 in `git log $range --format="%h"`
        do
            title=`git log -1 --format="%s" $sha1`
            [[ "$title" == "${title_mask}"* ]] && launch=True;
        done
    ;;
    *)
        echo "unsupported option $build_reason"
        exit 1
    ;;
esac

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My purpose was not to refactor the code but to introduce minimal changes while following the existing syntax.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As for the single vs. double brackets usage:
Single brackets do not support pattern matching with wildcards. That's why I had to make it double for the second condition check.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you should learn what is the differance between bash and posix, this should work fine:
if [[ $build_reason = "Schedule" && $BUILD_DEFINITIONNAME = *"DRP" ]]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok

Comment thread buildlib/az-helpers.sh Outdated
if [[ "$BUILD_DEFINITIONNAME" == *"DRP" ]]
then
# Release from DRP only if main pipeline is disabled
install_az_tools

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would call it from check_main_pipeline_status function as it is the one that needs it, in your implementation anyone who calls this function needs to call the install function before which seems redandent and confusing

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My first take was the same. The output from both functions (install_az_tools, check_main_pipeline_status) got mixed up in Azure, causing the "launch" variable to be assigned a long, meaningless value.

Also, the install function is called only for the DRP pipeline.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we really have to install tools as part of test pipeline? Can't we do it as part of system setup?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed az tools installation from CI and updated the documentation (internal link).

- v*.*.x

schedules:
- cron: '0 0 * * *'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we probably should not run it nightly, once a week i smore then enough

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'd better check it daily to catch it faster and make it easier to find the root cause.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is way too often, and since these processes are sensitive to false positive failures i dont want you (or me if you are not here) to have to monitor and debug on daily basis.
We also need to talk about who/what is monitoring this process this i snot something that only you should be aware of.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok

@dpressle

Copy link
Copy Markdown
Contributor

Let's not merge it yet, we still dont have pdc harbor working and i dont want to push a fix soon just for harbor url

variables:
DOCKER_OPT_VOLUMES: -v /hpc/local:/hpc/local
REPO_MIRROR: harbor-pdc.nvidia.com
REPO_MIRROR: harbor.mellanox.com

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lets wait for the PDC harbor to work (next week) before we merge it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated

@Alexey-Rivkin

Copy link
Copy Markdown
Contributor Author

/azp run UCX PR

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@Alexey-Rivkin
Alexey-Rivkin force-pushed the topic/DRP-scheduled-testing branch from 12fed65 to afbb90f Compare September 18, 2024 11:16
Comment thread buildlib/az-helpers.sh Outdated
if [[ "$BUILD_DEFINITIONNAME" == *"DRP" ]]
then
# Release from DRP only if main pipeline is disabled
install_az_tools

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we really have to install tools as part of test pipeline? Can't we do it as part of system setup?

@yosefe yosefe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

pls squash

@Alexey-Rivkin
Alexey-Rivkin force-pushed the topic/DRP-scheduled-testing branch from fed9b40 to fa1be8b Compare September 29, 2024 07:52
@yosefe
yosefe enabled auto-merge September 29, 2024 08:13
@yosefe
yosefe merged commit 63747d6 into openucx:master Sep 29, 2024
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.

3 participants