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
chore: Remove endpoint date_updated #3711
Conversation
def _date_updated(self, data): | ||
return data["date_updated"] |
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 searched the codebase for \._date_updated
and it was only being used in this module, below.
@@ -202,7 +201,7 @@ def _get_by_id(cls, conn, conf, workspace, id): | |||
|
|||
def _get_info_list_by_id(self): |
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 searched the codebase for \._get_info_list_by_id
and it's only being used in _cli/deployment/list.py
.
table_data = [["PATH", "ID", "DATE UPDATED"]] + list( | ||
table_data = [["PATH", "ID", "DATE CREATED"]] + list( |
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.
Now:
% verta deployment list endpoint
got VERTA_HOST from environment
got VERTA_EMAIL from environment
got VERTA_DEV_KEY from environment
connection successfully established
PATH ID DATE CREATED
/simple-deploy 1 2023-03-29T20:52:42.000Z
assert "path: {}".format(endpoint.path) in result.output | ||
assert "id: {}".format(endpoint.id) in result.output | ||
assert "curl: <endpoint not deployed>" in result.output | ||
|
||
assert "status" in result.output | ||
assert "date created" in result.output | ||
assert "date updated" in result.output | ||
assert "stage's date created" in result.output | ||
assert "stage's date updated" in result.output | ||
assert "components" in result.output | ||
|
||
updated_status = endpoint.update(experiment_run, DirectUpdateStrategy(), True) | ||
|
||
def in_output(s: str) -> bool: | ||
return any(line.startswith(s) for line in result.output.splitlines()) | ||
|
||
assert in_output(f"path: {endpoint.path}") | ||
assert in_output(f"id: {endpoint.id}") | ||
assert in_output("curl: <endpoint not deployed>") | ||
assert in_output("status") | ||
assert in_output("date created") | ||
assert in_output("stage's date created") | ||
assert in_output("stage's date updated") | ||
assert in_output("components") |
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.
In this test (and the other test), I'm just
- defining a closure to check the output using
str.startswith()
instead ofin
- using f-strings
- removing
"date updated"
Impact and Context
It currently provides no user-facing value [Slack].
Risks and Area of Effect
Low; I'm skeptical anyone was even paying it any mind through the client.
Testing
Oops not a unit test, but
Reverting