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

test(i): Extend mutation tests with col.Update and Create #1838

Merged

Conversation

AndrewSisley
Copy link
Contributor

@AndrewSisley AndrewSisley commented Aug 30, 2023

Relevant issue(s)

Resolves #1832

Description

Extends mutation tests with collection.Update and Create calls for the corresponding actions. Adds another github workflow to run the tests.

I didn't really plan on adding this so soon, but I really want it for #935, which I want for #1331 - as well as just being nice to test these :)

Is based off #1837 - please don't review the first commit here.

@AndrewSisley AndrewSisley added area/collections Related to the collections system area/testing Related to any test or testing suite code quality Related to improving code quality action/no-benchmark Skips the action that runs the benchmark. labels Aug 30, 2023
@AndrewSisley AndrewSisley added this to the DefraDB v0.7 milestone Aug 30, 2023
@AndrewSisley AndrewSisley requested a review from a team August 30, 2023 18:48
@AndrewSisley AndrewSisley self-assigned this Aug 30, 2023
@AndrewSisley AndrewSisley changed the title test(i): Extend mutation tests with collection.Update and Create test(i): Extend mutation tests with col.Update and Create Aug 30, 2023
@codecov
Copy link

codecov bot commented Aug 30, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.03% ⚠️

Comparison is base (8a8582b) 75.81% compared to head (e54477e) 75.78%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1838      +/-   ##
===========================================
- Coverage    75.81%   75.78%   -0.03%     
===========================================
  Files          209      209              
  Lines        22261    22261              
===========================================
- Hits         16875    16869       -6     
- Misses        4223     4227       +4     
- Partials      1163     1165       +2     
Flag Coverage Δ
all-tests 75.78% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8a8582b...e54477e. Read the comment docs.

AndrewSisley added a commit to AndrewSisley/defradb that referenced this pull request Aug 30, 2023
Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

Left some minor todos. Giving an LGTM assuming you will resolve all those.

