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

Add git sync v4 #23

Merged
merged 26 commits into from
Feb 6, 2024
Merged

Conversation

jaytmiller
Copy link
Collaborator

Adds a 4th independent git-sync rewrite which has the same general strategy of v2 and v3 where clone directories are kept r/w for notebook execution but files/notebooks are locked down as readonly to discourage direct use for development. Major aspects of the rewrite are to switch to Python, add unit tests, and to attempt to differentiate between user-owned/modified files and git-owned files to avoid altering user files, even file perms. Also attempts to directly communicate with users using a SYNC-INSTRUCTIONS.md file to explain intended usage, and provides an opt-out mechanism for e.g. TIKE users who don't care about updates. Also stops using default repo names and moves all clones to a references/ directory. Affects all missions, all post-start-hooks updated with the intent that most failures cannot block logins, with EFS quota violations being the one failure I recall that can block logins. Also adds a gs4.fail.log file to the repo directory, assuming the repo dir exists but the sync failed hard for some reason; deleted for successful syncs.

frozen builds need to happen on AWS anyway and if changes don't include
frozen updates they're not correctly tested on GitHub at merge time.
it was making the build fail and (b) docker-stacks diligently clear
caches making where they're stored irrelevant;  in the case of our
caches cache cleaning is currently turned off.
enabled status checking universally for git-sync-v4,  both code
and tests.
unusable and we need to revert to manual cache clearing.
…-o pipefail'

  to demo correct handling of multi-line scripts failing mid-way.
Removed unused debug code which printed all results/error status for shell()
  even when check=False.
msanchezst
msanchezst previously approved these changes Feb 6, 2024
Copy link
Collaborator

@msanchezst msanchezst left a comment

Choose a reason for hiding this comment

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

Wow, this was a lot of work and so many moving pieces. It looks fantastic to me. Thanks for putting all this together and all the planning that went into it.

deployments/common/common-scripts/SYNC-INSTRUCTIONS.md Outdated Show resolved Hide resolved
deployments/common/pkgs/git-sync-v4/design.txt Outdated Show resolved Hide resolved
deployments/jwebbinar/environments/post-start-hook Outdated Show resolved Hide resolved
Copy link
Collaborator

@msanchezst msanchezst left a comment

Choose a reason for hiding this comment

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

Looks great!

@jaytmiller jaytmiller merged commit 9c37c55 into spacetelescope:main Feb 6, 2024
8 of 9 checks passed
@jaytmiller jaytmiller deleted the add-git-sync-v4-rb branch March 6, 2024 22:20
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.

2 participants