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

Add stored graph projections (SYN-4356) #2914

Merged
merged 46 commits into from
Jan 17, 2023
Merged

Add stored graph projections (SYN-4356) #2914

merged 46 commits into from
Jan 17, 2023

Conversation

Cisphyx
Copy link
Contributor

@Cisphyx Cisphyx commented Nov 11, 2022

No description provided.

@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

Base: 97.20% // Head: 97.10% // Decreases project coverage by -0.09% ⚠️

Coverage data is based on head (e39bdaf) compared to base (60fa513).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2914      +/-   ##
==========================================
- Coverage   97.20%   97.10%   -0.10%     
==========================================
  Files         217      218       +1     
  Lines       43007    43176     +169     
==========================================
+ Hits        41805    41928     +123     
- Misses       1202     1248      +46     
Flag Coverage Δ
linux 97.10% <100.00%> (+<0.01%) ⬆️
linux_replay ?

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

Impacted Files Coverage Δ
synapse/lib/ast.py 98.78% <ø> (-0.01%) ⬇️
synapse/cortex.py 96.68% <100.00%> (-0.45%) ⬇️
synapse/lib/storm.py 95.46% <100.00%> (+0.03%) ⬆️
synapse/lib/stormlib/graph.py 100.00% <100.00%> (ø)
synapse/tools/genpkg.py 100.00% <100.00%> (ø)
synapse/tests/utils.py 94.46% <0.00%> (-1.89%) ⬇️
synapse/lib/hiveauth.py 96.01% <0.00%> (-0.48%) ⬇️
synapse/lib/oauth.py 98.68% <0.00%> (-0.44%) ⬇️
synapse/lib/trigger.py 95.01% <0.00%> (-0.39%) ⬇️
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@vEpiphyte vEpiphyte added this to the v2.11x.x milestone Nov 14, 2022
@@ -198,6 +198,11 @@ def loadPkgProto(path, opticdir=None, no_docs=False, readonly=False):
with s_common.genfile(cmd_path) as fd:
cmd['storm'] = fd.read().decode()

for gdef in pkgdef.get('graphs', ()):
gdef['iden'] = s_common.guid((pkgname, gdef.get('name')))
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you consider having this be hard-coded like the meta source iden so that a power-up could easily get() the graph it loaded?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I was trying to avoid allowing specifying an arbitrary iden to prevent collision issues. Generating the guid from the package+graph name seemed like a decent compromise since it would still be predictable and you could just calculate it in a module or drop it in a modconf.

Copy link
Contributor

Choose a reason for hiding this comment

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

we could also do something like a 'byname' api.

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we persist these package graph idens anywhere other than the runtime Cortex.pkggraphs value?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, are there other places that they should be stored as well?

synapse/cortex.py Outdated Show resolved Hide resolved
synapse/cortex.py Outdated Show resolved Hide resolved
@vEpiphyte vEpiphyte added this to the v2.11x.x milestone Dec 13, 2022
@vEpiphyte vEpiphyte modified the milestones: v2.117.0, v2.11x.x Jan 5, 2023
@vEpiphyte vEpiphyte removed this from the v2.119.0 milestone Jan 9, 2023
@Cisphyx Cisphyx merged commit 0cea9f7 into master Jan 17, 2023
@Cisphyx Cisphyx deleted the graph-storage branch January 17, 2023 15:38
@vEpiphyte vEpiphyte added this to the v2.12x.x milestone Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants