Skip to content
Merged
Show file tree
Hide file tree
Changes from 123 commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
bb5a9f6
chore: preparing conditional compilation for multiple os
bpetit Dec 22, 2021
6e111e8
ci: trying new modular ci workflow
bpetit Dec 23, 2021
8762017
fix: fixing badge on readme
bpetit Dec 23, 2021
b28da7a
ci: trying to fix workflow trigger
bpetit Dec 23, 2021
b15da23
ci: trying to fix workflow trigger
bpetit Dec 23, 2021
298906a
fix: fixed id used twice in workflow
bpetit Dec 23, 2021
bf35032
ci: rollback on ci branch filter
bpetit Dec 23, 2021
e30087a
style: cargo fmt
bpetit Dec 23, 2021
98c2c2d
ci: merging fmt and clippy jobs as they are fast and require to insta…
bpetit Dec 23, 2021
adc8ca0
style: cargo clippy
bpetit Dec 23, 2021
e35af48
style: clippy
bpetit Dec 23, 2021
8ab217b
fix: github vars are undefined
bpetit Dec 23, 2021
58230a3
fix: github vars are undefined
bpetit Dec 23, 2021
7429286
fix: github vars are undefined
bpetit Dec 23, 2021
abfadf1
ci: fixing awx parameters
bpetit Dec 24, 2021
cfca4f4
ci: fixing awx parameters
bpetit Dec 24, 2021
4b4c4d8
ci: fixing awx parameters
bpetit Dec 24, 2021
c18855c
ci: enabling rust fmt test
bpetit Dec 24, 2021
816633a
ci: enabling rust fmt test
bpetit Dec 24, 2021
84f1373
ci: renaming test job
bpetit Dec 24, 2021
ef60d79
fix: fixed test
bpetit Dec 24, 2021
fb4bf0c
fix: doctest
bpetit Dec 24, 2021
77abe32
style: cargo fmt
bpetit Dec 24, 2021
badb89b
ci: added docker build and prometheus test to workflow
bpetit Dec 24, 2021
354e909
ci: fixing job ids
bpetit Dec 24, 2021
38c6970
ci: adding windows job boilerplate
bpetit Dec 24, 2021
9deb06a
ci: installing rust in windows worker
bpetit Dec 24, 2021
0dfc6bd
ci: fixing windows job
bpetit Dec 24, 2021
95b9e77
ci: fixing chocolatey args
bpetit Dec 24, 2021
c245955
ci: fixing chocolatey args
bpetit Dec 24, 2021
78e8c28
ci: fixing chocolatey args
bpetit Dec 24, 2021
34e8cd7
ci: fixing chocolatey args
bpetit Dec 24, 2021
4322a21
ci: fixing chocolatey args
bpetit Dec 24, 2021
1a49d92
ci: trying to cancel in-progress workflows when a new one is triggere…
bpetit Dec 24, 2021
88d857c
ci: trying a build on windows
bpetit Dec 24, 2021
057f2df
fix: fixing some compilation errors with windows
bpetit Dec 27, 2021
97e063d
build: applied conditional compilation to containers feature
bpetit Dec 28, 2021
3beedb0
style: fmt and clippy
bpetit Dec 28, 2021
6fab8a2
build: selecting compatibles features for windows
bpetit Dec 28, 2021
dc775de
style: cargo gmt
bpetit Dec 28, 2021
f238557
build: disabling default features for windows
bpetit Dec 28, 2021
8eca92b
docs: trying to include contributing documentation in CONTRIBUTING
bpetit Dec 28, 2021
40beb78
ci: removing warp10 from windows build, as it is not compatible yet
bpetit Dec 28, 2021
647ba71
feat: added multi os abstraction basis for processes memry stats
bpetit Dec 28, 2021
159aa50
style: fmt and clippy
bpetit Dec 28, 2021
3a2b3b9
docs: fixed render in CONTRIBUTING.md
bpetit Dec 28, 2021
e1fffdf
build: fixed linux specific declarations
bpetit Dec 28, 2021
0f7d7ec
build: fixing os specific exceptions
bpetit Dec 28, 2021
b2b37fc
style: fmt
bpetit Dec 28, 2021
3449a80
ci: removing debug step
bpetit Dec 28, 2021
d2a7b0b
build: fixing issues on windows build
bpetit Dec 28, 2021
1fef704
build: escaped linux specific code
bpetit Dec 28, 2021
363ae32
style: fmt
bpetit Dec 28, 2021
dd2911d
build: trying to fix errors on windows build
bpetit Dec 28, 2021
a89ebee
build: preparing interface to manage windows process stats
bpetit Dec 28, 2021
7b66e76
chore: implementing status() for IProcess
bpetit Dec 29, 2021
bd35205
build: fix build errors on windows
bpetit Dec 29, 2021
4ccd359
chode: implemented exe() for IProcess
bpetit Dec 29, 2021
d84364c
chore: using exe() on IProcess
bpetit Dec 29, 2021
732690c
build: fixing dumb error on windows
bpetit Dec 29, 2021
e70d0eb
build: basic tests and skeleton for MsrRAPLSensor
bpetit Dec 29, 2021
1f3d0b5
build: trying to apply procfs and windows-rs as target specific deps
bpetit Dec 29, 2021
9b7113d
build: fixed linux specific dependencies
bpetit Dec 29, 2021
52f3a97
style: cargo fmt
bpetit Dec 29, 2021
246c73b
build: escaped warp10 as a feature
bpetit Dec 29, 2021
5ebc105
build: escaped warp10 as a feature
bpetit Dec 29, 2021
ab2b2c1
chore: fixed mutability for new sensor
bpetit Dec 29, 2021
f70bf14
build: made msr_rapl sensor default for windows
bpetit Dec 29, 2021
8b66f01
refactor: applying different behavior per sensor
bpetit Dec 30, 2021
e3e36a5
refactor: made powercap rapl sensor work with new trait architecture
bpetit Dec 30, 2021
9bcd498
refactor: got first (wrong) metrics through topology up to stdout exp…
bpetit Dec 30, 2021
cd4b1e1
refactor: disabling old functions in topology
bpetit Dec 30, 2021
7a9f041
refactor: fixing bug in getting process status
bpetit Dec 30, 2021
25851ba
style: cleaning code
bpetit Dec 31, 2021
388100f
refactor: fixing mutability in get alive processes
bpetit Dec 31, 2021
992a42b
pushing non compiling version as a reference to discuss with @Vic063
bpetit Jan 7, 2022
dac1ef7
fix: getting metrics from the new driver version
bpetit Jan 14, 2022
1dd6c43
feat: processes power measurement working (need to fix unit)
bpetit Jan 16, 2022
ff120a4
fix: fixed power consumption per process and cleaned code
bpetit Jan 17, 2022
178a949
refactor: applying different behavior per sensor
bpetit Dec 30, 2021
82de6b3
refactor: made powercap rapl sensor work with new trait architecture
bpetit Dec 30, 2021
e8e7dd0
refactor: got first (wrong) metrics through topology up to stdout exp…
bpetit Dec 30, 2021
4641501
refactor: disabling old functions in topology
bpetit Dec 30, 2021
29189d0
refactor: fixing bug in getting process status
bpetit Dec 30, 2021
cb4745f
style: cleaning code
bpetit Dec 31, 2021
092baa7
refactor: fixing mutability in get alive processes
bpetit Dec 31, 2021
e2de66b
pushing non compiling version as a reference to discuss with @Vic063
bpetit Jan 7, 2022
c0c5384
fix: getting metrics from the new driver version
bpetit Jan 14, 2022
6d850bc
feat: processes power measurement working (need to fix unit)
bpetit Jan 16, 2022
3612537
fix: fixed power consumption per process and cleaned code
bpetit Jan 17, 2022
bcf6e16
style: cleaning code
bpetit Jan 17, 2022
d1baf90
Merge branch 'feat/conditional-compilation' into feat/trait-for-diffe…
bpetit Jan 17, 2022
f213757
Merge pull request #154 from hubblo-org/feat/trait-for-different-sensors
bpetit Jan 17, 2022
86e8a32
fix; fixing linux version on this branch
bpetit Jan 17, 2022
e4d4cf7
style: clippy and fmt
bpetit Jan 17, 2022
7c82ba6
perf: cleaning (yet) unused field
bpetit Jan 17, 2022
193a99c
style: clippy
bpetit Jan 17, 2022
21e7d1f
style: fmt
bpetit Jan 17, 2022
4802fde
Revert "perf: cleaning (yet) unused field"
bpetit Jan 17, 2022
6e3d37c
fix: target_os for qemu import
bpetit Jan 17, 2022
ea5c6c9
fix: cleaning import
bpetit Jan 17, 2022
f416652
fix: multi platform clippy is not so nice
bpetit Jan 17, 2022
2179b42
fix: cpu usage percentage for windows
bpetit Feb 15, 2022
563e984
Merge branch 'feat/conditional-compilation' of https://github.com/hub…
bpetit Feb 15, 2022
41439f1
style: fmt
bpetit Mar 23, 2022
a3d98d0
fix: fixing ubuntu version of the docker image to 20.04
bpetit Mar 23, 2022
d2a01e5
perf: adding dockerignore to lighten the image
bpetit Mar 23, 2022
a3ced54
ci: temporarily removing clippy check
bpetit Mar 23, 2022
66ec24a
style: clippy
bpetit Jul 17, 2022
387733e
Merge branch 'feat/conditional-compilation' of https://github.com/hub…
bpetit Jul 17, 2022
a832478
Merge branch 'dev' into feat/conditional-compilation
bpetit Jul 17, 2022
491066c
style: fmt
bpetit Jul 17, 2022
78d4267
Merge branch 'feat/conditional-compilation' of https://github.com/hub…
bpetit Jul 17, 2022
e23007d
style: clippy
bpetit Jul 19, 2022
4c89ca3
style: fmt
bpetit Jul 19, 2022
84a1791
ci: upgrading to gh action chocolatey v2
bpetit Jul 19, 2022
734a919
fix: preventing a missing cmdline line to make scaphandre crash
bpetit Jul 19, 2022
a726613
ci: ignoring checksums for rustup in windos test
bpetit Jul 19, 2022
7479d25
ci: adding fmt and clippy test for windows
bpetit Jul 20, 2022
fb9195f
ci: fixing job syntax
bpetit Jul 20, 2022
0fae59a
Merge branch 'dev' into feat/conditional-compilation
bpetit Jul 20, 2022
4d89bef
style: clippy
bpetit Jul 20, 2022
d78e08b
docs: update compatibility doc
bpetit Jul 20, 2022
d413af5
fix: addressed comment from @uggla https://github.com/hubblo-org/scap…
bpetit Jul 25, 2022
e9c96cb
fix: change accordingly to @uggla's comment https://github.com/hubblo…
bpetit Jul 25, 2022
c2defc1
chore: removing unsued lazy_static dep
bpetit Jul 25, 2022
f8a4efc
fix: adapting docker cgroup regex to updates in debian buster/ubuntu>21
bpetit Jul 25, 2022
5bc6bc9
fix: troubleshooting containers labelling
bpetit Jul 29, 2022
ec39cd8
fix: added verbosity to docker compose for tests troubleshoot
bpetit Jul 29, 2022
f09a8ac
fix: added verbosity to docker compose for tests troubleshoot
bpetit Jul 29, 2022
f471086
fix: fixing docker labels issue on debian bullseye
bpetit Jul 29, 2022
924ae26
style: cargo fmt
bpetit Jul 29, 2022
8b60942
fix: fixing docker regex
bpetit Jul 29, 2022
599c1d5
fix: fixing docker regex
bpetit Jul 29, 2022
f13cfe0
fix: fixing docker regex
bpetit Jul 29, 2022
b114b01
fix: looking for container labels
bpetit Jul 29, 2022
54d5d26
fix: tracking container cgroup strings that match no regex on ci machine
bpetit Aug 5, 2022
8e84150
style: cleaned code
bpetit Aug 7, 2022
82cd72d
ci: adding cargo bloat to tests
bpetit Aug 7, 2022
cdca0a6
ci: disabling bloat test, to be fixed
bpetit Aug 7, 2022
6390465
docs: adding section for msr rapl sensor
bpetit Aug 8, 2022
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
21 changes: 21 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
target/

