-
Notifications
You must be signed in to change notification settings - Fork 16
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
Update InstallAppRequest type to new format #298
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test or modify an existing one that uses roles_settings.
I'm confused - why do the tests even pass? Are the tests not actually ran in CI? |
The tests pass because |
Test added. |
Hmm...actually the problem that |
membrane_proof: new Uint8Array(6), | ||
modifiers: { | ||
network_seed: "hello", | ||
properties: yaml.dump({ progenitor: progenitorKey }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the test now to use a yaml string.
cc @ThetaSinner
Okay never mind. I think this is totally appropriate and the app developer can be expected to take care of any required conversion for example using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
a suggestion for the yaml properties type and some cleanup
package.json
Outdated
@@ -48,13 +48,15 @@ | |||
"isomorphic-ws": "^5.0.0", | |||
"js-base64": "^3.7.5", | |||
"js-sha512": "^0.9.0", | |||
"js-yaml": "4.1.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be a dev dependency too.
src/api/admin/types.ts
Outdated
* @public | ||
* Any value that is serializable to a Yaml value | ||
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed here? It should only produce a warning.
Actually unknown
would be the idiomatic type.
test/e2e/common.ts
Outdated
@@ -117,7 +117,7 @@ export const installAppAndDna = async ( | |||
installed_app_id, | |||
agent_key: agent, | |||
path, | |||
membrane_proofs: {}, | |||
roles_settings: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
roles_settings
is optional
roles_settings: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
test/e2e/common.ts
Outdated
@@ -159,7 +159,7 @@ export const createAppWsAndInstallApp = async ( | |||
installed_app_id, | |||
agent_key: agent, | |||
path, | |||
membrane_proofs: {}, | |||
roles_settings: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
roles_settings: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still here =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And still here
test/e2e/index.ts
Outdated
@@ -85,7 +87,7 @@ test( | |||
installed_app_id, | |||
agent_key, | |||
path: `${FIXTURE_PATH}/test.happ`, | |||
membrane_proofs: {}, | |||
roles_settings: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and so on further down
roles_settings: {}, |
test/e2e/index.ts
Outdated
@@ -1046,7 +1119,7 @@ test( | |||
|
|||
const tag = "test_tag"; | |||
const link: Link = await client.callZome({ | |||
cap_secret: null, | |||
cap_secret: undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cap_secret: undefined, |
…pubkey to Uint8Array to have deepEqual work properly
Thank you! Addressed all of these now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few more bits
Cargo.toml
Outdated
@@ -7,4 +7,4 @@ resolver = "2" | |||
opt-level = "z" | |||
|
|||
[workspace.dependencies] | |||
hdk = "0.5.0-dev.0" | |||
hdk = "0.5.0-dev.6" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is intentionally kept at .0
as long as there are no breaking changes in the HDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright!
test/e2e/common.ts
Outdated
@@ -159,7 +159,7 @@ export const createAppWsAndInstallApp = async ( | |||
installed_app_id, | |||
agent_key: agent, | |||
path, | |||
membrane_proofs: {}, | |||
roles_settings: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still here =)
search and replace for the win. |
test/e2e/common.ts
Outdated
@@ -159,7 +159,7 @@ export const createAppWsAndInstallApp = async ( | |||
installed_app_id, | |||
agent_key: agent, | |||
path, | |||
membrane_proofs: {}, | |||
roles_settings: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And still here
test/e2e/common.ts
Outdated
@@ -117,7 +117,7 @@ export const installAppAndDna = async ( | |||
installed_app_id, | |||
agent_key: agent, | |||
path, | |||
membrane_proofs: {}, | |||
roles_settings: {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete me
* update InstallAppRequest type to new format * add new YamlProperties type and test that installs app with roles_settings set * use js-yaml in test * remove unnecessary fields, remove js-yaml from dependencies, convert pubkey to Uint8Array to have deepEqual work properly * more redundant membrane_proof fields, revert hdk bump * removed unused roles_settings fields
* Update InstallAppRequest type to new format (#298) * update InstallAppRequest type to new format * add new YamlProperties type and test that installs app with roles_settings set * use js-yaml in test * remove unnecessary fields, remove js-yaml from dependencies, convert pubkey to Uint8Array to have deepEqual work properly * more redundant membrane_proof fields, revert hdk bump * removed unused roles_settings fields * rebuild docs * removed .only to have all tests run * bump hdk verison, fix hc sandbox args and log errors, update flake * test: fix expected number of cells due to dpki being removed * revert hdk bump --------- Co-authored-by: Jost Schulte <jost-s@users.noreply.github.com>
This PR contains the type changes required in order to adhere to holochain/holochain#4416 and its follow-up PR holochain/holochain#4488