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

NXDRIVE- : Fix alpha cleaup pipeline issue #4842

Closed
Closed
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
4 changes: 4 additions & 0 deletions .github/workflows/alpha_cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
# Check for updates every day
schedule:
- cron: "0 0 * * *"
pull_request:
paths:
- "tools/cleanup.sh"
- "tools/versions.py"

# Allow to clean-up a specific version
workflow_dispatch:
Expand Down
4 changes: 2 additions & 2 deletions tools/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ main() {
python3 -m pip install --user -U setuptools wheel
python3 -m pip install --user pyyaml==5.3.1

echo ">>> Retrieving versions.yml"
rsync -e "ssh -o StrictHostKeyChecking=no" -vz nuxeo@lethe.nuxeo.com:"${REMOTE_PATH_PROD}/versions.yml" .
echo ">>> Retrieving versions.yml, yml path: ${REMOTE_PATH_PROD}/versions.yml"
rsync -e "ssh -o StrictHostKeyChecking=no" -vz nuxeo@lethe.nuxeo.com:"https://community.nuxeo.com/static/drive-updates/versions.yml" .

echo ">>> Checking versions.yml integrity"
python3 tools/versions.py --check || exit 1
Expand Down
2 changes: 2 additions & 0 deletions tools/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

def _load():
"""Get initial versions."""
print(f">>> Pwd: {os.getcwd()}")
print(f">>>>> list dir: {os.listdir(os.getcwd())}")
Comment on lines +21 to +22
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (code_refinement): Debugging statements should be conditional or removed.

Printing the current working directory and its contents can be useful for debugging but might clutter the output in production. Consider making these conditional based on a debug flag or removing them after use.

Suggested change
print(f">>> Pwd: {os.getcwd()}")
print(f">>>>> list dir: {os.listdir(os.getcwd())}")
import os
def _load():
"""Get initial versions."""
if os.getenv('DEBUG', 'False').lower() in ['true', '1', 't']:
print(f">>> Pwd: {os.getcwd()}")
print(f">>>>> list dir: {os.listdir(os.getcwd())}")


with open("versions.yml", encoding="utf-8") as yml:
return yaml.safe_load(yml.read()) or {}
Expand Down
Loading