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

Restructure the contents of the MET repository so that it matches the existing release tarfiles. #1920

Closed
22 of 38 tasks
JohnHalleyGotway opened this issue Sep 15, 2021 · 5 comments · Fixed by #2161
Closed
22 of 38 tasks
Assignees
Labels
component: build process Build process issue component: release engineering Release engineering issue priority: blocker Blocker reporting: DTC NCAR Base NCAR Base DTC Project reporting: DTC NOAA BASE NOAA Office of Atmospheric Research DTC Project requestor: METplus Team METplus Development Team required: FOR DEVELOPMENT RELEASE Required to be completed in the development release for the assigned project type: task An actionable item of work
Milestone

Comments

@JohnHalleyGotway
Copy link
Collaborator

JohnHalleyGotway commented Sep 15, 2021

NOTE: This will be a major change to all existing development branches!

Describe the Task

Motivation:

  • Make it easier to compile MET directly from GitHub.
  • Utilizing GitHub's release creation rather than manually building/attaching a custom release tarfile.
  • Supports the METplus use of Manage Externals.

Recommend making the following changes:

  • Store the output of running bootstrap (Makefile.in, configure, etc) directly in the repo.
  • Store the output of running enum_to_string anf ylwrap directly in the repo.
  • Modify enum_to_string logic to NOT include the timestamp of the runtime in its output. Otherwise we'd end up with lots of diffs in the future where the only real diff is that timestamp.
  • Move the contents of the "met" directory up to the top-level of the repo.
  • Create a top-level directory for "internal".
  • Move existing top-level "scripts" and "test" directories into the new "internal" directory. Consider renaming "test" to something else, perhaps "unit_tests"?
  • Prune any existing scripts that are no longer needed after this change.
  • Update and test all existing scripts to make sure they still work.
  • Update the nightly build script in particular.
  • Test the compile_all_MET.sh script and update as needed.
  • Update the DockerHub build rules since the location of the Dockerfile will have changed.
  • Test/fix the RTD automation logic, if needed.
  • Update the logic for $MET_DEVELOPMENT. Commit the files created by it directly to the repository. If that env var is set, recreate them as necessary. If not, use them as is from the repo. Also, only compile ‘internal’ code if set.
  • Update the ‘make dist’ logic. It still is useful to build a tar file in this way. But it will likely need to do fewer things.
  • Update the METplus Release Guide instructions... they should be simpler now.
  • Create a branch and PR in the hpc-stack repo to update the code to install MET (Julie)
  • Communicate with Will Hatheway about the impact on his scripts (Julie)

The main goal is minimizing impacts on existing scripts and installation instructions so that any that worked previously with a released tarfile will continue to work with GitHub's tarfile.

Be sure to go a git move instead of delete/add so that it can keep tracks of these changes.

Time Estimate

Estimate the amount of work required here.
Issues should represent approximately 1 to 3 days of work.

Sub-Issues

Consider breaking the task down into sub-issues.
No sub-issues needed.

Relevant Deadlines

List relevant project deadlines here or state NONE.

Funding Source

Split 2702691, 2792541

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required: @JohnHalleyGotway (and @georgemccabe is willing to help if needed)
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Repository and/or Organization level Project(s) or add alert: NEED PROJECT ASSIGNMENT label
  • Select Milestone as the next official version or Future Versions

Define Related Issue(s)

Consider the impact to the other METplus components.

Task Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Linked issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@JohnHalleyGotway JohnHalleyGotway added component: build process Build process issue type: task An actionable item of work priority: blocker Blocker alert: NEED ACCOUNT KEY Need to assign an account key to this issue component: release engineering Release engineering issue reporting: DTC NOAA R2O NOAA Research to Operations DTC Project requestor: METplus Team METplus Development Team required: FOR DEVELOPMENT RELEASE Required to be completed in the development release for the assigned project labels Sep 15, 2021
@JohnHalleyGotway JohnHalleyGotway added this to the MET 10.1.0 milestone Sep 15, 2021
@JohnHalleyGotway JohnHalleyGotway self-assigned this Sep 15, 2021
@JohnHalleyGotway JohnHalleyGotway added the alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle label Sep 23, 2021
@JohnHalleyGotway
Copy link
Collaborator Author

Discussed the timing of this work during the 9/23/21 MET development meeting. This is a large change and we recommend moving it from the minor version 10.1.0 release over to the next major version 11.0.0 release. After completing the work for 10.1.0 we'll have a good opportunity to make this large structural change before moving into new development for 11.0.0.

So this should be first thing done for 11.0.0. Will create a beta1 development project for 11.0.0 and add this as "required" for that development release.

@JohnHalleyGotway JohnHalleyGotway removed the alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle label Sep 23, 2021
@georgemccabe
Copy link
Collaborator

@JohnHalleyGotway I agree that this major change should be done for a major release.

