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

UFS-dev PR#28 #83

Merged
merged 13 commits into from
Jan 23, 2023
Merged
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
11 changes: 9 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,33 @@ assignees: ''
---

## Description
<!--
Provide a clear and concise description of what the bug is.
Also give a description of what behavior you expected to happen.
-->


### To Reproduce:
<!--
What compilers/machines are you seeing this with?
Give explicit steps to reproduce the behavior.
1. do this
2. then that
3. then, oops, look at the bug
-->


## Additional context
<!--
Add any other context about the problem here.
Directly reference any issues or PRs in this or other repositories that this is related to, and describe how they are related. Example:
- needs to be fixed also in noaa-emc/nems/issues/<issue_number>
- needed for noaa-emc/fv3atm/pull/<pr_number>
-->


## Output

<!--
**Screenshots**
If applicable, drag and drop screenshots to help explain your problem.

Expand All @@ -37,5 +43,6 @@ If applicable, include relevant output logs.
Either drag and drop the entire log file here (if a long log) or

```
paste the code here (if a short section of log)
paste the code in this type of section (if a short section of log)
```
-->
9 changes: 8 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@ assignees: ''
---

## Description
<!--
Provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
-->

## Solution
<!--
Add a clear and concise description of what you want to happen.
-->

## Alternatives
<!--
If applicable, add a description of any alternative solutions or features you've considered.
-->

## Related to
Directly reference any issues or PRs in this or other repositories that this is related to, and describe how they are related. Example:
<!--Directly reference any issues or PRs in this or other repositories that this is related to, and describe how they are related. Example:
- required to support noaa-emc/nems/issues/<issue_number>
- needed by noaa-emc/fv3atm/pull/<pr_number>
-->
128 changes: 78 additions & 50 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,80 @@
# PR Checklist

