Fix runtime AttributeError and complete Apache 2.0 LICENSE#1
Open
ericoulster wants to merge 2 commits intoatoolz:mainfrom
Open
Fix runtime AttributeError and complete Apache 2.0 LICENSE#1ericoulster wants to merge 2 commits intoatoolz:mainfrom
ericoulster wants to merge 2 commits intoatoolz:mainfrom
Conversation
get_execution_status and list_recent_runs raise AttributeError on first
call: the Run class is at flyte.remote.Run, not flyte.Run, and the
listing method is listall, not list. Verified against flyte 2.2.2.
The broad `except Exception` hides this. The visible symptom is just
{"error": "status failed: module 'flyte' has no attribute 'Run'"},
which is easy to mistake for a config issue.
Also use phase.name instead of str(phase) so the status string is
'SUCCEEDED' rather than 'ActionPhase.SUCCEEDED'.
The previous LICENSE was the 17-line header Apache recommends for the top of source files, not the full 202-line license body. GitHub's SPDX detector flags the repo as NOASSERTION for that reason, despite pyproject.toml declaring Apache-2.0. Replaced with the canonical text from apache.org. If you want to keep the explicit "Copyright 2026 Andre Ahlert" assertion that was in the old file, the conventional place for it is a NOTICE file (not added here).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes, one per commit so either can be reverted on its own.
runtime.py:
get_execution_statusandlist_recent_runsboth fail withAttributeError: module 'flyte' has no attribute 'Run'on the first call. TheRunclass isn't exported from the top-levelflytepackage — it's atflyte.remote.Run. And the listing method islistall, notlist. Both reproducible againstflyte2.2.2:The broad
except Exceptionin both functions hides this. The visible symptom is just{"error": "status failed: module 'flyte' has no attribute 'Run'"}, which is easy to read as a config problem.While I was in there I also tweaked the phase output:
str(run.phase)returns'ActionPhase.SUCCEEDED'becausephaseis an enum, so the status string ends up looking weird in the model's tool output. Using.namegives'SUCCEEDED'.LICENSE: the file currently shipped is the 17-line header notice that Apache 2.0 specifies for the top of source files, not the full 202-line license body. GitHub's license detector flags the repo as
NOASSERTIONfor that reason, even thoughpyproject.tomldeclareslicense = "Apache-2.0". I swapped in the canonical text from apache.org.The explicit "Copyright 2026 Andre Ahlert" line that was in the old file isn't in the new one — Apache's convention is to keep that in a separate
NOTICEfile, which I haven't added since you might want to phrase it differently.