docs_src/

.git

.cache

*.md

*.jpg

*.png

*.svg

book.toml

helm/

docker-compose/
120 changes: 114 additions & 6 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build_and_test
name: Tests

on:
push:
Expand All @@ -12,6 +12,12 @@ on:
- 'CONTRIBUTING.md'
pull_request:
branches: [ main, dev ]
paths-ignore:
- 'docs_src/**'
- 'README.md'
- 'CHANGELOG.md'
- 'CITATION'
- 'book.toml'

env:
CARGO_TERM_COLOR: always
Expand All @@ -20,9 +26,90 @@ env:
AWX_HOST: "https://cd.hubblo.org"

jobs:
build:
name: build_and_test_x86_64
fmt_and_clippy_linux:
name: Cargo Fmt and Clippy - Linux
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: ambimax/action-cancel-previous-runs@v1
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Clippy Check
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -A clippy::upper_case_acronyms -D warnings
fmt_and_clippy_windows:
name: Cargo Fmt and Clippy - Windows
runs-on: windows-latest
needs: fmt_and_clippy_linux
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rustup
uses: crazy-max/ghaction-chocolatey@v2
with:
args: install rustup.install --ignore-checksums
- name: Install Rust toolchain
run: |
rustup toolchain install stable-x86_64-pc-windows-msvc
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Clippy Check
uses: actions-rs/cargo@v1
with:
command : clippy
args: --no-default-features --features "prometheus json riemann"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you restrict to such features and not use the default ones?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, other exporters require openssl crate which asks for linux openssl libraries.