- [ ] This PR is up-to-date with the top of all sub-component repositories except for those sub-components which are the subject of this PR. Please consult the ufs-weather-model [wiki](https://github.com/ufs-community/ufs-weather-model/wiki/Making-code-changes-in-the-UFS-weather-model-and-its-subcomponents) if you are unsure how to do this.

- [ ] This PR has been tested using a branch which is up-to-date with the top of all sub-component repositories except for those sub-components which are the subject of this PR

- [ ] An Issue describing the work contained in this PR has been created either in the subcomponent(s) or in the ufs-weather-model. The Issue should be created in the repository that is most relevant to the changes in contained in the PR. The Issue and the dependent sub-component PR
are specified below.

- [ ] Results for one or more of the regression tests change and the reasons for the changes are understood and explained below.

- [ ] New or updated input data is required by this PR. If checked, please work with the code managers to update input data sets on all platforms.

## Instructions: All subsequent sections of text should be filled in as appropriate.

The information provided below allows the code managers to understand the changes relevant to this PR, whether those changes are in the ufs-weather-model repository or in a subcomponent repository. Ufs-weather-model code managers will use the information provided to add any applicable labels, assign reviewers and place it in the Commit Queue. Once the PR is in the Commit Queue, it is the PR owner's responsibility to keep the PR up-to-date with the develop branch of ufs-weather-model.

## Description

<!--
Provide a detailed description of what this PR does. What bug does it fix, or what feature does it add? Is a change of answers expected from this PR? Are any library updates included in this PR (modulefiles etc.)?

### Issue(s) addressed

Link the issues to be closed with this PR, whether in this repository, or in another repository.
(Remember, issues must always be created before starting work on a PR branch!)
- fixes #<issue_number>
- fixes noaa-emc/fv3atm/issues/<issue_number>

## Testing

How were these changes tested? What compilers / HPCs was it tested with? Are the changes covered by regression tests? (If not, why? Do new tests need to be added?) Have regression tests and unit tests (utests) been run? On which platforms and with which compilers? (Note that unit tests can only be run on tier-1 platforms)

- [ ] hera.intel
- [ ] hera.gnu
- [ ] orion.intel
- [ ] cheyenne.intel
- [ ] cheyenne.gnu
- [ ] gaea.intel
- [ ] jet.intel
- [ ] wcoss2.intel
- [ ] acorn.intel
- [ ] opnReqTest for newly added/changed feature
- [ ] CI

## Dependencies

If testing this branch requires non-default branches in other repositories, list them. Those branches should have matching names (ideally).

Do PRs in upstream repositories need to be merged first?
If so add the "waiting for other repos" label and list the upstream PRs
- waiting on noaa-emc/nems/pull/<pr_number>
- waiting on noaa-emc/fv3atm/pull/<pr_number>
-->

### Top of commit queue on: TBD
<!-- Please have sub-component Code Managers ready for merging sub-component PR's on the date above and the day after the date above -->

### Input data additions/changes
- [ ] No changes are expected to input data.
- [ ] There will be new input data. <!-- Add "input data change" Label -->
- [ ] Input data will be updated. <!-- Add "New Input Data Req'd" Label -->

### Anticipated changes to regression tests:
- [ ] No changes are expected to any regression test. <!-- Add "No Baseline Change" Label -->
- [ ] Changes are expected to the following tests: <!-- Add "Baseline Change" Label -->
<!-- Please insert what RT's change and why you expect them to change -->

## Subcomponents involved:
- [ ] AQM
- [ ] CDEPS
- [ ] CICE
- [ ] CMEPS
- [ ] CMakeModules
- [ ] FV3
- [ ] GOCART
- [ ] HYCOM
- [ ] MOM6
- [ ] NOAHMP
- [ ] WW3
- [ ] stochastic_physics
- [ ] none

### Combined with PR's (If Applicable):

## Commit Queue Checklist:
<!--
Please complete all items in list. Make sure to attach logs from RT testing in comment, not in repository. Once all boxes are checked, please add the label "Ready for Commit Queue".
-->
- [ ] Link PR's from all sub-components involved
- [ ] Confirm reviews completed in sub-component PR's
- [ ] Add all appropriate labels to this PR.
- [ ] Run full RT suite on either Hera/Cheyenne with both Intel/GNU compilers
- [ ] Add list of any failed regression tests to "Anticipated changes to regression tests" section.

## Linked PR's and Issues:
<!--
Please link dependent pull requests.
EXAMPLE: Depends on NOAA-EMC/fv3atm/pull/<pullrequest_number>

Please link the related issues to be closed with this PR, whether in this repository, or in another repository.
EXAMPLE: Closes NOAA-EMC/fv3atm/issues/<issue_number>
-->

## Testing Day Checklist:
<!--
Please consult the ufs-weather-model [wiki](https://github.com/ufs-community/ufs-weather-model/wiki/Making-code-changes-in-the-UFS-weather-model-and-its-subcomponents) if you are unsure how to do this.
-->
- [ ] This PR is up-to-date with the top of all sub-component repositories except for those sub-components which are the subject of this PR.
- [ ] Move new/updated input data on RDHPCS Hera and propagate input data changes to all supported systems.

### Testing Log (for CM's):
- RDHPCS
- Intel
- [ ] Hera
- [ ] Orion
- [ ] Jet
- [ ] Gaea
- [ ] Cheyenne
- GNU
- [ ] Hera
- [ ] Cheyenne
- WCOSS2
- [ ] Dogwood/Cactus
- [ ] Acorn
- CI
- [ ] Completed
- opnReqTest
- [ ] N/A
- [ ] Log attached to comment
99 changes: 1 addition & 98 deletions .github/workflows/aux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ env:
app: Accept:application/vnd.github.v3+json
base_url: $GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/runs
AUTH: ${{ secrets.GITHUB_TOKEN }}
aws_instance_id: ${{ secrets.AWS_INSTANCE_ID }}
no_instances: 10


jobs:
pre:
Expand All @@ -26,17 +23,6 @@ jobs:
path: ~/id_file
key: helperid-${{ github.event.workflow_run.id }}

- name: Delete run-ci label
run: |
head_sha=${{ github.event.workflow_run.head_sha }}
url=$GITHUB_API_URL/repos/$GITHUB_REPOSITORY
pr_number=$(curl -sS -H $app $url/pulls \
| jq -r '.[] | select(.head.sha == "'"$head_sha"'") | .number')
echo "pr_number is $pr_number"
curl -sS -X DELETE -H $app -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
$url/issues/$pr_number/labels/run-ci


repocheck:
name: Repo check
runs-on: ubuntu-20.04
Expand All @@ -48,7 +34,6 @@ jobs:
git clone -q ${{ github.event.workflow_run.head_repository.html_url }} .
git checkout -q $head_sha
git submodule -q update --init --recursive

cd ${{ github.workspace }}/tests/ci
url=$GITHUB_API_URL/repos/$GITHUB_REPOSITORY
pr_number=$(curl -sS -H $app $url/pulls \
Expand All @@ -58,93 +43,11 @@ jobs:
echo "pr_uid is $pr_uid"
comment="$(./repo_check.sh $pr_uid 2>/dev/null)"
echo "comment is $comment"

if [[ -n $comment ]]; then
curl -sS -X POST -H $app -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
$url/issues/$pr_number/comments -d '{"body": "'"${comment}"'"}'
echo -n "failure" >~/repocheck_file
else
echo -n "success" >~/repocheck_file
fi

- uses: actions/cache@v2
with:
path: ~/repocheck_file
key: repocheck-${{ github.event.workflow_run.id }}


startrunner:
name: Start runners
needs: repocheck
runs-on: ubuntu-20.04
outputs:
started: ${{ steps.ec2.outputs.started }}

steps:
- uses: actions/checkout@v2

- name: Check all builds are complete and successful
id: current
run: |
cd ${{ github.workspace }}/tests/ci
eval url=$base_url/${{ github.event.workflow_run.id }}/jobs
b_r=$(echo -n $url | ./check_status.py build)
if [ $b_r == 'success' ]; then
echo "::set-output name=check::pass"
elif [ $b_r == 'failure' ]; then
echo "::set-output name=check::fail"
fi

- name: Check all previous runs finish using ec2
id: previous
if: steps.current.outputs.check == 'pass'
run: |
cd ${{ github.workspace }}/tests/ci
eval url=$base_url
echo -n $url | ./check_status.py ec2 ${{ github.run_id }}

- uses: aws-actions/configure-aws-credentials@v1
if: steps.current.outputs.check == 'pass'
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Start ec2 instances
id: ec2
if: steps.current.outputs.check == 'pass'
run: |
no_stopped=0
while [ $no_stopped -lt $no_instances ]; do
sleep 20
no_stopped=$(aws ec2 describe-instances --instance-ids $aws_instance_id \
| jq -r '.Reservations[].Instances[].State.Name' | grep stopped | wc -l)
echo "no_stopped: $no_stopped"
done
aws ec2 start-instances --instance-ids $aws_instance_id
echo "::set-output name=started::yes"


stoprunner:
name: Stop runners
needs: startrunner
runs-on: ubuntu-20.04
if: needs.startrunner.outputs.started == 'yes'

steps:
- uses: actions/checkout@v2

- name: Check all tests are complete
run: |
cd ${{ github.workspace }}/tests/ci
eval url=$base_url/${{ github.event.workflow_run.id }}
echo $url | ./check_status.py test

- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Stop ec2 instances
run: aws ec2 stop-instances --instance-ids $aws_instance_id

Loading