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

Fixing ci scripts and linking between reaching minimal amount of approvals and CI #924

Merged

Conversation

tenmoves
Copy link
Contributor

@tenmoves tenmoves commented Mar 1, 2023

fixes: #950

@tenmoves tenmoves added core team Assigned to the core team Governance About On-Chain governance labels Mar 1, 2023
@tenmoves tenmoves self-assigned this Mar 1, 2023
@tenmoves tenmoves force-pushed the fixing_governance_ci branch 3 times, most recently from 9011f80 to f0f0c39 Compare March 3, 2023 12:44
@tenmoves tenmoves changed the title [WIP] fixing ci scripts and linking between reaching minimal amount of approvals and CI Fixing ci scripts and linking between reaching minimal amount of approvals and CI Mar 3, 2023
@tenmoves tenmoves marked this pull request as ready for review March 3, 2023 12:45
@tenmoves
Copy link
Contributor Author

tenmoves commented Mar 3, 2023

`prop = %Archethic.Governance.Code.Proposal{
address: <<0, 0, 135, 189, 175, 8, 43, 160, 49, 21, 23, 241, 61, 189, 221,
177, 45, 120, 59, 243, 80, 75, 193, 250, 119, 188, 219, 73, 209, 197, 118,
170, 122, 142>>,
previous_public_key: <<0, 1, 62, 205, 23, 142, 29, 217, 94, 202, 136, 109,
165, 135, 153, 205, 202, 132, 122, 116, 97, 18, 90, 34, 141, 225, 172, 138,
16, 138, 85, 15, 41, 149>>,
timestamp: nil,
description: "\Testing code proposal"",
changes: "diff --git a/mix.exs b/mix.exs\nindex a82c0b3c..b94d4323 100644\n--- a/mix.exs\n+++ b/mix.exs\n@@ -4,7 +4,7 @@ defmodule Archethic.MixProject do\n def project do\n [\n app: :archethic,\n- version: "1.0.7",\n+ version: "1.0.8",\n build_path: "_build",\n config_path: "config/config.exs",\n deps_path: "deps",\ndiff --git a/rel/appups/archethic/1.0.7_to_1.0.8.appup b/rel/appups/archethic/1.0.7_to_1.0.8.appup\nnew file mode 100644\nindex 00000000..18b6d541\n--- /dev/null\n+++ b/rel/appups/archethic/1.0.7_to_1.0.8.appup\n@@ -0,0 +1,4 @@\n+{"1.0.8",\n+ [{"1.0.7",\n+ [{load_module,'Elixir.Archethic', []}]}],\n+ [{"1.0.7",\n+ [{load_module,'Elixir.Archethic', []}]}]\n+}.\n",
version: "1.0.8",
files: ["mix.exs", "rel/appups/archethic/1.0.7_to_1.0.8.appup"],
approvals: [
<<0, 0, 135, 189, 175, 8, 43, 160, 49, 21, 23, 241, 61, 189, 221, 177, 45,
120, 59, 243, 80, 75, 193, 250, 119, 188, 219, 73, 209, 197, 118, 170,
122, 142>>,
<<0, 0, 168, 220, 209, 92, 167, 255, 187, 168, 176, 63, 128, 210, 199, 35,
63, 0, 252, 36, 147, 196, 130, 249, 233, 17, 132, 0, 6, 88, 232, 198, 98,
44>>
]
}

alias Archethic.Governance.Code.CICD.Docker

Docker.run_ci!(prop)
`

for testing purposes

%Proposal{changes: changes, address: address},
src_dir,
persist?
) do
random = :crypto.strong_rand_bytes(4) |> Base.encode16()
prop_file = Path.join(System.tmp_dir!(), "prop_#{random}_#{Base.encode16(address)}")
Copy link
Member

Choose a reason for hiding this comment

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

Why use some randomness along the address, as we can only have one proposal per address ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't change this part, but I think it was helpful in local dev but you are right we don't need to have the randomness.

Copy link
Member

Choose a reason for hiding this comment

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

Ok

Copy link
Member

@samuelmanzanera samuelmanzanera left a comment

Choose a reason for hiding this comment

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

A small comment otherwise seems ok

@samuelmanzanera samuelmanzanera merged commit 384d0b5 into archethic-foundation:develop Mar 21, 2023
@samuelmanzanera samuelmanzanera added the bug Something isn't working label May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core team Assigned to the core team Governance About On-Chain governance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the continuous integration of code proposals
3 participants