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

[AERIE-2141] Add during expression by updating ForEach and Spans #402

Merged
merged 2 commits into from
Nov 2, 2022

Conversation

adrienmaillard
Copy link
Contributor

@adrienmaillard adrienmaillard commented Oct 24, 2022

  • Tickets addressed: AERIE-2142
  • Review: By commit
  • Merge strategy: Merge (no squash)

Description

I have followed what was proposed by @JoelCourtney

  • A Spans.ForEachActivity function/AST node has been added in the eDSL that allows the lambda to return a Spans object
  • Spans now have an optional activity metadata associated with each interval
  • The window(), start() and end() methods in ActivityInstance in eDSL have been updated to return Spans with activity id metadata
  • ViolationsOf is now ViolationsOfWindows.

Finally, the Windows.During(ActivityTypes[]): Windows was added to the constraints eDSL.

Verification

Many tests were updated.

Documentation

  • Update the scheduling documentation when this is accepted.

Future work

The mutex global scheduling condition (AERIE-2142) in #410.

@adrienmaillard adrienmaillard requested a review from a team as a code owner October 24, 2022 19:16
@adrienmaillard adrienmaillard temporarily deployed to e2e-test October 24, 2022 19:16 Inactive
@adrienmaillard adrienmaillard changed the title [AERIE-2141] Add during expression by [AERIE-2141] Add during expression by updating ForEach and Spans Oct 24, 2022
@JoelCourtney JoelCourtney self-requested a review October 24, 2022 19:27
Copy link
Contributor

@JoelCourtney JoelCourtney left a comment

Choose a reason for hiding this comment

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

thanks! I have one major concern that I should have seen coming. I think we need to reverse how spans translate to violations. Otherwise we lose the activity metadata in the invert() call associated with specific spans. I saw in your implementation that you keep the IDs around and then associate all the violations with all of the IDs, which is better than nothing, but definitely a regression from Constraint.ForEachActivity. I messaged you on Slack because its probably easier to discuss this over huddle

@adrienmaillard adrienmaillard force-pushed the feature/AERIE-2142-during-type-constraint branch from b15a309 to 7939fae Compare October 27, 2022 00:16
@adrienmaillard adrienmaillard temporarily deployed to e2e-test October 27, 2022 00:16 Inactive
@adrienmaillard adrienmaillard force-pushed the feature/AERIE-2142-during-type-constraint branch from 7939fae to 70e99b6 Compare October 27, 2022 17:46
@adrienmaillard adrienmaillard temporarily deployed to e2e-test October 27, 2022 17:47 Inactive
Copy link
Collaborator

@mattdailis mattdailis left a comment

Choose a reason for hiding this comment

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

Dropping a round of comments that are ready - I still have a few files to review

@mattdailis mattdailis added the breaking change A change that will require updating downstream code label Oct 28, 2022
@adrienmaillard adrienmaillard force-pushed the feature/AERIE-2142-during-type-constraint branch 2 times, most recently from bc5316f to 798fce4 Compare October 28, 2022 22:42
@adrienmaillard adrienmaillard temporarily deployed to e2e-test October 28, 2022 22:42 Inactive
@camargo camargo added the feature A new feature or feature request label Nov 2, 2022
@adrienmaillard adrienmaillard force-pushed the feature/AERIE-2142-during-type-constraint branch from 798fce4 to 83f7ced Compare November 2, 2022 18:59
@adrienmaillard adrienmaillard temporarily deployed to e2e-test November 2, 2022 18:59 Inactive
Copy link
Contributor

@JoelCourtney JoelCourtney left a comment

Choose a reason for hiding this comment

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

Awesome! Sorry we changed the scope halfway through.

Copy link
Collaborator

@mattdailis mattdailis left a comment

Choose a reason for hiding this comment

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

Great work - I have one request (can be before or after merging): could you update the PR description to reflect the decisions made, separating the changes that are being merged from the ones that are now "future work"?

I forget why I added the breaking change label - if you don't think there are any breaking changes, we can remove that label.

@adrienmaillard adrienmaillard force-pushed the feature/AERIE-2142-during-type-constraint branch from 83f7ced to 5d2ab8e Compare November 2, 2022 20:44
@adrienmaillard adrienmaillard temporarily deployed to e2e-test November 2, 2022 20:44 Inactive
@adrienmaillard adrienmaillard removed the breaking change A change that will require updating downstream code label Nov 2, 2022
@adrienmaillard adrienmaillard merged commit af8464c into develop Nov 2, 2022
@adrienmaillard adrienmaillard deleted the feature/AERIE-2142-during-type-constraint branch November 2, 2022 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature or feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants