Skip to content

Commit

Permalink
Merge branch 'main' into python311
Browse files Browse the repository at this point in the history
  • Loading branch information
maskarb committed Jul 2, 2024
2 parents 41c8a25 + 066faf6 commit 830a85f
Show file tree
Hide file tree
Showing 117 changed files with 7,186 additions and 1,788 deletions.
4 changes: 2 additions & 2 deletions .baseimagedigest
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sha256:9e458f41ff8868ceae00608a6fff35b45fd8bbe967bf8655e5ab08da5964f4d0
ee12e2d41e6b0a9138cd9bc26cc523ca0dda4dbf79588b554c293797288188b2 -
sha256:5f1cd3422d5d46aea35dac80825dbcbd58213eef49c317f42a394345fb4e8ff1
003b9c51a29568ce12108f4cf98a8ad058979d9731deb31f783f6283f35b7469 -
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
8 changes: 6 additions & 2 deletions .github/workflows/check-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/[email protected]

- name: Install skopeo
run: sudo apt-get install -y skopeo

- name: Check change
run: |
skopeo inspect "docker://registry.access.redhat.com/ubi8/ubi-minimal:latest" | grep -Po '(?<="Digest": ")([^"]+)' > .baseimagedigest
docker run --rm --entrypoint sh -u 0 quay.io/cloudservices/koku:latest -c \
'yum upgrade -y --security > /dev/null; rpm -qa | sort | sha256sum' \
>> .baseimagedigest
- name: Do change if the digest changed
run: |
git config user.name 'Update-a-Bot'
git config user.email '[email protected]'
git add .baseimagedigest
git commit -m "chore(image): update and rebuild image" || echo "No new changes"
- name: Create pull request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v6.0.5
with:
title: 'chore(image): update base image'
33 changes: 17 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4.1.7

- name: Install Python
uses: actions/setup-python@v4.3.0
uses: actions/setup-python@v5.1.0
with:
python-version: '3.11'

- name: Run pre-commit checks
uses: pre-commit/[email protected].0
uses: pre-commit/[email protected].1
env:
SETUPTOOLS_USE_DISTUTILS: stdlib

Expand All @@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4.1.7
with:
fetch-depth: 0

Expand All @@ -57,7 +57,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41.0.0
uses: tj-actions/changed-files@v44.5.2
with:
files_from_source_file: docker-files.txt

Expand All @@ -70,7 +70,7 @@ jobs:
- name: Setting smokes-required label
if: env.RUN_TESTS == 'true'
uses: actions/github-script@v6.3.3
uses: actions/github-script@v7.0.1
continue-on-error: true
with:
script: |
Expand All @@ -89,7 +89,7 @@ jobs:
- name: Remove smokes-required label
if: env.RUN_TESTS != 'true'
uses: actions/github-script@v6.3.3
uses: actions/github-script@v7.0.1
continue-on-error: true
with:
script: |
Expand All @@ -114,13 +114,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4.1.7
with:
fetch-depth: 0

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41.0.0
uses: tj-actions/changed-files@v44.5.2
with:
files: |
db_functions/**
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
steps:
- name: Checkout
if: needs.changed-files.outputs.run_tests == 'true'
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4.1.7
with:
fetch-depth: 0

Expand All @@ -174,7 +174,7 @@ jobs:

- name: Set up Python ${{ matrix.python-version }}
if: needs.changed-files.outputs.run_tests == 'true'
uses: actions/setup-python@v4.3.0
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -185,7 +185,7 @@ jobs:
- name: Cache dependencies
if: needs.changed-files.outputs.run_tests == 'true'
id: cache-dependencies
uses: actions/cache@v3.0.11
uses: actions/cache@v4.0.2
with:
path: |
~/.cache/pipenv
Expand Down Expand Up @@ -243,10 +243,11 @@ jobs:

- name: Upload test coverage file
if: steps.unit_tests_run.outcome == 'success'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.3.3
with:
name: coverage
path: coverage.xml
overwrite: true

coverage:
name: Coverage
Expand All @@ -258,19 +259,19 @@ jobs:
# this checkout is required for the coverage report. If we don't do this, then
# the uploaded report is invalid and codecov doesn't know how to process it.
if: needs.changed-files.outputs.run_tests == 'true'
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4.1.7
with:
fetch-depth: 0

- name: Download coverage result from units
if: needs.changed-files.outputs.run_tests == 'true'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: coverage

- name: Upload coverage to Codecov
if: needs.changed-files.outputs.run_tests == 'true'
uses: codecov/codecov-action@v4.2.0
uses: codecov/codecov-action@v4.4.1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3.1.0
uses: actions/checkout@v4.1.7
with:
fetch-depth: 0

Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
run: bash .github/scripts/get_description.sh

- name: Set release body
uses: ncipollo/release-action@v1.11.1
uses: ncipollo/release-action@v1.14.0
with:
bodyFile: release_body.md
commit: ${{ github.event.inputs.commit }}
Expand Down
26 changes: 0 additions & 26 deletions .unleash/flags.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,32 +141,6 @@
"variants": [],
"createdAt": "2022-12-09T19:41:51.178Z"
},
{
"name": "cost-management.backend.enable-ocp-savings-plan-cost",
"description": "Whether to use AWS savings plan cost for OCP raw cost",
"type": "permission",
"project": "default",
"enabled": true,
"stale": false,
"strategies": [
{
"name": "flexibleRollout",
"parameters": {
"rollout": 100,
"stickiness": "schema"
},
"constraints": [
{
"contextName": "schema",
"operator": "IN",
"values": ["org1234567"]
}
]
}
],
"variants": [],
"createdAt": "2022-12-02T19:01:40.137Z"
},
{
"name": "cost-management.backend.enable-purge-turnpike",
"description": "Toggle to enable purging of trino files.",
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG TARGETARCH

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

USER root
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 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
3 changes: 2 additions & 1 deletion 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 Down
Loading

0 comments on commit 830a85f

Please sign in to comment.