From 705b0b06abfff580741daf938648346130f51203 Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Mon, 6 Jan 2025 16:15:28 +0100 Subject: [PATCH 1/3] refactor: rollback local docs build JIRA: TRIVIAL risk: low --- docs/Dockerfile | 34 ++++------------------------------ docs/config/dev/config.toml | 10 ---------- docs/config/dev/params.toml | 16 ---------------- 3 files changed, 4 insertions(+), 56 deletions(-) delete mode 100644 docs/config/dev/config.toml delete mode 100644 docs/config/dev/params.toml diff --git a/docs/Dockerfile b/docs/Dockerfile index 50993def2..169dfda64 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -1,41 +1,15 @@ -FROM python:3.13-slim AS python-stage - -COPY . data - -WORKDIR data - -RUN pip install --no-cache-dir -r scripts/script-requirements.txt - -WORKDIR docs - -RUN python3 ../scripts/docs/json_builder.py && \ - mkdir versioned_docs/latest && \ - mv -f data.json versioned_docs/latest && \ - python3 ../scripts/docs/python_ref_builder.py api_spec.toml versioned_docs/latest/data.json latest versioned_docs - FROM node:20.18.0-bookworm-slim -COPY docs docs - -COPY --from=python-stage data/docs/versioned_docs/latest/api-reference docs/content/en/latest/api-reference -COPY --from=python-stage data/docs/versioned_docs/latest/pandas docs/content/en/latest/pandas - - RUN apt-get update && \ apt-get install -y git make golang-go curl && \ npm install -g hugo-extended@0.117.0 && \ apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ - mkdir -p docs/versioned_docs/latest - -COPY --from=python-stage data/docs/versioned_docs/latest/links.json docs/versioned_docs/latest -COPY --from=python-stage data/docs/versioned_docs/latest/data.json docs/versioned_docs/latest + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -COPY docs/content/en/latest/ docs/versioned_docs/latest/ +COPY docs docs WORKDIR docs -RUN npm install && \ - rm -rf node_modules +RUN npm install # accessible on http://localhost:1313/latest/ -ENTRYPOINT ["hugo", "server", "-e", "dev", "--bind", "0.0.0.0"] +ENTRYPOINT ["hugo", "server", "--bind", "0.0.0.0"] diff --git a/docs/config/dev/config.toml b/docs/config/dev/config.toml deleted file mode 100644 index a45b52e15..000000000 --- a/docs/config/dev/config.toml +++ /dev/null @@ -1,10 +0,0 @@ -# This config file overrides _default/config.toml -# if hugo builds site for the environment "versioned" -# (hugo -e versioned ...) - -# This contentDir is empty dir in Git. It needs to be -# generated by an external script. -contentDir = "versioned_docs" -[Params] -devVersion = "dev" -latestVersion = "1.4" diff --git a/docs/config/dev/params.toml b/docs/config/dev/params.toml deleted file mode 100644 index cc9ac2d40..000000000 --- a/docs/config/dev/params.toml +++ /dev/null @@ -1,16 +0,0 @@ -# Put document versions here for every major or minor release -# Every TOML list item contains the following properties: -# - "version" - text that appears in versions menu -# - "dirpath" - directory name (relative to contentDir) where documentation -# for given version resides -# - "url" - url for link in version menu. May be absolute URL. -# - "latestTag" - docker image tag for the latest patch version. Must be changed -# on every patch release of respective branch -[[versions]] -version = "1.32" -dirpath = "latest" -url = "/latest/" -[[versions]] -version = "1.32" -dirpath = "latest" -url = "/123/" From 9b53837c39c6d4f878aac190e3c034c6648c7623 Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Mon, 6 Jan 2025 16:21:56 +0100 Subject: [PATCH 2/3] chore: update dev/test dependencies JIRA: TRIVIAL risk: low --- .pre-commit-config.yaml | 4 ++-- dev-requirements.txt | 2 +- fmt-requirements.txt | 2 +- gooddata-dbt/test-requirements.txt | 2 +- gooddata-fdw/test-requirements.txt | 4 ++-- gooddata-flexconnect/test-requirements.txt | 2 +- gooddata-flight-server/test-requirements.txt | 2 +- gooddata-pandas/test-requirements.txt | 4 ++-- gooddata-sdk/test-requirements.txt | 4 ++-- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d2f6d8250..4826b5673 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ exclude: (gooddata-api-client|.*\.snapshot\..*|.openapi-generator/custom_templates) repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -15,7 +15,7 @@ repos: args: [ '--maxkb=890' ] - id: check-case-conflict - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.5 + rev: v0.8.6 hooks: # Run the linter. - id: ruff diff --git a/dev-requirements.txt b/dev-requirements.txt index a183d6c1b..197127bae 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,6 +1,6 @@ -r ./tox-requirements.txt -r ./release-requirements.txt -pre-commit~=3.8.0 +pre-commit~=4.0.1 -r ./fmt-requirements.txt diff --git a/fmt-requirements.txt b/fmt-requirements.txt index ce9e5afc0..b4507a2c5 100644 --- a/fmt-requirements.txt +++ b/fmt-requirements.txt @@ -1 +1 @@ -ruff==0.6.5 +ruff==0.8.6 diff --git a/gooddata-dbt/test-requirements.txt b/gooddata-dbt/test-requirements.txt index f1a290911..ed20eae5f 100644 --- a/gooddata-dbt/test-requirements.txt +++ b/gooddata-dbt/test-requirements.txt @@ -1,2 +1,2 @@ pytest~=8.3.3 -pytest-cov~=5.0.0 +pytest-cov~=6.0.0 diff --git a/gooddata-fdw/test-requirements.txt b/gooddata-fdw/test-requirements.txt index c5c07d3ac..bbe62de98 100644 --- a/gooddata-fdw/test-requirements.txt +++ b/gooddata-fdw/test-requirements.txt @@ -1,6 +1,6 @@ pytest~=8.3.3 -pytest-cov~=5.0.0 -vcrpy~=6.0.1 +pytest-cov~=6.0.0 +vcrpy~=7.0.0 # TODO - Bump the version together with bumping the version of openapi generator urllib3==1.26.9 pyyaml diff --git a/gooddata-flexconnect/test-requirements.txt b/gooddata-flexconnect/test-requirements.txt index 4fd02adff..f5d5a3823 100644 --- a/gooddata-flexconnect/test-requirements.txt +++ b/gooddata-flexconnect/test-requirements.txt @@ -1,3 +1,3 @@ jsonschema~=4.23.0 pytest~=8.3.3 -pytest-cov~=5.0.0 +pytest-cov~=6.0.0 diff --git a/gooddata-flight-server/test-requirements.txt b/gooddata-flight-server/test-requirements.txt index f1a290911..ed20eae5f 100644 --- a/gooddata-flight-server/test-requirements.txt +++ b/gooddata-flight-server/test-requirements.txt @@ -1,2 +1,2 @@ pytest~=8.3.3 -pytest-cov~=5.0.0 +pytest-cov~=6.0.0 diff --git a/gooddata-pandas/test-requirements.txt b/gooddata-pandas/test-requirements.txt index 3f5962fd9..f1b01714b 100644 --- a/gooddata-pandas/test-requirements.txt +++ b/gooddata-pandas/test-requirements.txt @@ -1,6 +1,6 @@ pytest~=8.3.3 -pytest-cov~=5.0.0 -vcrpy~=6.0.1 +pytest-cov~=6.0.0 +vcrpy~=7.0.0 # TODO - Bump the version together with bumping the version of openapi generator urllib3==1.26.9 python-dotenv~=1.0.0 diff --git a/gooddata-sdk/test-requirements.txt b/gooddata-sdk/test-requirements.txt index e132bd15a..9d272647d 100644 --- a/gooddata-sdk/test-requirements.txt +++ b/gooddata-sdk/test-requirements.txt @@ -1,8 +1,8 @@ pytest~=8.3.3 -pytest-cov~=5.0.0 +pytest-cov~=6.0.0 pytest-snapshot==0.9.0 pytest-order~=1.3.0 -vcrpy~=6.0.1 +vcrpy~=7.0.0 # TODO - Bump the version together with bumping the version of openapi generator urllib3==1.26.9 python-dotenv~=1.0.0 From de5c381d8c5a60cb28cf17a712d4bb28ac0722ed Mon Sep 17 00:00:00 2001 From: Jan Kadlec Date: Mon, 6 Jan 2025 16:23:18 +0100 Subject: [PATCH 3/3] chore: bump pyyaml min version Bump pyyaml minimum version to 6.0 due to vulnerability in 5.0. JIRA: TRIVIAL risk: low --- gooddata-dbt/requirements.txt | 2 +- gooddata-dbt/setup.py | 2 +- gooddata-sdk/requirements.txt | 2 +- gooddata-sdk/setup.py | 2 +- tests-support/setup.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gooddata-dbt/requirements.txt b/gooddata-dbt/requirements.txt index 694182a32..4bcc1ef29 100644 --- a/gooddata-dbt/requirements.txt +++ b/gooddata-dbt/requirements.txt @@ -1,4 +1,4 @@ -pyyaml>=5.1 +pyyaml>=6.0 attrs>=21.4.0,<=24.2.0 cattrs>=22.1.0,<=24.1.1 requests~=2.32.0 diff --git a/gooddata-dbt/setup.py b/gooddata-dbt/setup.py index b26cb8604..2261867ff 100644 --- a/gooddata-dbt/setup.py +++ b/gooddata-dbt/setup.py @@ -8,7 +8,7 @@ REQUIRES = [ "gooddata-sdk~=1.33.0", - "pyyaml>=5.1", + "pyyaml>=6.0", "attrs>=21.4.0,<=24.2.0", "cattrs>=22.1.0,<=24.1.1", "requests~=2.32.0", diff --git a/gooddata-sdk/requirements.txt b/gooddata-sdk/requirements.txt index 86d105d18..547599f05 100644 --- a/gooddata-sdk/requirements.txt +++ b/gooddata-sdk/requirements.txt @@ -1,5 +1,5 @@ python-dateutil >= 2.5.3 -pyyaml>=5.1 +pyyaml>=6.0 attrs>=21.4.0,<=24.2.0 cattrs>=22.1.0,<=24.1.1 brotli==1.1.0 diff --git a/gooddata-sdk/setup.py b/gooddata-sdk/setup.py index 2f1a78712..d6cff31ab 100644 --- a/gooddata-sdk/setup.py +++ b/gooddata-sdk/setup.py @@ -9,7 +9,7 @@ REQUIRES = [ "gooddata-api-client~=1.33.0", "python-dateutil>=2.5.3", - "pyyaml>=5.1", + "pyyaml>=6.0", "attrs>=21.4.0,<=24.2.0", "cattrs>=22.1.0,<=24.1.1", "brotli==1.1.0", diff --git a/tests-support/setup.py b/tests-support/setup.py index 69dcb8f1f..0a4ab76c8 100644 --- a/tests-support/setup.py +++ b/tests-support/setup.py @@ -3,7 +3,7 @@ from setuptools import find_packages, setup REQUIRES = [ - "pyyaml>=5.1", + "pyyaml>=6.0", ] setup(