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

[draft]: small refactoring of the Spin engine #63

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

radu-matei
Copy link
Member

This is a WIP of beginning to refactor the Spin engine.
So far, most of this is preference, but this branch will try to address some of the TODOs in the code base eventually.

cc @Mossaka

l.config.media_type().to_string() == spin_oci::client::SPIN_APPLICATION_MEDIA_TYPE
})
.context("cannot find locked application in layers for application")?;
let mut locked_app = LockedApp::from_json(&locked_layer.layer)?;
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: this should handle archive layers (ref #28)

@@ -0,0 +1,133 @@
use std::path::{Path, PathBuf};
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: tests for the new loader.

}
}

#[cfg(test)]
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: re-add these tests.


fn main() {
// Configure the shim to have only error level logging for performance improvements.
let shim_config = Config {
default_log_level: "error".to_string(),
// default_log_level: "error".to_string(),
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO:

use trigger_command::CommandTrigger;
use trigger_sqs::SqsTrigger;
// use trigger_command::CommandTrigger;
// use trigger_sqs::SqsTrigger;
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: re-enable the command and SQS triggers

Signed-off-by: Radu Matei <[email protected]>
@Mossaka
Copy link
Member

Mossaka commented Jul 23, 2024

I think many of the changes in this PR are good. Do you intend to continue working on this PR, @radu-matei ?

@radu-matei
Copy link
Member Author

Yes — I would still like to bring these changes in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants