Skip to content

Commit

Permalink
Merge branch 'master' into xroot-cs9
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Oct 31, 2024
2 parents a8b1d31 + 3198389 commit 73dac2b
Show file tree
Hide file tree
Showing 43 changed files with 2,156 additions and 1,749 deletions.
100 changes: 0 additions & 100 deletions .drone.yml

This file was deleted.

24 changes: 13 additions & 11 deletions .github/workflows/python-app.yml → .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python application

name: Linting and unit tests
on:
push:
branches: [ master ]
branches: [ "master" ]
pull_request:
branches: [ master ]
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.10"
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide, we further relax this
flake8 . --count --exit-zero --max-complexity=15 --max-line-length=130 --statistics
flake8 . --count --exit-zero --max-complexity=30 --max-line-length=130 --statistics
- name: Test with pytest
run: |
pytest
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CodeQL

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "44 11 * * 0"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ python ]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
78 changes: 78 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Releases
on:
push:
tags:
- "*"
workflow_dispatch:

jobs:
# The following is a clone of cs3org/reva/.github/workflows/docker.yml because reusable actions do not (yet) support lists as input types:
# see https://github.com/community/community/discussions/11692
release:
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'cs3org/wopiserver'] }}
strategy:
fail-fast: false
matrix:
include:
- file: wopiserver.Dockerfile
tags: ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:${{ github.ref_name }}-amd64
platform: linux/amd64
image: python:3.11-alpine
push: ${{ github.event_name != 'workflow_dispatch' }}
- file: wopiserver.Dockerfile
tags: ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:${{ github.ref_name }}-arm64
platform: linux/arm64
image: python:3.10-slim-buster
push: ${{ github.event_name != 'workflow_dispatch' }}
- file: wopiserver-xrootd.Dockerfile
tags: ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:${{ github.ref_name }}-xrootd
platform: linux/amd64
push: ${{ github.event_name != 'workflow_dispatch' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
if: matrix.platform != ''
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
if: matrix.push
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build ${{ matrix.push && 'and push' || '' }} ${{ matrix.tags }} Docker image
uses: docker/build-push-action@v3
with:
context: .
file: ${{ matrix.file }}
tags: ${{ matrix.tags }}
push: ${{ matrix.push }}
build-args: |
VERSION=${{ github.ref_name }}
BASEIMAGE=${{ matrix.image }}
platforms: ${{ matrix.platform }}
manifest:
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'cs3org/wopiserver'] }}
needs: release
if: github.event_name != 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
manifest:
- ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:${{ github.ref_name }}
- ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create manifest
run: |
docker manifest create ${{ matrix.manifest }} \
--amend ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:${{ github.ref_name }}-amd64 \
--amend ${{ vars.DOCKERHUB_ORGANIZATION }}/wopiserver:${{ github.ref_name }}-arm64
- name: Push manifest
run: docker manifest push ${{ matrix.manifest }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*pyc
*rpm
.cache
.mypy_cache
.pytest_cache
102 changes: 101 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,105 @@
## Changelog for the WOPI server

### Fri May 24 2024 - v10.5.0
- Added timeout settings for GRPC and HTTP connections (#149)
- Fixed handing of trailing slashes (#151)
- Moved docker image to 3.12.3-alpine (#147)

### Tue May 14 2024 - v10.4.0
- Added support for Microsoft compliance domains
- Fixed opening of markdown files created on Windows platforms
- Improved lock handling on write and xattr operations (#137)
- Improved logs

### Fri Jan 19 2024 - v10.3.0
- Implemented support for X-Trace-Id header (#64)
- Fixed SaveAs logic for non-authenticated (anonymous) users
- Improved handling of HTTP requests
- Improved memory efficiency by streaming files' content (#136, #141)
- Fixed 0-byte uploads (#142)

### Mon Oct 23 2023 - v10.2.0
- Implemented cache for xattrs in the cs3 storage (#128)
- Implemented advisory locking via xattrs for cs3 storages that
do not support native locking (#129)
- Improved handling of default values, in order to clean up
the default config file
- Fixed the PostMessageOrigin property in CheckFileInfo when
using the same wopiserver with multiple cloud storages
- Fixed xroot build
- Fixed failed precondition error handling in unlock

### Wed Jul 5 2023 - v10.1.0
- Fixed handling of filenames with non latin-1 characters (#127)
- Improved logging and adjusted log levels (#123)
- Switched from CentOS Stream 8 to AlmaLinux 8 for the
xroot-flavoured docker image

### Wed May 31 2023 - v10.0.0
- Added CloseUrl and other properties to CheckFileInfo
- Introduced health check of the configured storage interface
to ease deployment validation (#122)
- Inverted default for wopilockstrictcheck
- Fixed Preview mode
- Removed legacy logic for discovery of app endpoints (#119):
this is now only implemented by Reva's app providers, and
legacy ownCloud/CERNBox UIs are not supported any longer
- Removed support to forcefully evict valid locks, introduced
to compensate a Microsoft Word issue
- Converted all responses to JSON-formatted (#120)
- Cleaned up obsoleted scripts

### Fri Mar 10 2023 - v9.5.0
- Introduced concept of user type, given on `/wopi/iop/open`,
to better serve federated vs regular users with respect to
folder URLs and SaveAs operations
- Redefined `conflictpath` option as `homepath` (the former is
still supported for backwards compatibility): when defined,
a SaveAs operation falls back to the user's `homepath` when
it can't work on the original folder
- Fixed PutUserInfo to use the user's username as xattr key
- Added arm64-based builds

### Tue Jan 31 2023 - v9.4.0
- Introduced support to forcefully evict valid locks
to compensate Microsoft Online mishandling of collaborative
sessions. This workaround will stay until a proper fix
is implemented following Microsoft CSPP team's advices
- Improved logging, in particular around lock eviction
- Bridged apps: moved plugin loading apps out of the deprecated
discovery module, and fixed some minor bugs
- CI: moved release builds to GitHub actions

### Thu Nov 24 2022 - v9.3.0
- Introduced heuristic to log which sessions are allowed
to open a collaborative session and which ones are
prevented by the application
- Introduced support for app-aware locks in EOS (#94)
- Disabled SaveAs action when user is not owner
- Improved error coverage in case of transient errors
in bridged apps and in PutFile operations
- Moved from LGTM to CodeQL workflow on GitHub (#100)
- Introduced support for PutUserInfo
- Added support for the Microsoft "business" flow (#105)

### Mon Oct 17 2022 - v9.2.0
- Added option to use file or stream handler for logging (#91)
- Introduced configurable hostURLs for CheckFileInfo (#93)
- Fixed duplicate log entries (#92)
- CodiMD: added support for direct storage access via
the ownCloud file picker (#95)
- Fixed check for external locks
- Further fixes to improve coverage of the WOPI validator tests

### Wed Oct 5 2022 - v9.1.0
- Introduced support for PREVIEW mode (#82)
- Improved UnlockAndRelock logic (#85, #87)
- Switched to python-alpine docker image (#88)
- Introduced further branding options in CheckFileInfo
- Further improvements in the bridged apps logic
- Added more logging and a new endpoint to monitor
conflicted sessions

### Thu Sep 1 2022 - v9.0.0
- Refactored and strengthened save workflow for
bridged applications, and simplified lock metadata (#80)
Expand All @@ -8,7 +108,7 @@
- Refactored PutFile logic when handling conflict files (#78)
- Improved support for Spaces in Reva (#79)
- Implemented save workflow for Etherpad documents (#81)
Fixed direct download in case of errors
- Fixed direct download in case of errors
- Updated dependencies and documentation

### Thu Jun 16 2022 - v8.3.0
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FILES_TO_RPM = src mon tools wopiserver.conf wopiserver.service wopiserver.logrotate
FILES_TO_RPM = src tools wopiserver.conf wopiserver.service wopiserver.logrotate
SPECFILE = $(shell find . -type f -name *.spec)
VERSREL = $(shell git describe | sed 's/^v//')
VERSION = $(shell echo ${VERSREL} | cut -d\- -f 1)
Expand Down
Loading

0 comments on commit 73dac2b

Please sign in to comment.