-
Notifications
You must be signed in to change notification settings - Fork 22
Support multiple PHP versions, improve display #109
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
Conversation
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.
Thanks for working on this! I am very interested in seeing this over the finish line. I have some questions and suggestions from an initial review. Working to get a test environment set up with data so I can test further.
@@ -168,6 +208,78 @@ public static function add_results_callback( $data ) { | |||
return $response; | |||
} | |||
|
|||
private static function get_new_failures( $post_id ) { | |||
$p = get_post( $post_id ); |
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.
This is a really neat idea!
I think there are some potential issues here though. I don't think we can query for the intended post with the details here. If an old report is visited in the future, I believe that this would compare that one to the most recent report.
I think a better way to ensure this works correctly is to look up the previous commit's parent using a get_post_by( 'slug', 'r' . $commit_number - 1 );
call. Then we can specify parent_in
instead of parent_not_in
with the other differentiating meta to ensure the right results are compared.
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.
If an old report is visited in the future, I believe that this would compare that one to the most recent report.
You mean when sending results for an older commit, while a new one already exists? Mhm yeah might need some testing here.
think a better way to ensure this works correctly is to look up the previous commit's parent using a
get_post_by( 'slug', 'r' . $commit_number - 1 );
call
It's not guaranteed that an entry exists for the previous commit.
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've been testing this locally today and this is working really nicely! Going to comment more as I go.
I keep getting hung up on the environments concept. I am thinking that we need to remove that for this round and give it some more thought. For example, environment name. At first added a taxonomy for Environment Type because some suggested values for multi-environment was "vps", "cloud", etc.. That feels more appropriate as a taxonomy. But I think that environment name could also make sense for something that's more like the name of a hosting package, maybe Basic, choice plus, Online Store/e-commerce. This would vary reporter to reporter, but could allow them to create their own groups. But what is an environment? Does a different PHP version indicate a different "environment" if everything else is the same? Is it only if the host considers it a different environment? I've opened swissspidy#2 that removes the display of environment counts for now, and also has some improvements to how the report outcomes are counted. |
Yes, I think that's what hosts will use it for. So there can be lots of different values.
I'd say so. Hosts all have so many different setups and offerings, they know best what to call them and how to differentiate that. We could also call it "label" or "product", but "environment" is probably fine as is. |
This reverts commit feaf78a.
Add a taxonomy for report result to simplify counting and querying.
You can't order results by taxonomy term names.
I think this is in a really great spot. Talking with @swissspidy at WCUS Contributor Day, and we decided to remove author archives for test results for this iteration. I also added a database version taxonomy in addition to the PHP version one. In combination with environment name, this helps ensure reports are not overwritten unintentionally. |
@desrosj Let's 🚢 it |
oh nice, thank you for the work! |
To-do:
That's probably best done in the make/hosting theme template