Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
47cd38e
latest prometheus, logrus 1.6.0 (#109)
guscarreon Jun 6, 2022
24065e9
Update to Aerospike Client version v6.2.1 (#112)
guscarreon Aug 11, 2022
3f7ff1e
Create issue_prioritization.yml (#113)
bretg Sep 8, 2022
0f2ccc2
Allow prometheus namespace and subsystem to be empty (#115)
guscarreon Sep 26, 2022
4d4af0d
Aerospike: Make write and read max retries configurable (#116)
guscarreon Nov 1, 2022
c1383bd
Set default values for max_write_retries and max_read_retries (#117)
guscarreon Nov 1, 2022
67b91e5
Make Aerospike connection idle timeout configurable (#118)
guscarreon Nov 10, 2022
b28ca1e
Update Aerospike client version to 6.7.0
mansinahar Jan 9, 2023
32b8f8e
Add configurable option to return text status response (#122)
mansinahar Jan 9, 2023
918c220
Make Aerospike client connection queue size configurable (#124)
guscarreon Jan 17, 2023
51d69b2
Workflow to create issue in pbc-java (#123)
bretg Jan 19, 2023
2ad2b34
README typo (#125)
bretg Jan 23, 2023
e52ab5d
Use hosts over host (#133)
guscarreon Feb 14, 2023
e1300f0
Update to Go 1.19 (#130)
guscarreon Feb 15, 2023
208ebde
Simplify mock metrics (#131)
guscarreon Feb 22, 2023
b075d59
Bump golang.org/x/text from 0.3.7 to 0.3.8 (#134)
dependabot[bot] Feb 23, 2023
8372f0b
Issue tracker workflow update (#127)
bretg Mar 7, 2023
d20dd30
Update to Ubuntu 20.04 (#136)
guscarreon Mar 13, 2023
dbccaa3
Fix error handling when using the Redis backend (#129)
sebmil-daily Mar 15, 2023
042cd8a
Update release workflow (#135)
onkarvhanumante Mar 20, 2023
ab9d777
Update actions to use newer version to support node.js 16 (#137)
Sonali-More-Xandr Apr 18, 2023
68ab252
update tibdex/github-app-token version to support node.js16 (#138)
Sonali-More-Xandr Apr 19, 2023
0dc0dc9
Improve end-to-end JSON tests (#132)
guscarreon Apr 27, 2023
d334935
Use latest version of docker/login-action (#141)
onkarvhanumante May 23, 2023
1a8ba52
Backend Configuration Clarity (#153)
SyntaxNode Sep 19, 2023
91fe830
Bump gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0…
dependabot[bot] Oct 4, 2023
58cffa3
New Backend: Apache Ignite (#146)
guscarreon Dec 6, 2023
ab2b292
Refactor NewAerospikeBackend function (#164)
guscarreon Mar 26, 2024
304d29a
Update google.golang.org/protobuf from 1.28.0 to 1.33.0 (#172)
guscarreon Apr 8, 2024
84a0690
Config Convenience Updates (#173)
SyntaxNode Apr 23, 2024
4c0c8a0
Config max request header size (#174)
guscarreon May 8, 2024
66940a7
update github.com/rs/cors to v1.11.0 (#177)
dmitris Sep 6, 2024
75dfa4e
Log referrer header at a configurable rate (#182)
guscarreon Jan 9, 2025
fa67a3e
Vulnerabilities fixes & Upgrade to Ubuntu 22.04 (#190)
VeronikaSolovei9 Mar 31, 2025
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
28 changes: 28 additions & 0 deletions .github/workflows/cross-repo-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Cross-repo Issue Creation

on:
pull_request:
types: [closed]
branches:
- "master"

jobs:
cross-repo:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1.8.0
with:
app_id: ${{ secrets.XREPO_APP_ID }}
private_key: ${{ secrets.XREPO_PEM }}
- name: create issue in other repo
if: "!contains(github.event.pull_request.labels.*.name, 'do not port') && github.event.pull_request.merged"
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
echo -e "A PR was merged over on PBC-Go\n\n- [https://github.com/prebid/prebid-cache/pull/${{github.event.number}}](https://github.com/prebid/prebid-cache/pull/${{github.event.number}})\n- timestamp: ${{ github.event.pull_request.merged_at}}" > msg
export msg=$(cat msg)
gh issue create --repo prebid/prebid-cache-java --title "Port PR from PBC-Go: ${{ github.event.pull_request.title }}" \
--body "$msg" \
--label auto
100 changes: 100 additions & 0 deletions .github/workflows/issue_prioritization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Issue tracking
on:
issues:
types:
- opened
jobs:
track_issue:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1.8.0
with:
app_id: ${{ secrets.PBS_PROJECT_APP_ID }}
private_key: ${{ secrets.PBS_PROJECT_APP_PEM }}

- name: Get project data
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
ORGANIZATION: prebid
DATE_FIELD: Created on
PROJECT_NUMBER: 4
run: |
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
projectV2(number: $number) {
id
fields(first:100) {
nodes {
... on ProjectV2Field {
id
name
}
... on ProjectV2SingleSelectField {
id
name
options {
id
name
}
}
}
}
}
}
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json

echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
echo 'DATE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "'"$DATE_FIELD"'") | .id' project_data.json) >> $GITHUB_ENV

- name: Add issue to project
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
ISSUE_ID: ${{ github.event.issue.node_id }}
run: |
gh api graphql -f query='
mutation($project:ID!, $issue:ID!) {
addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) {
item {
id,
content {
... on Issue {
createdAt
}
... on PullRequest {
createdAt
}
}
}
}
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID > issue_data.json

echo 'ITEM_ID='$(jq '.data.addProjectV2ItemById.item.id' issue_data.json) >> $GITHUB_ENV
echo 'ITEM_CREATION_DATE='$(jq '.data.addProjectV2ItemById.item.content.createdAt' issue_data.json | cut -c 2-11) >> $GITHUB_ENV

- name: Set fields
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
gh api graphql -f query='
mutation (
$project: ID!
$item: ID!
$date_field: ID!
$date_value: Date!
) {
set_creation_date: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $date_field
value: {
date: $date_value
}
}) {
projectV2Item {
id
}
}
}' -f project=$PROJECT_ID -f item=$ITEM_ID -f date_field=$DATE_FIELD_ID -f date_value=$ITEM_CREATION_DATE --silent
36 changes: 0 additions & 36 deletions .github/workflows/package.yml

This file was deleted.

130 changes: 115 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,126 @@
name: Release

on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
inputs:
releaseType:
type: choice
options:
- minor
- patch
default: minor
required: true
description: 'minor: v0.X.0, patch: v0.0.X'
debug:
type: boolean
default: true
description: 'executes the workflow in debug mode (skip the publishing tag, docker image and release steps)'

jobs:
release:
name: Create Release
if: github.event.base_ref == 'refs/heads/master'
check-permission:
name: Check permission
if: contains(github.ref, 'refs/heads/master')
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Get Version
id: get_version
- name: Check user permission
uses: actions-cool/check-user-permission@v2.2.0
id: check
with:
require: 'write'
outputs:
hasWritePermission: ${{ steps.check.outputs.require-result }}

publish-tag:
name: Publish tag
needs: check-permission
if: contains(needs.check-permission.outputs.hasWritePermission, 'true')
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout prebid cache
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create & publish tag
id: release
run: |
currentTag=$(git describe --abbrev=0 --tags)
echo "Current release tag ${currentTag}"

echo ${currentTag} | grep -q "^v\?[0-9]\+\.[0-9]\+\.[0-9]\+$"
if [ $? -ne 0 ]; then
echo "Current tag format won't let us compute the new tag name. Required format v[0-9]\+\.[0-9]\+\.[0-9]\+"
exit 1
fi

if [[ "${currentTag:0:1}" != "v" ]]; then
currentTag="v${currentTag}"
fi

nextTag=''
releaseType=${{ inputs.releaseType }}
if [ $releaseType == "minor" ]; then
# increment minor version and reset patch version
nextTag=$(echo "${currentTag}" | awk -F. '{OFS="."; $2+=1; $3=0; print $0}')
else
# increment patch version
nextTag=$(echo "${currentTag}" | awk -F. '{OFS="."; $3+=1; print $0}')
fi

if [ ${{ inputs.debug }} == 'true' ]; then
echo "running workflow in debug mode, next ${releaseType} tag: ${nextTag}"
else
git tag $nextTag
git push origin $nextTag
echo "tag=${nextTag}" >> $GITHUB_OUTPUT
fi
outputs:
releaseTag: ${{ steps.release.outputs.tag }}

publish-docker-image:
name: Publish docker image
needs: publish-tag
if: contains(inputs.debug, 'false')
runs-on: ubuntu-latest
steps:
- name: Checkout prebid cache
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build image
run: |
docker build --build-arg DEPLOY_VERSION=${{ needs.publish-tag.outputs.releaseTag }} -t docker.io/prebid/prebid-cache:${{ needs.publish-tag.outputs.releaseTag }} .
- name: Login to docker Hub
if: contains(inputs.debug, 'false')
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Publish to docker Hub
run: |
echo ::set-output name=tag::${GITHUB_REF/refs\/tags\/}
- name: Create & Publish Release
uses: release-drafter/release-drafter@v5.12.1
docker push docker.io/prebid/prebid-cache:${{ needs.publish-tag.outputs.releaseTag }}

publish-release:
name: Publish release
needs: [publish-tag, publish-docker-image]
if: contains(inputs.debug, 'false')
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout prebid cache
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create & publish release
uses: release-drafter/release-drafter@v5.22.0
with:
name: ${{ steps.get_version.outputs.tag }}
tag: ${{ steps.get_version.outputs.tag }}
version: ${{ steps.get_version.outputs.tag }}
name: ${{ needs.publish-tag.outputs.releaseTag }}
tag: ${{ needs.publish-tag.outputs.releaseTag }}
version: ${{ needs.publish-tag.outputs.releaseTag }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/validate-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ on:

jobs:
validate-merge:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.16.4
go-version: 1.19.5

- name: Checkout Merged Branch
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Validate
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ jobs:
validate:
strategy:
matrix:
go-version: [1.15.x, 1.16.x]
runs-on: ubuntu-18.04
go-version: [1.18.x, 1.19.x]
runs-on: ubuntu-20.04

steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Checkout Branch
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Resolves to empty string for push events and falls back to HEAD.
# See: https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
Expand Down
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so

# dep directory
vendor

# build artifacts
prebid-cache

# ide
.vscode/

# autogenerated mac file

.DS_Store

# Autogenerated Vim swap files
*~
*.swp
*.swo
Loading