Skip to content

Commit

Permalink
Merge branch 'main' into COST-5141-vaccum-expired-partitions
Browse files Browse the repository at this point in the history
  • Loading branch information
myersCody committed Jul 3, 2024
2 parents 14c51fb + bdbbfee commit 45c78cf
Show file tree
Hide file tree
Showing 97 changed files with 6,820 additions and 1,714 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ PROMETHEUS_MULTIPROC_DIR='/tmp'
CURRENCY_URL=https://open.er-api.com/v6/latest/USD
UNLEASH_TOKEN='*:*.dbffffc83b1f92eeaf133a7eb878d4c58231acc159b5e1478ce53cfc'
POLLING_TIMER=60 # Set how often you can trigger downloads per provider
PROCESSING_WAIT_TIMER=3 # Set how many days before a long processing provider can be polled again
LARGE_PROCESSING_WAIT_TIMER=7 # Set how many days before a long LARGE customer processing provider can be polled again
MAX_GROUP_BY_OVERRIDE=3 # Set maximum aloud group bys
TAG_ENABLED_LIMIT=200 # Set the max amount of tags per account
DELAYED_TASK_TIME=30 # Set the seconds before a delayed summary task should expire
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Install Python
uses: actions/[email protected]
with:
python-version: '3.9'
python-version: '3.11'

- name: Run pre-commit checks
uses: pre-commit/[email protected]
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
max-parallel: 4
matrix:
python-version:
- '3.9'
- '3.11'
env:
COMPOSE_FILE: .github/postgres/docker-compose.yaml

Expand Down
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
ARG TARGETARCH

FROM registry.access.redhat.com/ubi8/ubi-minimal:latest AS base

USER root

ENV PYTHON_VERSION=3.9 \
ENV PYTHON_VERSION=3.11 \
PYTHONUNBUFFERED=1 \
PYTHONIOENCODING=UTF-8 \
LC_ALL=en_US.UTF-8 \
Expand All @@ -22,8 +24,8 @@ LABEL summary="$SUMMARY" \
io.k8s.description="$DESCRIPTION" \
io.k8s.display-name="Koku" \
io.openshift.expose-services="8000:http" \
io.openshift.tags="builder,python,python39,rh-python39" \
com.redhat.component="python39-docker" \
io.openshift.tags="builder,python,python3.11,rh-python3.11" \
com.redhat.component="python3.11-docker" \
name="Koku" \
version="1" \
maintainer="Red Hat Cost Management Services <[email protected]>"
Expand All @@ -33,7 +35,7 @@ LABEL summary="$SUMMARY" \
# gcc to compile some python packages (e.g. ciso8601)
# shadow-utils to make useradd available
# libpq-devel needed for building psycopg2
RUN INSTALL_PKGS="python39 python39-devel glibc-langpack-en gcc shadow-utils libpq-devel" && \
RUN INSTALL_PKGS="python3.11 python3.11-devel glibc-langpack-en gcc-c++ shadow-utils libpq-devel" && \
microdnf --nodocs -y upgrade && \
microdnf reinstall tzdata && \
microdnf -y --setopt=tsflags=nodocs --setopt=install_weak_deps=0 install $INSTALL_PKGS && \
Expand Down Expand Up @@ -61,8 +63,6 @@ RUN ldconfig
# No intermetiate steps for x86_64, but declare it so it can be used for the final image
FROM --platform=amd64 base AS stage-amd64

ARG TARGETARCH

FROM stage-${TARGETARCH} AS final
# PIPENV_DEV is set to true in the docker-compose allowing
# local builds to install the dev dependencies
Expand All @@ -72,7 +72,7 @@ ARG USER_ID=1000
# Create a Python virtual environment for use by any application to avoid
# potential conflicts with Python packages preinstalled in the main Python
# installation.
RUN python3.9 -m venv /pipenv-venv \
RUN python3.11 -m venv /pipenv-venv \
&& /pipenv-venv/bin/python -m pip install --upgrade pip setuptools \
&& /pipenv-venv/bin/python -m pip install pipenv

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def secrets = [
def configuration = [vaultUrl: params.VAULT_ADDRESS, vaultCredentialId: params.VAULT_CREDS_ID, engineVersion: 1]

pipeline {
agent { label 'insights' }
agent { label 'rhel8' }
options {
timestamps()
}
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ _koku-wait:
done

docker-build:
$(DOCKER_COMPOSE) build koku-base
# TARGETARCH: https://github.com/containers/podman/issues/23046 is resolved.
$(DOCKER_COMPOSE) build --build-arg TARGETARCH=$(shell uname -m | sed s/x86_64/amd64/) koku-base


docker-up: docker-build
$(DOCKER_COMPOSE) up -d --scale koku-worker=$(scale)
Expand Down
5 changes: 3 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ azure-mgmt-compute = "*"
azure-mgmt-resource = ">=8.0"
azure-mgmt-storage = ">=20.1.0"
azure-storage-blob = ">=12.1"
boto3 = ">=1.10"
boto3 = ">=1.34"
bs4 = ">=0.0.1"
cachetools = ">=4.1.0"
celery = ">=5.2.2"
Expand Down Expand Up @@ -64,6 +64,7 @@ sqlparse = "*"
[dev-packages]
argh = ">=0.26.2"
astroid = ">=2.3"
flower = "*"
coverage = ">=5.0"
crc-bonfire = "*"
debugpy = ">=1.3.0"
Expand All @@ -84,4 +85,4 @@ tox = ">=3.0"
watchdog = ">=2.1.1"

[requires]
python_version = "3.9"
python_version = "3.11"
Loading

0 comments on commit 45c78cf

Please sign in to comment.