Once we hare removed this requirements for rustls we should be able to allow all features on windows.


test_linux_x86_64:
name: Test on GNU/Linux x86_64 (Bare metal worker)
runs-on: ubuntu-latest
needs: fmt_and_clippy_linux
steps:
- name: Install dependencies (awxkit)
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install python requirements (awxkit)
run: |
python -m pip install --upgrade pip
pip install awxkit
- name: Log on AWX
id: login
run: |
export AWX_TOKEN=$(awx --conf.host "${{env.AWX_HOST}}" --conf.username "${{env.AWX_PUBLIC_USER}}" --conf.password "${{env.AWX_PUBLIC_ACCESS}}" login | jq .token | tr -d '"')
echo "::set-output name=awx_token::${AWX_TOKEN}"
- name: Prepare Rust environment on bare metal worker
id: rust
run: |
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ env.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"$GITHUB_REPOSITORY\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 12 --monitor
- name: Clone Scaphandre repository
id: clone
run: |
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ env.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 13 --monitor
- name: Run Unit Tests
id: unittests
run: |
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ env.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 14 --monitor
build_linux_x86_64:
name: Build on GNU/Linux x86_64 (Bare metal worker)
runs-on: ubuntu-latest
needs: test_linux_x86_64
steps:
- name: Install dependencies (awxkit)
uses: actions/setup-python@v2
Expand All @@ -37,7 +124,28 @@ jobs:
run: |
export AWX_TOKEN=$(awx --conf.host "${{env.AWX_HOST}}" --conf.username "${{env.AWX_PUBLIC_USER}}" --conf.password "${{env.AWX_PUBLIC_ACCESS}}" login | jq .token | tr -d '"')
echo "::set-output name=awx_token::${AWX_TOKEN}"
- name: Launch job
id: launch
- name: Build Docker image
id: dockerbuild
run: |
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ env.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 15 --monitor
- name: Test Scaphandre + Prometheus in docker-compose
id: promtest
run: |
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ env.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 16 --monitor
test_windows_x86_64:
name: Test on Windows x86_64 (Virtual machine worker)
runs-on: "windows-2019"
needs: fmt_and_clippy_windows
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rustup
uses: crazy-max/ghaction-chocolatey@v2
with:
args: install rustup.install --ignore-checksums
- name: Install Rust toolchain
run: |
rustup toolchain install stable-x86_64-pc-windows-msvc
- name: Build (debug mode)
run: |
awx --conf.token ${{ steps.login.outputs.awx_token }} --conf.host ${{ env.AWX_HOST }} job_templates launch --extra_vars="{\"github_repository\":\"${GITHUB_REPOSITORY}\",\"github_actor\":\"${GITHUB_ACTOR}\",\"github_workflow\":\"${GITHUB_WORKFLOW}\",\"github_workspace\":\"${GITHUB_WORKSPACE}\",\"github_event_name\":\"${GITHUB_EVENT_NAME}\",\"github_event_path\":\"${GITHUB_EVENT_PATH}\",\"github_sha\":\"${GITHUB_SHA}\",\"github_ref\":\"${GITHUB_REF}\",\"github_head_ref\":\"${GITHUB_HEAD_REF}\",\"github_base_ref\":\"${GITHUB_BASE_REF}\",\"github_server_url\":\"${GITHUB_SERVER_URL}\"}" 9 --monitor
cargo build --no-default-features --features "prometheus json riemann"
Comment thread
bpetit marked this conversation as resolved.
57 changes: 0 additions & 57 deletions .github/workflows/rust.yml

This file was deleted.

2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Please have a look at our [Contributing guide](https://hubblo-org.github.io/scaphandre-documentation/contributing.html) !

Or from the code repository directly : [contributing.md](docs_src/contributing.md).
Loading