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

Feature/implement triggers #1364

Open
wants to merge 13 commits into
base: feature/trigger-base
Choose a base branch
from

Conversation

RiddhiBagadiaa
Copy link
Contributor

Description

Type of change

Does this correspond to an open issue?

Select type(s) of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have fixed any merge conflicts

@anthonylasso
Copy link
Contributor

Riddhi reopen a PR and point it to feature/trigger-base

we're going to consolidate all trigger branches there

@sdreyer sdreyer changed the base branch from main to feature/trigger-base March 2, 2024 00:47
api/main.go Outdated Show resolved Hide resolved
api/main.go Outdated Show resolved Hide resolved
client/src/featureform/client.py Outdated Show resolved Hide resolved
client/src/featureform/client.py Show resolved Hide resolved
client/src/featureform/client.py Show resolved Hide resolved
client/src/featureform/register.py Outdated Show resolved Hide resolved
}

func (resource *triggerResource) Dependencies(lookup ResourceLookup) (ResourceLookup, error) {
// TODO: Change later, do we need to return all the resources that use this trigger?
Copy link
Contributor

Choose a reason for hiding this comment

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

the only current validation rule we have is we can't delete triggers that have resources currently, so if it's a performance issue, we only need to know that it has some resources not necessarily all of them.

@RiddhiBagadiaa RiddhiBagadiaa marked this pull request as ready for review March 13, 2024 16:34
client/src/featureform/client.py Show resolved Hide resolved
client/src/featureform/client.py Outdated Show resolved Hide resolved
client/src/featureform/register.py Outdated Show resolved Hide resolved
client/src/featureform/register.py Outdated Show resolved Hide resolved
client/src/featureform/register.py Outdated Show resolved Hide resolved
return nil, fmt.Errorf("resource not of type trigger: %v", err)
}
//asserted_trigger.serialized.Resources = append(asserted_trigger.serialized.Resources, &pb.ResourceID{Resource: &pb.NameVariant{Name: variant.Name, Variant: variant.Variant}, ResourceType: 6})
err = serv.lookup.Set(trigger.ID(), asserted_trigger)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this creating the trigger? Unsure what we need this for?

return serv.genericCreate(ctx, &triggerResource{trigger}, nil)
}

func (serv *MetadataServer) AddTrigger(ctx context.Context, tr *pb.TriggerRequest) (*pb.Empty, error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Lets walk through the add and remove when you get the other stuff cleaned up. Theres probably cleaner ways to do these functions

Copy link
Contributor

Choose a reason for hiding this comment

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

+10 on this, you can delegate the creation to each variant instead of putting all the logic in here

metadata/metadata.go Outdated Show resolved Hide resolved
@@ -1892,6 +2256,59 @@ func (serv *MetadataServer) genericCreate(ctx context.Context, res Resource, ini
serv.Logger.Error(errors.WithStack(err))
return nil, err
}

triggers := []string{}
Copy link
Collaborator

Choose a reason for hiding this comment

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

All this logic can probably be in propogate change. Lets go through this after the rest is cleaned up

metadata/metadata.go Outdated Show resolved Hide resolved
metadata/metadata.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

Attention: Patch coverage is 67.97274% with 188 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (feature/trigger-base@b05130e). Click here to learn what that means.

Files Patch % Lines
metadata/metadata.go 48.41% 90 Missing and 24 partials ⚠️
metadata/client.go 84.81% 22 Missing and 7 partials ⚠️
client/src/featureform/client.py 80.64% 8 Missing and 4 partials ⚠️
metadata/metadata_server_mock.go 0.00% 12 Missing ⚠️
client/src/featureform/resources.py 81.25% 9 Missing ⚠️
helpers/arrays.go 73.91% 3 Missing and 3 partials ⚠️
client/src/featureform/register.py 69.23% 2 Missing and 2 partials ⚠️
metadata/etcd.go 88.23% 2 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                   @@
##             feature/trigger-base    #1364   +/-   ##
=======================================================
  Coverage                        ?   56.49%           
=======================================================
  Files                           ?      203           
  Lines                           ?    25960           
  Branches                        ?      908           
=======================================================
  Hits                            ?    14665           
  Misses                          ?     9663           
  Partials                        ?     1632           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@epps epps force-pushed the feature/implement-triggers branch from 7f747fb to b8902a6 Compare May 15, 2024 23:44
@epps epps had a problem deploying to Integration testing May 15, 2024 23:44 — with GitHub Actions Failure
@epps epps had a problem deploying to Integration testing May 17, 2024 18:45 — with GitHub Actions Failure
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.

None yet

5 participants