Something to keep in mind is that when you move a file in GitHub, you cannot follow the history of that file using the GitHub web interface. Here is a relevant discussion: community/community#3272
There are browser extensions that can add this functionality. The history can be viewed using git on the command line with the --follow argument.

JohnHalleyGotway added a commit that referenced this issue May 6, 2022
JohnHalleyGotway added a commit that referenced this issue May 6, 2022
JohnHalleyGotway added a commit that referenced this issue May 12, 2022
…unused. Looks like there were originally used to test out stat_analysis.
JohnHalleyGotway added a commit that referenced this issue May 12, 2022
@JohnHalleyGotway
Copy link
Collaborator Author

Review the shell scripts that live in the repo and look for needed updates:

There are 54 of them in total.

find ./ -name "*.sh" | wc -l
      54
  1. No updates needed in the 16 in scripts/examples.
  • I ran make clean install test which exercises them and it runs fine.
  1. 12 in internal/test_unit/bin:
  • Deleted 3 stale ones for Stat-Analysis.
  • Found no reference to '/met/' in the other 9. If these do fail, that'll be apparent in the regression test.
  • Did strip out stale default settings for MET_TEST_BASE from the scripts.
  1. 1 in internal/scripts/docker/build_met_docker.sh.
  • Removed met from docker-clean
  • Reviewed logic in the script and Dockerfiles.
  1. 2 in internal/scripts/fortify.
  • Deleted the fortify directory that is no longer needed.
  1. 1 in internal/scripts/installation/compile_MET_all.sh
  • No changes needed since this is already setup to compile code from a tarfile.
  1. 2 in internal/scripts/build
  • Removed call to bootstrap
  • Tested running met_checkout_and_build.sh branch feature_1920_repo
  1. 3 in internal/scripts/regression
  • Updated paths in all 3 files.
  1. 2 in internal/scripts/sonarqube
  • Updated paths in 2 files.

Misc changes:

  • Deleted 11 of 12 sample data files from internal/test_unit/data/mnc that are no longer used in the unit tests.
  • Recommend getting rid of the last one too by changing the unit tests.

@jprestop
Copy link
Collaborator

@JohnHalleyGotway I really appreciate all of the detail in your comments above. Regarding:

  1. 1 in internal/scripts/installation/compile_MET_all.sh
    No changes needed since this is already setup to compile code from a tarfile.

I believe there are two changes that are needed on lines 796 and 799.

I believe those will need to be changed to be capitalized (e.g. MET) because I believe the tarball made by GitHub will be MET-x.y.x.tar.gz and will unpack to MET-x.y.z. In its current state, I believe the script would not remove a MET-x.y.z directory with "rm -rf met*" or change directories to MET-x.y.z with "cd met*". Although, perhaps we don't want to change it to "MET" if there is someway to make it case insensitive. Thoughts?

JohnHalleyGotway added a commit that referenced this issue May 12, 2022
…m corresponding Makefile.in files. With them present, running make without MET_DEVELOPMENT set errors out.
JohnHalleyGotway added a commit that referenced this issue May 12, 2022
…ed by bootstrap. Modifying them was not the right way to solve the problem.
JohnHalleyGotway added a commit that referenced this issue May 12, 2022
…e that causes a compilation error downstream.
JohnHalleyGotway added a commit that referenced this issue May 12, 2022
@JohnHalleyGotway JohnHalleyGotway linked a pull request May 12, 2022 that will close this issue
15 tasks
JohnHalleyGotway added a commit that referenced this issue May 12, 2022
…o uppercase MET to use tarfiles created by GitHub.
@JohnHalleyGotway
Copy link
Collaborator Author

@jprestop I made your recommended change to compile_MET_all.sh with this commit.

Note that I'm still keeping the shell scripts that we've used in the past to create release tarfiles in the repo. We may eventually be able to remove those if/when we decide they aren't useful anymore.

JohnHalleyGotway added a commit that referenced this issue May 13, 2022
… specific count of them since that changes and we often fail to update it. I didn't find any other doc changes to make since the user's guide describes the tarfile contents... and we're making the repo match the tarfile structure.
JohnHalleyGotway added a commit that referenced this issue May 16, 2022
…. Switching the automake output from version 1.16.5 that lives on my laptop to version 1.16.1 that lives on seneca. Figure its better to be consistent with the version on our shared development machine rather than my laptop. Another option would be NOT storing the Makefile.in files at all and instead instructing the users to run bootstrap first. The downside to that is that we HAVE NOT required users to run bootstrap for released tarfiles in the past. Adding that requirement would break any existing scripts that already exist and would also introduce automake as a new compilation dependency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: build process Build process issue component: release engineering Release engineering issue priority: blocker Blocker reporting: DTC NCAR Base NCAR Base DTC Project reporting: DTC NOAA BASE NOAA Office of Atmospheric Research DTC Project requestor: METplus Team METplus Development Team required: FOR DEVELOPMENT RELEASE Required to be completed in the development release for the assigned project type: task An actionable item of work
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants