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

Enable nullable references... and other stuff. #691

Merged
merged 30 commits into from
Jul 31, 2023

Conversation

bitbound
Copy link
Contributor

@bitbound bitbound commented Jul 27, 2023

Unfortunately, this is the ultimate "while you're in there" PR.

  • Enabled nullable references on all projects and refactored to eliminate warnings.
  • Extracted logic from FileLogger to IFileLogsManager.
  • Made IFileLogsManager read all log files and return them as IAsyncEnumerable, so it's not loading everything into memory.
  • Reversed implementation of basic authorization.
    • Re-implemented API keys using X-Api-Key header.
  • Refactored ApiAuthorizationFilter and ExpiringTokenFilter.
  • Made debugging use constant Org ID and device ID.
  • Replaced concurrent download throttler with aspnetcore's new built-in rate limiting middleware.
  • Moved entities to new namespace/folder.

Please read the following. Do not delete below this line.

Thank you for your contribution to the Remotely project. It is required that contributors assign copyright to Immense Networks so we retain full ownership of the project.

This makes it easier for other entities to use the software because they only have to deal with one copyright holder. It also gives me assurance that we'll be able to make decisions in the future without gathering and consulting all contributors.

While this may seem odd, many open source maintainers practice this. Here are a couple well-known examples:

A nice article on the topic can be found here: https://haacked.com/archive/2006/01/26/WhoOwnstheCopyrightforAnOpenSourceProject.aspx/

By submitting this PR, you agree to the following:

You hereby assign copyright in this PR's code to the Remotely project and its copyright holder, Immense Networks, to be licensed under the same terms as the rest of the code. You agree to relinquish any and all copyright interest in the software, to the detriment of your heirs and successors.

@bitbound bitbound self-assigned this Jul 27, 2023
@bitbound bitbound requested a review from cmbankester July 31, 2023 14:00
}
}

public async IAsyncEnumerable<byte[]> ReadAllBytes()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This now reads all files instead of only today's. Returns IAsyncEnumerable so it doesn't have to load all files into memory at once.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also add a cancellation token parameter here, with the EnumeratorCancellation attribute?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. I added it for all the methods in this class.

cmbankester
cmbankester previously approved these changes Jul 31, 2023
}
}

public async IAsyncEnumerable<byte[]> ReadAllBytes()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also add a cancellation token parameter here, with the EnumeratorCancellation attribute?

@bitbound bitbound requested a review from cmbankester July 31, 2023 18:17
@bitbound bitbound marked this pull request as ready for review July 31, 2023 18:19
@bitbound bitbound merged commit 57b8676 into master Jul 31, 2023
@bitbound bitbound deleted the tech/nullable-references branch July 31, 2023 18:21
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