Skip to content

Commit

Permalink
Fixes for 'cant find rust compiler' error and ops-scenario package up…
Browse files Browse the repository at this point in the history
…date (#26)

* fixed cant find rust compiler error

* fixed ops-scenario version to prevent unit test errors

* ignored CVE-2024-45311 because it relates to temporalio version

* fixed ops-scenario versions for integration tests

* Added cargo to build packages and ignored CVE-2024-34156

* fixes for ops-scenario and contribution updates
  • Loading branch information
onurmus authored Sep 12, 2024
1 parent 93daf86 commit e3767a3
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .trivyignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ CVE-2024-27308
# TODO (kelkawi-a): remove these once Temporal pushes the latest SDK build to pip
CVE-2024-32650
CVE-2024-24790
CVE-2024-45311
# TODO (onurmus): remove once Go is updated: https://warthogs.atlassian.net/browse/FR-8847
CVE-2024-34156
10 changes: 8 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@ tox # runs 'format', 'lint', and 'unit' environments
This charm is used to deploy Temporal server in a k8s cluster. For a local
deployment, follow the following steps:

# Install Docker
sudo addgroup --system docker
sudo adduser $USER docker
newgrp docker
sudo snap install docker

# Install Microk8s from snap:
sudo snap install microk8s --classic --channel=1.24
sudo snap install microk8s --channel 1.25-strict/stable

# Install charmcraft from snap:
sudo snap install charmcraft --classic
Expand All @@ -48,7 +54,7 @@ deployment, follow the following steps:
newgrp microk8s

# Enable the necessary Microk8s addons:
microk8s enable hostpath-storage dns registry
sudo microk8s enable hostpath-storage dns registry

# Install the Juju CLI client, juju:
sudo snap install juju --classic
Expand Down
9 changes: 5 additions & 4 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
type: charm
bases:
- build-on:
- name: ubuntu
channel: "22.04"
- name: ubuntu
channel: "22.04"
run-on:
- name: ubuntu
channel: "22.04"
- name: ubuntu
channel: "22.04"
parts:
charm:
charm-binary-python-packages:
- hvac==2.3.0
- cosl==0.0.6
build-packages: [cargo, rustc, pkg-config, libffi-dev, libssl-dev]
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ops==2.15.0
pytest-interface-tester==2.0.1
ops-scenario==6.1.7
7 changes: 2 additions & 5 deletions resource_sample_py/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,8 @@ build: ## Create a Python source distribution and a wheel in dist
.PHONY: build_rock
build_rock:
rockcraft pack
rockcraft.skopeo --insecure-policy copy oci-archive:$(ROCK_NAME) docker-daemon:$(IMAGE_NAME)
IMAGE_ID=$$(docker inspect --format='{{.Id}}' $(IMAGE_NAME)); \
docker tag $$IMAGE_ID localhost:32000/$(IMAGE_NAME)
docker push localhost:32000/$(IMAGE_NAME)

rockcraft.skopeo --insecure-policy copy --dest-tls-verify=false oci-archive:$(ROCK_NAME) docker://localhost:32000/$(IMAGE_NAME)

.PHONY: publish
publish: ## Publish the package to PYPI
$(POETRY) publish
Expand Down

0 comments on commit e3767a3

Please sign in to comment.