From 770c5de1ffe7ea19408c0439bf803595b710a0cc Mon Sep 17 00:00:00 2001 From: Alex Lowe Date: Thu, 13 Jul 2023 16:36:19 -0400 Subject: [PATCH] deps: add rust build dependencies to charm (#494) --- .github/workflows/codeql-analysis.yml | 64 ------------------- charmcraft.yaml | 2 + .../test_remote_write_grafana_agent.py | 7 +- 3 files changed, 8 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index e7996b44..00000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,64 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -name: "CodeQL" - -on: - push: - branches: [main] - pull_request: - # The branches below must be a subset of the branches above - branches: [main] - -permissions: - security-events: - write - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['python'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 diff --git a/charmcraft.yaml b/charmcraft.yaml index e62b0a7c..3b93f94a 100644 --- a/charmcraft.yaml +++ b/charmcraft.yaml @@ -12,6 +12,8 @@ parts: charm: build-packages: - git + charm-binary-python-packages: + - jsonschema charm-python-packages: - wheel==0.37.1 - setuptools==45.2.0 diff --git a/tests/integration/test_remote_write_grafana_agent.py b/tests/integration/test_remote_write_grafana_agent.py index 77179d42..f86e4b53 100644 --- a/tests/integration/test_remote_write_grafana_agent.py +++ b/tests/integration/test_remote_write_grafana_agent.py @@ -54,13 +54,18 @@ async def test_remote_write_with_grafana_agent( ), ) - await ops_test.model.wait_for_idle(apps=apps, status="active", wait_for_units=1) + await ops_test.model.wait_for_idle(apps=apps, wait_for_units=1) assert await check_prometheus_is_ready(ops_test, prometheus_name, 0) await asyncio.gather( ops_test.model.add_relation( f"{prometheus_name}:receive-remote-write", f"{agent_name}:send-remote-write" ), + # With a "remote-write" relation in place, grafana-agent will block without a matching + # "metrics-endpoint" relation, so relate back to prometheus just to get this covered. + ops_test.model.add_relation( + f"{prometheus_name}:self-metrics-endpoint", f"{agent_name}:metrics-endpoint" + ), ops_test.model.add_relation( f"{tester_name}:metrics-endpoint", f"{agent_name}:metrics-endpoint" ),