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

It's german. It means "the dev, the" #3212

Merged
merged 1 commit into from Jan 5, 2024
Merged

It's german. It means "the dev, the" #3212

merged 1 commit into from Jan 5, 2024

Conversation

zaneselvans
Copy link
Member

@zaneselvans zaneselvans commented Jan 4, 2024

Overview

https://www.youtube.com/watch?v=gaXigSu72A4

Covers most of the tasks in #3179 which is the last bit of #3140

  • Update docs to refer to main, nightly, and stable branches rather than dev in explaining our git workflow and nightly build / data distribution setup.
  • Change all direct links to Read The Docs to use the newly default nightly docs rather than dev.
  • Update nightly build scripts and other github actions workflows to run off of main rather than dev.
  • Update dependabot and pre-commit-ci to run against main instead of dev.
  • Switch to using gs://builds.catalyst.coop for our build outputs.
  • Remove obsolete docker/.env file and define those envvars either in the container / workflow / script.

Testing

  • Manually ran a build off of this branch.

To-do list

Edit tasklist title
Beta Give feedback Tasklist To-do list, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Update the release notes: reference the PR and related issues.
    Options
  2. Review the PR yourself and call out any questions or issues you have
    Options

@zaneselvans zaneselvans linked an issue Jan 4, 2024 that may be closed by this pull request
@zaneselvans zaneselvans added docs Documentation for users and contributors. cloud Stuff that has to do with adapting PUDL to work in cloud computing context. release Tasks directly related to data and software releases. nightly-builds Anything having to do with nightly builds or continuous deployment. labels Jan 4, 2024
@zaneselvans zaneselvans self-assigned this Jan 4, 2024
@zaneselvans zaneselvans linked an issue Jan 4, 2024 that may be closed by this pull request
.github/workflows/build-deploy-pudl.yml Show resolved Hide resolved
@@ -22,17 +21,15 @@ jobs:
contents: write
id-token: write
steps:
- name: Use pudl-deployment-dev vm and dev branch if running on a schedule
- name: Use pudl-deployment-dev vm if running on a schedule
if: ${{ (github.event_name == 'schedule') }}
run: |
echo "This action was triggered by a schedule."
echo "GCE_INSTANCE=pudl-deployment-dev" >> $GITHUB_ENV
Copy link
Member Author

Choose a reason for hiding this comment

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

Hopefully we'll be on Batch shortly and the archaic naming of this VM won't matter.

Copy link
Member

Choose a reason for hiding this comment

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

I also think, at some point, we just trigger the whole build-deploy only on tag push and workflow dispatch, and just make the nightly tag on a schedule. Which will mean we don't have to do all these conditionals on the event name.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've been thinking it might be nice to completely separate the build and deploy processes.

Like the build runs the ETL and tests / validations and fills up a directory in gs://builds.catalyst.coop as it does now, and then a totally separate script could be used to update the nightly branch, and deploy the outputs from a selected BUILD_ID to any combination of:

  • Datasette on Fly.io
  • AWS Open Data Registry S3 buckets
  • Our GCS buckets that mirror AWS
  • ...

README.rst Outdated Show resolved Hide resolved
docker/.env Outdated Show resolved Hide resolved
docs/index.rst Show resolved Hide resolved
docs/data_access.rst Show resolved Hide resolved
docs/dev/nightly_data_builds.rst Show resolved Hide resolved
docs/dev/nightly_data_builds.rst Show resolved Hide resolved
docs/dev/nightly_data_builds.rst Outdated Show resolved Hide resolved
docs/dev/project_management.rst Show resolved Hide resolved
Copy link
Member

@jdangerx jdangerx left a comment

Choose a reason for hiding this comment

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

This looks great!

A few loose ends here and there, which I guess are technically not blocking the deprecation of dev. But, since we still also need to communicate to people about the new process, I think we're not in such a hurry. So maybe it's worth just fixing them.

In terms of communication, I think what we need to communicate is:

"New process, same as the old process, except now you branch off of and merge into main. Which means you don't have to manually change the base branch each time you make a PR, yay! Also don't mess with nightly/stable and still don't push things willy-nilly to main."

If that sounds good to you, feel free to copy-paste that right into Slack, hah.

.github/workflows/build-deploy-pudl.yml Show resolved Hide resolved
@@ -22,17 +21,15 @@ jobs:
contents: write
id-token: write
steps:
- name: Use pudl-deployment-dev vm and dev branch if running on a schedule
- name: Use pudl-deployment-dev vm if running on a schedule
if: ${{ (github.event_name == 'schedule') }}
run: |
echo "This action was triggered by a schedule."
echo "GCE_INSTANCE=pudl-deployment-dev" >> $GITHUB_ENV
Copy link
Member

Choose a reason for hiding this comment

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

I also think, at some point, we just trigger the whole build-deploy only on tag push and workflow dispatch, and just make the nightly tag on a schedule. Which will mean we don't have to do all these conditionals on the event name.

.github/workflows/update-conda-lockfile.yml Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
docker/gcp_pudl_etl.sh Outdated Show resolved Hide resolved
docker/vm_startup_script.sh Show resolved Hide resolved
docs/data_access.rst Show resolved Hide resolved
docs/dev/nightly_data_builds.rst Outdated Show resolved Hide resolved
docs/dev/project_management.rst Show resolved Hide resolved
.github/workflows/update-conda-lockfile.yml Show resolved Hide resolved
README.rst Show resolved Hide resolved
docker/.env Outdated Show resolved Hide resolved
docker/vm_startup_script.sh Show resolved Hide resolved
docs/dev/nightly_data_builds.rst Outdated Show resolved Hide resolved
docs/dev/project_management.rst Show resolved Hide resolved
@zaneselvans
Copy link
Member Author

zaneselvans commented Jan 4, 2024

Hmm @bendnorman @jdangerx it looks like Google was really hoping for that .env file. Or is this a setting that's associated with the VM somewhere?

Updated [https://www.googleapis.com/compute/v1/projects/***/zones/***/instances/pudl-deployment-tag].
ERROR: (gcloud.compute.instances.update-container) Unable to read file [./docker/.env]: [Errno 2] No such file or directory: './docker/.env'
Error: Process completed with exit code 1.

Edit: ah nevermind we were specifying it in the deploy workflow.

- Update docs and build scripts to reflect new branch structure.
- Run builds every night, but only if there are changes.
- Rename nightly-build-outputs.catalyst.coop bucket to builds.catalyst.coop.
- Remove docker/.env file and define those envvars elsewhere.
- Add some basic release notes about our new branches / workflow
@zaneselvans zaneselvans merged commit e9c205a into dev Jan 5, 2024
10 of 11 checks passed
@zaneselvans zaneselvans deleted the die-dev-die branch January 5, 2024 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloud Stuff that has to do with adapting PUDL to work in cloud computing context. docs Documentation for users and contributors. nightly-builds Anything having to do with nightly builds or continuous deployment. release Tasks directly related to data and software releases.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Deprecate and remove dev branch Move to trunk-based development
4 participants