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

Reporting environment issues #213

Merged
merged 12 commits into from
Sep 18, 2024
Merged

Reporting environment issues #213

merged 12 commits into from
Sep 18, 2024

Conversation

omar-selo
Copy link
Collaborator

Description

Adds ability to report environment issues.

Resolved issues

Resolves https://warthogs.atlassian.net/browse/RTW-353

Documentation

Web service API changes

Adds new endpoint /v1/environments/reported-issues with GET, POST, PUT, and DELETE.

Tests

Added automated tests to the backend.

Manually tested the front-end. See video below:
Screencast from 2024-09-17 14-05-03.webm

@andrejvelichkovski
Copy link
Contributor

Just went briefly through the changes, and I noticed we don't have a ForeignKey relation between Environments and EnvironmentIssues. It seems that this is because we don't want to limit the report issue on one architecture, as Environments have a link to a particular architecture.

I just wanted to confirm whether this is indeed the case or there is a different reason why we are going to a manual matching.

@omar-selo
Copy link
Collaborator Author

omar-selo commented Sep 17, 2024

we don't want to limit the report issue on one architecture

I thought about this and decided it would probably make more sense for environment issues to be across architectures. So you are right. For instance, a broken machine is broken regardless of the architecture.

Copy link
Contributor

@andrejvelichkovski andrejvelichkovski left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for this work, just left a few small style comments

backend/scripts/seed_data.py Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we maybe make the TestCaseIsueePreloader a generic ReportedIssuesPreloader that will watch for both providers, it seems like we are repeating most of the code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Inspired by this comment, I refactored most loading of providers into two widgets: NonBlockingProviderPreloader and BlockingProviderRreloader.

Copy link
Contributor

Choose a reason for hiding this comment

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

How can you not love a code clean-up 😄

Copy link
Contributor

@andrejvelichkovski andrejvelichkovski left a comment

Choose a reason for hiding this comment

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

Thanks for the quick follow-up, excited to see this in use!

Copy link
Contributor

@andrejvelichkovski andrejvelichkovski left a comment

Choose a reason for hiding this comment

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

Looks good, but I think we might be breaking the event log expandable

Comment on lines 22 to 26
return Expandable(
title: const Text('Event Log'),
initiallyExpanded: initiallyExpanded,
children: <Widget>[
testEvents.when(
Copy link
Contributor

Choose a reason for hiding this comment

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

Aren't we deleting the Expandable here, I don't see it anywhere in the new code

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great catch

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tried manually testing everything now, so hopefully I didn't miss anything else

Copy link
Contributor

@andrejvelichkovski andrejvelichkovski left a comment

Choose a reason for hiding this comment

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

I think now we are in a good state to deploy this functionality

@omar-selo omar-selo merged commit d877415 into main Sep 18, 2024
3 of 4 checks passed
@omar-selo omar-selo deleted the reporting-environment-issues branch September 18, 2024 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants