-
Notifications
You must be signed in to change notification settings - Fork 14
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
Initial work for v1 #268
Initial work for v1 #268
Conversation
Tests currently fail because
I do not know if I will be able to finish the cli updates for a new config format nor fix the tests. One potential blocker is not having a new deployment to test against, which means if I do work on this I don't know if I'll derive the correct config file format. But I'll see if I can get that in. |
I want to question if we should also remove support for non-array |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #268 +/- ##
==========================================
- Coverage 82.95% 77.30% -5.65%
==========================================
Files 57 26 -31
Lines 3033 1855 -1178
==========================================
- Hits 2516 1434 -1082
+ Misses 517 421 -96 ☔ View full report in Codecov by Sentry. |
Tests are fixed. I am explicitly ignoring failures on the management tests right now. |
@jkeifer says:
Not privy to the motivations in swoop, but that is a pattern which I have seen some developers confused by, returning a list that is usually empty or 1 member. I was implored to change it to a |
Maybe lambda_handlers should be named lambda_functions? |
wrt to deps, I think it's reasonable to have exact pinned deps, since this is the key dependency for the projects that use it |
why "requirements files alone ain't going to cut it"? |
@ircwaves I'm confused by your response and the mention of items/results. I am speaking about the process payload format, which supports an array of process definitions for workflow chaining. That is, the payload format is, roughly,
What I'm proposing here is that we make |
Unless you know something I don't, to enable this to package to be pip-installable with the dependency pinning described in |
Oh, I see what you're saying now. |
src/cirrus/lambda_handlers/api.py
Outdated
if not result: | ||
continue | ||
if not combined_results: | ||
combined_results = result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this break? If not, I think it would be better if there was a check above to see if combined_results is set and rs is non-empty and then pop the last one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, I did what I thought would preserve the existing behavior as best as I could reason about while also supporting the case where we have None
s passed in to satisfy type checking. Maybe the whole thing deserves a bit more consideration. It might be better to throw an exception rather than returning None
so we can avoid this case altogether.
Ah, I see, I was thinking of the |
See cirrus-geo/cirrus-mgmt#10 for the PR against cirrus-mgmt that this came from.
* Don't strip cirrus.lib.errors from exception type anymore * Remove InvalidInput -- only way people should get it is from old lib * More tests for Invalid
I rebased the changes on top of main to resolve the merge conflicts. I also renamed the |
Pyproject.toml supports loading metadata values from files. We can leverage this to use pip-compile with .in files to generate requirements files that also populate the package metadata. This gives us a way pin all our dependencies (direct and transitive) strictly even when installing from a remote package with no direct access to the requirements files.
I talked with @gadomski and he pointed me to a solution for the dependency concern I raised. In short, we can use dynamic metadata to load dependency lists from requirements files. This means we specify the direct dependencies in I also took a super quick pass through the README and remove all obviously out-of-date content. It will need further revisions but at least isn't completely erroneous. |
Reverts the changes to the API functions to handle null responses from eventdb queries (which were added to appease type checking), with some further simplifications. The _query method on EventDB will now raise an exception if called when events are disabled. This is explicitly handled in the API and ignored.
@philvarner I made the changes we discussed to the API/EventDB stuff. See the most recent commit for the specific changes. |
This PR is all a starting point and we'll need to do more, but it includes:
cirrus.cli
code combed over for what is relevant to the cirrus management cli and moved there, the rest removedcirrus.core
code removedcirrus.test
module removedcirrus.lib2
becomescirrus.lib
cirrus.builtins
becomescirrus.lambda_handlers
and flattenedpyproject.toml
andpip-compile
for depscirrus-mgmt
cli code and install ascirrus
console scriptcirrus-docs
removed in favor of plain sphinx build and docs sources moved intodocs/
output_options
supportFAILED
andINVALID
SNS topicsInvalidInput
exception in thiscirrus.lib
legacy
API supportBatchHandler
and the subclasses that were created,SNSPublisher
andSQSPublisher
. I took this opportunity to address those concerns.