-
Notifications
You must be signed in to change notification settings - Fork 2
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/clean up #49
Update/clean up #49
Conversation
src/types/happ.rs
Outdated
pub fn save(self) -> Result<Self> { | ||
if let Ok(path) = env::var("SL_PREFS_PATH") { | ||
trace!("Writing default servicelogger prefs to {}", &path); | ||
// create or overwrite to a file | ||
let file = File::create(&path)?; | ||
serde_yaml::to_writer(file, &self).context(format!( | ||
"Failed writing service logger preferences to file {}", | ||
path | ||
))?; | ||
}; | ||
Ok(self) | ||
} |
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 still in use? If this is a clean up this should be removed
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.
It is in use upon install of the hosted happs, in order to save the hard coded happ preferences to a file. To confirm, you're saying we no longer need to create and reference this preference file, correct?
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.
After your implementation of getting the preferences from HHA for SL, I don't think we have been using this file.
The only place would be the hpos-api, and if that's the case that needs to be updated since that will no longer be accurate
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.
OK. It does look like it's being used there. I'll make a PR to amend that out too.
src/utils/core_app.rs
Outdated
use hpos_hc_connect::hha_types::HappAndHost; | ||
use tracing::trace; | ||
|
||
pub async fn get_host_preferences(core_app_client: &mut HHAAgent) -> Result<HappPreferences> { |
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.
Suggestion: All these zomeCalls could be added to the HHAAgent
impl here: https://github.com/Holo-Host/hpos-service-crates/blob/main/crates/hpos_connect_hc/src/hha_agent.rs#L56-L89
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. Can you take a look and approve at the dependent pr: Holo-Host/hpos-service-crates#191
Co-authored-by: Joel Ulahanna <[email protected]>
* jurisdictions and categories struct compat with HHA * linting * don't panic if none * lint * hpos_hc_connect: bump to latest * update flake.nix * holochain v0.4.0-dev.1 (#47) * get_happ_preferences: update payload * clippy * edit names * clean up & restructure * move hbs types * import download_file from hpos_hc_connect * inline doc touch-ups * clean up comments * merge clean-up * Update/clean up (#49) * edit names * clean up & restructure * move hbs types * import download_file from hpos_hc_connect * inline doc touch-ups * clean up comments * Update src/types/hbs.rs Co-authored-by: Joel Ulahanna <[email protected]> * import core app types from hpos_hc_connect * remove option from kyc * edit comments --------- Co-authored-by: Joel Ulahanna <[email protected]> --------- Co-authored-by: Alastair Ong <[email protected]> Co-authored-by: peeech <[email protected]> Co-authored-by: Joel Ulahanna <[email protected]>
### Updates: - Adds the zome calls in response to the suggestion from the [holo-auto-installer pr #49](Holo-Host/holo-auto-installer#49)
* feat: added invoice due date from note * feat: imports clean up * feat: added mattermost notification for holo-auto-installer * feat: removed un-used imports * feat: removed non snake case error * Merge/updated structure into invoice pr (#52) * jurisdictions and categories struct compat with HHA * linting * don't panic if none * lint * hpos_hc_connect: bump to latest * update flake.nix * holochain v0.4.0-dev.1 (#47) * get_happ_preferences: update payload * clippy * edit names * clean up & restructure * move hbs types * import download_file from hpos_hc_connect * inline doc touch-ups * clean up comments * merge clean-up * Update/clean up (#49) * edit names * clean up & restructure * move hbs types * import download_file from hpos_hc_connect * inline doc touch-ups * clean up comments * Update src/types/hbs.rs Co-authored-by: Joel Ulahanna <[email protected]> * import core app types from hpos_hc_connect * remove option from kyc * edit comments --------- Co-authored-by: Joel Ulahanna <[email protected]> --------- Co-authored-by: Alastair Ong <[email protected]> Co-authored-by: peeech <[email protected]> Co-authored-by: Joel Ulahanna <[email protected]> * feat: cargo fmt --------- Co-authored-by: Zeeshan Abid <[email protected]> Co-authored-by: Lisa Jetton <[email protected]> Co-authored-by: Alastair Ong <[email protected]> Co-authored-by: peeech <[email protected]> Co-authored-by: Joel Ulahanna <[email protected]>
…#54) * feat: added invoice due date from note * feat: imports clean up * edit names * clean up & restructure * move hbs types * import download_file from hpos_hc_connect * inline doc touch-ups * feat: added mattermost notification for holo-auto-installer * feat: removed un-used imports * clean up comments * merge clean-up * feat: removed non snake case error * Merge/updated structure into invoice pr (#52) * jurisdictions and categories struct compat with HHA * linting * don't panic if none * lint * hpos_hc_connect: bump to latest * update flake.nix * holochain v0.4.0-dev.1 (#47) * get_happ_preferences: update payload * clippy * edit names * clean up & restructure * move hbs types * import download_file from hpos_hc_connect * inline doc touch-ups * clean up comments * merge clean-up * Update/clean up (#49) * edit names * clean up & restructure * move hbs types * import download_file from hpos_hc_connect * inline doc touch-ups * clean up comments * Update src/types/hbs.rs Co-authored-by: Joel Ulahanna <[email protected]> * import core app types from hpos_hc_connect * remove option from kyc * edit comments --------- Co-authored-by: Joel Ulahanna <[email protected]> --------- Co-authored-by: Alastair Ong <[email protected]> Co-authored-by: peeech <[email protected]> Co-authored-by: Joel Ulahanna <[email protected]> * feat: cargo fmt * clean-up suspended disable flow * edit comment --------- Co-authored-by: Zeeshan Abid <[email protected]> Co-authored-by: Alastair Ong <[email protected]> Co-authored-by: peeech <[email protected]> Co-authored-by: Joel Ulahanna <[email protected]>
Note: This handles issue #48.
Context: This handles the issue @zo-el pointed out last Friday as well as few other bugs that were hard to find in the previous structure. It also cleans up the code base to support maintainability and knowledge sharing, with attn to supporting the ongoing sl rotation work.
Updates:
list_running_app
tolist_apps(Some(AppStatusFilter::Enabled))