I know you mentioned that you disagree with being on the same page and understanding the limitations/purposes of the current state, as we might not have the same understanding tomorrow (#1818 (comment)). While I understand and partially-agree with your point, I think we can do both, discuss the limitations or merely leave indexable thoughts at the point of change, and also decide when the time comes for the refactor or improvement.

So will leave these non-blocking thoughts here:

@@ -0,0 +1,61 @@
# Copyright 2022 Democratized Data Foundation
Copy link
Member

Choose a reason for hiding this comment

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

todo:

Suggested change
# Copyright 2022 Democratized Data Foundation
# Copyright 2023 Democratized Data Foundation

Copy link
Contributor Author

@AndrewSisley AndrewSisley Aug 31, 2023

Choose a reason for hiding this comment

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

  • Fix date in cw header

# by the Apache License, Version 2.0, included in the file
# licenses/APL.txt.

name: Run Collection.[Named] Mutations Tests Workflow
Copy link
Member

Choose a reason for hiding this comment

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

todo: I don't like the name to be technical, it should be descriptive in english.

Suggested change
name: Run Collection.[Named] Mutations Tests Workflow
name: Run Collection Named Mutations Tests Workflow

Copy link
Contributor Author

@AndrewSisley AndrewSisley Aug 31, 2023

Choose a reason for hiding this comment

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

I'll change it, but I have to ask why, given the presumed target audience.

  • Rename wf name


jobs:
test-gql-mutations:
name: Test Collection.[Named] Mutations job
Copy link
Member

Choose a reason for hiding this comment

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

todo: Same as above suggestion.

Suggested change
name: Test Collection.[Named] Mutations job
name: Test Collection Named Mutations job

Copy link
Contributor Author

@AndrewSisley AndrewSisley Aug 31, 2023

Choose a reason for hiding this comment

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

  • Rename wf job name

- develop

jobs:
test-gql-mutations:
Copy link
Member

Choose a reason for hiding this comment

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

todo: Job name should be also consistent.

Suggested change
test-gql-mutations:
test-collection-named-mutations:

Copy link
Contributor Author

@AndrewSisley AndrewSisley Aug 31, 2023

Choose a reason for hiding this comment

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

My bad, didn't spot this - thanks.

  • fix name

Comment on lines 56 to 61
## Uncomment to enable ability to SSH into the runner.
#- name: Setup upterm ssh session for debugging
# uses: lhotari/action-upterm@v1
# with:
# limit-access-to-actor: true
# limit-access-to-users: shahzadlone
Copy link
Member

Choose a reason for hiding this comment

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

todo: Removal, this is enough to have in one file, no need to have in everyfile.

Copy link
Contributor Author

@AndrewSisley AndrewSisley Aug 31, 2023

Choose a reason for hiding this comment

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

How do you find the file in which it is actually defined? But will remove.

  • Remove comment thing

Copy link
Member

Choose a reason for hiding this comment

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

just removing here should be fine, I think unless introduced also in last PR that added a new workflow it is only in one file (the you based your workflow from originally).

Makefile Show resolved Hide resolved
@AndrewSisley
Copy link
Contributor Author

While I understand and partially-agree with your point, I think we can do both, discuss the limitations or merely leave indexable thoughts at the point of change, and also decide when the time comes for the refactor or improvement.

Given that you seem happy enough to tolerate the current setup in the short term, and that we have already talked about this a little bit, I only wish to highlight the relative costs of some related actions:

  1. Approximate time to create the two new workflows: 15min each tops. Total 30min max.
  2. Approximate time to delete the two new workflows: 1min, plus PR overhead if done in its own PR. 30min max.
  3. Approximate time spent so far talking about the two new workflows, and their imagined future in an imagined (but likely) reality where we have more similar stuff to run: About 40min of my time in and around the two PRs, plus a few minutes (10-15+?) of your time in and around the PR, plus 5-10 minutes of about every attendee's time in the last standup (5 developers, the CTO, maybe the COO, and maybe Pavneet). 40+10+5*5=75min minimum.

I do not think further discussion on this topic is sensible, unless there is a problem with the immediate, real, state.

@shahzadlone
Copy link
Member

Given that you seem happy enough to tolerate the current setup in the short term, and that we have already talked about this a little bit, I only wish to highlight the relative costs of some related actions:

  1. Approximate time to create the two new workflows: 15min each tops. Total 30min max.
  2. Approximate time to delete the two new workflows: 1min, plus PR overhead if done in its own PR. 30min max.
  3. Approximate time spent so far talking about the two new workflows, and their imagined future in an imagined (but likely) reality where we have more similar stuff to run: About 40min of my time in and around the two PRs, plus a few minutes (10-15+?) of your time in and around the PR, plus 5-10 minutes of about every attendee's time in the last standup (5 developers, the CTO, maybe the COO, and maybe Pavneet). 40+10+5*5=75min minimum.

I do not think further discussion on this topic is sensible, unless there is a problem with the immediate, real, state.

I strongly disagree with micro-analyzing every small discussion(question) someone might want to do(ask) and multiplying everyone's time in a meeting when it was brought up by someone else who wanted a clarification on the discussion and grouping these as "unsensible discussions or time wasting discussions".

I would be very careful walking down this path of discouraging discussions / communications. It's important to keep in mind that as an author of a PR you have a lot of context and information that others don't, what might seem as silly or time wasting or unsensible questions to you might be questions to others that would help them get one step closer to understanding your vision.

I think this is one of the values we should have engrained into source engineers and ecosystem users to not feel ashamed or hesitant in asking questions. So, I will continue to ask these non-sensible questions.

@AndrewSisley AndrewSisley merged commit 6bd4ee5 into sourcenetwork:develop Aug 31, 2023
14 checks passed
@AndrewSisley AndrewSisley deleted the 1832-mut-tests-upcreate branch August 31, 2023 13:25
@AndrewSisley
Copy link
Contributor Author

I strongly disagree with micro-analyzing every small discussion(question) someone might want to do(ask) and multiplying everyone's time in a meeting when it was brought up by someone else who wanted a clarification on the discussion and grouping these as "unsensible discussions or time wasting discussions".

The reason for writing that was not to micro-analyize time, but to highlight that this thing (imagined future workflow stuff) does not matter.

The importance of different parts of our codebase varies significantly, and I consider it very sensible to not worry about large chunks of stuff. This is true at review time, and when authoring code. Attention is a finite resource, and attention given to unimportant elements is attention taken from those that need it.

Discussion is good, and healthy, but it needs to be done within the correct time and space. If a PR is dominated by a conversation about an unimportant aspect, then it increases the risk of very real issues being missed elsewhere within it.

PRs are a serious, time-sensitive space, and conversations should focus on stuff that really matters, within the context of that PR.

I stand by the recent times where I have tried to close out conversations within PRs because of this.

This does not mean however that the conversations cannot continue elsewhere, in a less-important space/time. Similar to how we don't tag every discord message with @core-dev, and use threads to keep the main channels clean. I think perhaps I can improve the way I close out PR conversations to highlight/offer that space/time.

shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
…ork#1838)

## Relevant issue(s)

Resolves sourcenetwork#1832

## Description

Extends mutation tests with collection.Update and Create calls for the
corresponding actions. Adds another github workflow to run the tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark. area/collections Related to the collections system area/testing Related to any test or testing suite code quality Related to improving code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend mutation tests with collection.Update and Create
2 participants