Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump uraimo/run-on-arch-action from 2.5.0 to 2.7.2 #198

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
65fe77d
build(deps): bump uraimo/run-on-arch-action from 2.5.0 to 2.7.2
dependabot[bot] Apr 15, 2024
718f2d6
Apply suggestions from code review
patrick-stephens Dec 19, 2024
fad83c0
Update .github/workflows/packages.yaml
patrick-stephens Dec 19, 2024
b0e1c84
ci: update with fixes for targets and CI
patrick-stephens Dec 19, 2024
1a66934
decode: opentelemetry: adjust CFL variant prototype
edsiper Apr 12, 2024
a591c34
lib: cfl: upgrade to v0.5.0
edsiper Apr 18, 2024
8240fd0
lib: fluent-otel-proto: update with git master
edsiper Apr 18, 2024
ca6c955
build: bump to v0.9.0
edsiper Apr 24, 2024
b2d6dc3
decode_prometheus_remote_write: Add decoder for a procotol of prometh…
cosmo0920 Mar 19, 2024
8b1395a
prometheus_remote_write: Update protobuf to the latest
cosmo0920 Mar 22, 2024
4380ae8
decode_prometheus_remote_write: Implement histogram decoder on top of…
cosmo0920 Mar 26, 2024
a013531
decode_prometheus_remote_write: Handle unsupported metrics type(s)
cosmo0920 Mar 26, 2024
e0fc834
decode_prometheus_remote_write: Remove needless defines
cosmo0920 Mar 26, 2024
6a800b4
decode_prometheus_remote_write: Plug memory leaks
cosmo0920 Apr 17, 2024
1632967
decode_msgpack: Suppress underbar when empty namespace is decoded
cosmo0920 Apr 19, 2024
d17e7ad
decode_prometheus_remote_write: test: Add a decoding test
cosmo0920 Apr 22, 2024
9911854
decode_prometheus_write: Make source level private for cmt allocator …
cosmo0920 Apr 22, 2024
0370dd9
test: decoding: Plug a memory leak
cosmo0920 Apr 23, 2024
5ff8dfc
decode_prometheus_remote_write: Address comments
cosmo0920 Apr 24, 2024
8f36c68
decoding: test: Use the actual payloads of prometheus remote write
cosmo0920 Apr 24, 2024
fd52471
decode_prometheus_remote_write: Detect histogram type of payloads if …
cosmo0920 Apr 25, 2024
e896ff7
math: simplify type conversion with casts and limits checks
edsiper Apr 26, 2024
f324cd8
math: use memcpy to avoid losing precision
edsiper Apr 26, 2024
115e169
revert: "math: use memcpy to avoid losing precision"
edsiper Apr 27, 2024
46d164a
revert: "math: simplify type conversion with casts and limits checks"
edsiper Apr 27, 2024
f64c65d
decode: opentelemetry: fix integer assignment
edsiper Apr 27, 2024
4d05750
build: bump to v0.9.1
edsiper May 16, 2024
94f084c
cat: Make copy_map function into public
cosmo0920 May 7, 2024
ddfc0ae
cat: Add a capability to handle filtered_map
cosmo0920 May 7, 2024
dc8a85b
map: Make map_metric_destroy as a public function
cosmo0920 May 7, 2024
008e947
cat: Make copy_labels function as public
cosmo0920 May 7, 2024
88bbdac
filter: Implement label key-value filtering
cosmo0920 Apr 26, 2024
1885b7d
filter: tests: Add testcase for filtering label's key-value
cosmo0920 May 7, 2024
6c1180f
filter: windows: Use w/o case API for string
cosmo0920 May 10, 2024
9e810d7
build: workflows: FIx broken Windows tests
cosmo0920 May 14, 2024
c138f64
build: Add cfl-static as a TARGETS
cosmo0920 May 8, 2024
b91ae3a
decode_prometheus: fix 64-bit timestamp parsing for Windows
nuclearpidgeon Jul 17, 2024
017fac8
lib: cfl: upgrade to v0.5.1
edsiper Aug 5, 2024
253f154
build: bump to v0.9.2
edsiper Aug 5, 2024
6060d8f
lib: cfl: upgrade to v0.5.2
edsiper Aug 6, 2024
2638d71
workflows: CentOS 7 repo change due to EOL
edsiper Aug 6, 2024
1d4c50b
build: bump to v0.9.3
edsiper Aug 6, 2024
c144a33
build: bump to v0.9.4
edsiper Aug 13, 2024
78adfb6
gauge: fix parameters for string (CID 508045 507744 508213
edsiper Aug 13, 2024
755f9f8
counter: fix logger parameters (CID 507807 508122 508063 508112)
edsiper Aug 13, 2024
09d5f9f
decode_prometheus_remote_write: release context on excepion (CID 507716)
edsiper Aug 13, 2024
48a2977
encode_splunk_hex: release context on exception (CID 507774)
edsiper Aug 13, 2024
c56c996
histogram: fix logger parameters (CID 507881 507669)
edsiper Aug 13, 2024
a6ee5b3
summary: fix logger parameters (CID 507632)
edsiper Aug 13, 2024
aeb6171
untyped: fix logger parameters (CID 507669 508062)
edsiper Aug 13, 2024
4cee871
cat: remove unused variables
edsiper Aug 13, 2024
5dc45e2
summary: releae labels on exception (CID 507859 507880)
edsiper Aug 13, 2024
8e9ce86
decode_statsd: Implement statsd decoder
cosmo0920 Jul 19, 2024
ab0857f
decoding: decode_statsd: tests: Add a test case
cosmo0920 Jul 19, 2024
e6bc216
build: bump to v0.9.5
edsiper Aug 14, 2024
2d4a1e8
decode_statsd: plug a possible resource leak (CID 508657) (#214)
cosmo0920 Aug 19, 2024
7f61716
encode_influx: Handle no namespace case
cosmo0920 Aug 20, 2024
11fbbda
workflows: Add macOS package creations
cosmo0920 May 1, 2024
74e379b
encoding: opentelemetry: do not memcpy on null ref (CID 508108)
edsiper Aug 26, 2024
8477467
tests: prometheus_parser: add issue flb 9267
edsiper Aug 26, 2024
6b9cab8
decode_prometheus: fixed constant pointer release (#219)
leonardo-albertovich Aug 31, 2024
1de291b
decode_statsd: fixed resource leaks
leonardo-albertovich Aug 29, 2024
0f2b96e
decode_prometheus_remote_write: fixed dangling reference and leaks
leonardo-albertovich Aug 30, 2024
7b8e45a
cat: do not create new context on new metric being concatenated
edsiper Sep 5, 2024
15cf17f
build: bump to v0.9.6
edsiper Sep 16, 2024
2454ed5
build: bump to v0.9.7
edsiper Sep 16, 2024
c694a43
encoding: opentelemetry: fix leaks on resource and scope handling
edsiper Oct 10, 2024
e460253
build: bump to v0.9.8
edsiper Oct 14, 2024
f923866
encode: splunk_hec: fix conditional (CID 508224)
edsiper Oct 14, 2024
b916e50
encode: splunk_hec: set pointers NULL after free (CID 507676)
edsiper Oct 14, 2024
a3895f1
cat: extra protection for invalid labels count (CID 507928)
edsiper Oct 14, 2024
12a45ed
cat: fix conditional in opts compare (CID 510613)
edsiper Oct 14, 2024
6874374
decode: msgpack: reduce chance of leak with cfl_sds_cat_safe (CID 507…
edsiper Oct 14, 2024
0542dd0
decode: prometheus: prevent string overflow with extra validation (CI…
edsiper Oct 14, 2024
f2bcd59
decode: prometheus: add missing initialization for sum var (CID 507569)
edsiper Oct 14, 2024
ed8b322
decode: prometheus: validate samples before adding to histogram (CID …
edsiper Oct 14, 2024
58bfb25
decode: prometheus: validate samples before adding to summary (CID 50…
edsiper Oct 14, 2024
cbde39c
encode: prometheus: initialize variable (CID 507545)
edsiper Oct 14, 2024
fc88490
decode: prometheus: initialize timestamp
edsiper Oct 14, 2024
42a0607
build: bump to v0.9.9
edsiper Nov 5, 2024
174411f
build(deps): bump actions/upload-artifact from 3 to 4 (#200)
dependabot[bot] Dec 19, 2024
84d46b5
build(deps): bump softprops/action-gh-release from 1 to 2 (#199)
dependabot[bot] Dec 19, 2024
34b0718
build(deps): bump actions/checkout from 3 to 4 (#197)
dependabot[bot] Dec 19, 2024
c8492e8
build(deps): bump actions/download-artifact from 3 to 4 (#196)
dependabot[bot] Dec 19, 2024
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
43 changes: 35 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up with Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@v1
with:
toolset: 14.29 # For using VS2019 C++

- name: Build on ${{ matrix.os }} with vs-2019
run: |
.\scripts\win_build.bat
Expand All @@ -39,10 +44,11 @@
steps:
- name: Set up base image dependencies
run: |
sed -i -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo
sed -i -e "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=http:\/\/vault.centos.org/g" /etc/yum.repos.d/CentOS-Base.repo
yum -y update && \
yum install -y ca-certificates cmake gcc gcc-c++ git make wget && \
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
rpm -ivh epel-release-latest-7.noarch.rpm && \
yum install -y epel-release
yum install -y cmake3
shell: bash

Expand All @@ -69,15 +75,15 @@
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

- name: Build on ${{ matrix.os }} with ${{ matrix.compiler }}
uses: uraimo/run-on-arch-action@v2.5.0
uses: uraimo/run-on-arch-action@v2.8.1
with:
arch: aarch64
distro: ubuntu20.04
distro: ubuntu_latest
run: |
apt-get update && \
apt-get install -y --no-install-recommends \
Expand All @@ -103,7 +109,7 @@
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -132,7 +138,7 @@
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -142,3 +148,24 @@
# dependencies_debian: ''
cmakeflags: '-DCMT_TESTS=On -DCMT_DEV=on .'
build_command: make all

test-required-checks-complete:

Check failure on line 152 in .github/workflows/build.yaml

View workflow job for this annotation

GitHub Actions / Actionlint

job "test-required-checks-complete" needs job "build-msys2" which does not exist in this workflow

Check failure on line 152 in .github/workflows/build.yaml

View workflow job for this annotation

GitHub Actions / Actionlint

job "test-required-checks-complete" needs job "build-debian" which does not exist in this workflow
# note: this step always has to run in order to check if the dependent jobs passed. by default github skips running a job
# if the needed jobs upstream failed.
if: always()
needs:
- build-windows
- build-msys2
- build-centos
- build-debian
- build-unix-arm64
- build-unix-amd64
- build-analysis-tests
name: Required checks complete
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
4 changes: 2 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ludeeus/action-shellcheck@master

actionlint:
Expand All @@ -19,7 +19,7 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: |
echo "::add-matcher::.github/actionlint-matcher.json"
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
Expand Down
73 changes: 65 additions & 8 deletions .github/workflows/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
matrix:
format: [ rpm, deb ]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

- uses: uraimo/run-on-arch-action@v2.5.0
- uses: uraimo/run-on-arch-action@v2.8.1
name: Build the ${{matrix.format}} packages
with:
arch: aarch64
distro: ubuntu20.04
distro: ubuntu_latest
run: |
apt-get update && \
apt-get install -y --no-install-recommends \
Expand All @@ -39,7 +39,7 @@
echo ${{ matrix.format }} | awk '{print toupper($0)}' | xargs -I{} cpack -G {}

- name: Store the master package artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.format }}-arm64
path: |
Expand All @@ -53,7 +53,7 @@
format: [ rpm, deb ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -63,23 +63,80 @@
echo ${{ matrix.format }} | awk '{print toupper($0)}' | xargs -I{} cpack -G {}

- name: Store the master package artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.format }}-amd64
path: |
./*.${{matrix.format}}

build-macos-packages-amd64:
name: build macOS intel packages
strategy:
fail-fast: true
matrix:
config:
- format: productbuild
arch: intel
ext: pkg
runs-on: macos-12
steps:
- uses: actions/checkout@v3

Check failure on line 83 in .github/workflows/packages.yaml

View workflow job for this annotation

GitHub Actions / Actionlint

the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
with:
submodules: true

- name: Build the ${{matrix.config.format}} packages
run: |
cmake . -DCPACK_GENERATOR=${{ matrix.config.format }}
echo ${{ matrix.config.format }} | xargs -I{} cpack -G {}

- name: Store the master package artifacts
uses: actions/upload-artifact@v3

Check failure on line 93 in .github/workflows/packages.yaml

View workflow job for this annotation

GitHub Actions / Actionlint

the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
with:
name: ${{ matrix.config.format }}-${{matrix.config.arch}}
path: |
./*-${{matrix.config.arch}}.${{matrix.config.ext}}

build-macos-packages-arm64:
name: build macOS Apple Silicon packages
strategy:
fail-fast: true
matrix:
config:
- format: productbuild
arch: apple
ext: pkg
runs-on: macos-14
steps:
- uses: actions/checkout@v3

Check failure on line 110 in .github/workflows/packages.yaml

View workflow job for this annotation

GitHub Actions / Actionlint

the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
with:
submodules: true

- name: Build the ${{matrix.config.format}} packages
run: |
cmake . -DCPACK_GENERATOR=${{ matrix.config.format }}
echo ${{ matrix.config.format }} | xargs -I{} cpack -G {}

- name: Store the master package artifacts
uses: actions/upload-artifact@v3

Check failure on line 120 in .github/workflows/packages.yaml

View workflow job for this annotation

GitHub Actions / Actionlint

the runner of "actions/upload-artifact@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
with:
name: ${{ matrix.config.format }}-${{matrix.config.arch}}
path: |
./*-${{matrix.config.arch}}.${{matrix.config.ext}}

release:
name: Create release and upload packages
needs:
- build-distro-packages-amd64
- build-distro-packages-arm64
- build-macos-packages-amd64
- build-macos-packages-arm64

runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artefacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifacts/

Expand All @@ -99,7 +156,7 @@
artifacts/**/*

- name: Release on tag
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true
Expand Down
16 changes: 14 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# CMetrics Version
set(CMT_VERSION_MAJOR 0)
set(CMT_VERSION_MINOR 8)
set(CMT_VERSION_PATCH 0)
set(CMT_VERSION_MINOR 9)
set(CMT_VERSION_PATCH 9)
set(CMT_VERSION_STR "${CMT_VERSION_MAJOR}.${CMT_VERSION_MINOR}.${CMT_VERSION_PATCH}")

# Include helpers
Expand Down Expand Up @@ -69,12 +69,18 @@ endif()

# Configuration options
option(CMT_DEV "Enable development mode" No)
option(CMT_DEBUG "Enable debug mode" No)
option(CMT_TESTS "Enable unit testing" No)
option(CMT_INSTALL_TARGETS "Enable subdirectory library installations" Yes)
option(CMT_ENABLE_PROMETHEUS_DECODER "Enable prometheus decoder" Yes)

if(CMT_DEV)
set(CMT_TESTS Yes)
set(CMT_DEBUG Yes)
endif()

if(CMT_DEBUG)
set(CMAKE_BUILD_TYPE Debug)
endif()

set(FLEX_BISON_GENERATED_DIR ${CMAKE_CURRENT_BINARY_DIR})
Expand Down Expand Up @@ -241,6 +247,12 @@ if (NOT CMT_HAVE_CFL)
COMPONENT headers
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ)

install(TARGETS cfl-static
RUNTIME DESTINATION ${CMT_INSTALL_BINDIR}
LIBRARY DESTINATION ${CMT_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMT_INSTALL_LIBDIR}
COMPONENT library)

# xxHash
install(FILES lib/cfl/lib/xxhash/xxh3.h
DESTINATION ${CMT_INSTALL_INCLUDEDIR}
Expand Down
12 changes: 7 additions & 5 deletions include/cmetrics/cmt_cat.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ struct cmt_untyped;
struct cmt_histogram;
struct cmt_summary;

int cmt_cat_counter(struct cmt *cmt, struct cmt_counter *counter);
int cmt_cat_gauge(struct cmt *cmt, struct cmt_gauge *gauge);
int cmt_cat_untyped(struct cmt *cmt, struct cmt_untyped *untyped);
int cmt_cat_histogram(struct cmt *cmt, struct cmt_histogram *histogram);
int cmt_cat_summary(struct cmt *cmt, struct cmt_summary *summary);
int cmt_cat_copy_label_keys(struct cmt_map *map, char **out);
int cmt_cat_copy_map(struct cmt_opts *opts, struct cmt_map *dst, struct cmt_map *src);
int cmt_cat_counter(struct cmt *cmt, struct cmt_counter *counter, struct cmt_map *filtered_map);
int cmt_cat_gauge(struct cmt *cmt, struct cmt_gauge *gauge, struct cmt_map *filtered_map);
int cmt_cat_untyped(struct cmt *cmt, struct cmt_untyped *untyped, struct cmt_map *filtered_map);
int cmt_cat_histogram(struct cmt *cmt, struct cmt_histogram *histogram, struct cmt_map *filtered_map);
int cmt_cat_summary(struct cmt *cmt, struct cmt_summary *summary, struct cmt_map *filtered_map);
int cmt_cat(struct cmt *dst, struct cmt *src);

#endif
1 change: 1 addition & 0 deletions include/cmetrics/cmt_decode_prometheus.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#define CMT_DECODE_PROMETHEUS_CMT_CREATE_ERROR 50
#define CMT_DECODE_PROMETHEUS_PARSE_VALUE_FAILED 60
#define CMT_DECODE_PROMETHEUS_PARSE_TIMESTAMP_FAILED 70
#define CMT_DECODE_PROMETHEUS_SAMPLE_VALUE_TOO_LONG 80

#define CMT_DECODE_PROMETHEUS_MAX_LABEL_COUNT 128

Expand Down
39 changes: 39 additions & 0 deletions include/cmetrics/cmt_decode_prometheus_remote_write.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */

/* CMetrics
* ========
* Copyright 2021-2024 The CMetrics Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


#ifndef CMT_DECODE_PROMETHEUS_REMOTE_WRITE_H
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_H

#include <cmetrics/cmetrics.h>
#include <prometheus_remote_write/remote.pb-c.h>

#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_SUCCESS 0
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_ALLOCATION_ERROR 1
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_UNEXPECTED_ERROR 2
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_INVALID_ARGUMENT_ERROR 3
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_UNEXPECTED_METRIC_TYPE 4
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_DECODE_ERROR 5
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_UNPACK_ERROR 6
#define CMT_DECODE_PROMETHEUS_REMOTE_WRITE_UNSUPPORTED_METRIC_TYPE 7

int cmt_decode_prometheus_remote_write_create(struct cmt **out_cmt, char *in_buf, size_t in_size);
void cmt_decode_prometheus_remote_write_destroy(struct cmt *cmt);

#endif
Loading
Loading