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 API Gateway remaining tickets and bug fixes #543

Merged
merged 18 commits into from
Jun 6, 2024

Conversation

afsalthaj
Copy link
Contributor

@afsalthaj afsalthaj commented Jun 2, 2024

I thought of finishing as much API Gateway tickets remaining in the sprint as possible over the weekend.

Fixes #449
Fixes #249
Fixes Function Lookup bug which I found when working with golem-timeline.


#[derive(Clone)]
pub struct EvaluationContext {
pub variables: Option<TypeAnnotatedValue>,
pub analysed_functions: Vec<AnalysedFunction>,
pub functions: Vec<Function>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jdegoes This is not fully what we discussed, but consider this as one step towards what we envisioned, while fixing a bug immediately

Copy link
Contributor

Choose a reason for hiding this comment

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

Forward progress, I like it!

@afsalthaj afsalthaj marked this pull request as ready for review June 3, 2024 06:31
pub struct Function {
pub fqn: FQN,
pub arguments: Vec<FunctionParameter>,
pub return_type: Vec<FunctionResult>,
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

}
}

pub fn find_function(&self, function: &str) -> Option<Function> {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is O(n) in number of functions, which is fine for now, but should change to O(log n) at some point.

) -> Self {
let mut request_data = internal::request_type_annotated_value(request);
let worker_data = create_record("worker", worker_detail.clone().to_type_annotated_value());
let merged = request_data.merge(&worker_data);

let top_level_functions = component_metadata.functions();
Copy link
Contributor

Choose a reason for hiding this comment

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

This is all a tremendous amount of work to do on each invocation. In the future we need to cache this.

@afsalthaj
Copy link
Contributor Author

Making changes based on the new changes for unification

@afsalthaj afsalthaj merged commit b9da7f1 into main Jun 6, 2024
14 checks passed
@afsalthaj afsalthaj deleted the fix_function_lookup branch June 6, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants