- Updates to use latest Azure Monitor integration
- Adds initial Aspire apphost
- Updates web app to target .NET 8
- Removes integration with WWTMVC5
- Updated azure related libraries to latest versions
I don't feel like I really know what I'm doing here, but things seem to
be working. This does not affect the WWTMVC5 app, which has to stay on
the Windows .NET 4.8 platform.
We need to make sure that the projects use `<TargetFramework>`, not
`<TargetFrameworks>`, to prevent complaints about explicitly specifying
the framework to use.
This change updates the tests to correctly build on non-Windows machines
by not building the .NET 4.8 target. This also updates the pipeline to
be multi-stage so that the .NET 5 app can be built on linux while the
MVC5 app continues to be built on Windows.
Now that we're moving towards support .NET 5, this will update all usage of the 3.1 wave to 5. The .NET 5 app would already be using the new libraries, so now the WWTMVC5 app will as well.
This also updates the Redis library which should help with the exceptions we've been seeing under load.
Fixes#221
This also renames the FilePathOptions type to WwtOptions as this is more of a general options type and not just for files.
This change also allows us to retarget .NET Standard in the providers
assembly. It can now be referenced in a .NET Core app
This updates the code a bit to be more aware of AppInsights:
- It registers two modules for AppInsights so that the current request gets an activity that is used for tracing
- This also ties the tracing into the ILogger<> framework so that log messages are all correlated together.
- Adds a decorator the IDistributedCache to enable tracing in AppInsights
For details on how AppInsights handles correlation, see https://docs.microsoft.com/en-us/azure/azure-monitor/app/correlation
Redis connections are being exhausted under load with the current sync infrastructure. By going to full async, I am seeing no timeouts on my localhost.
This changes does the following to handle case sensitivty:
- Ensure that the ids for tours are lower case
Tour ids are GUIDs and are already lower cased in storage. This change
ensures that the id passed in lower cased so it will match the storage
entry.
- Add IKnownPlateFiles to limit files exposed by tiles[2].aspx
A file has been placed in `coredata/known_plate_files.txt` that is used
for the known plate files. It is a simple list where each line is a
plate file name. On the current VM, there are 224 files that are exposed
by these endpoints. This class helps ensure only those are exposed, as
well as normalize their casing to what is in the blob.
- Lower cases the thumbnail name and class.
Thumbnails appear to be addressed by inconsistent casing. All thumbnails
will be lowercased in storage. This change lowercases the name that is
searched so it will match once the data is updated.
The system currently is completely synchronous. However, this ends up with thread blocking while waiting for calls to Azure and other network resources. This change enables asynchronous connections by updating the infrastructure to use Tasks. Subsequent changes will update the access to Azure via async methods as well.
This adds initial infrastructure to handle logging for requests. As part of this, Redis-related exceptions are handled by just going to Azure directly but logging to raise visibility of error.
This change adds an in-memory and redis cache layer. This is configurable via web.config to turn caching on or off. If a redis connection string is available, it will cache there; otherwise, it will use an in-memory implementation.
This was fairly straightforward, but TwoMassToasProvider had a branch
that was not accessible. In CoreDataMap.docx, there is a comment that
this plate file is almost surely a mistake. Since there was no way to
reach it with the parameters, this change removes it.
MarsHirise and MarsMoc are still using an old access pattern for some Azure data. This data doesn't fit in with the pattern we have set up so will be addressed in a later change.
This will simplify the copy/paste to cover tests. Various methods can be overriden, but the basic tests will be applied for all providers that inherit from this.
* Added a base container to the plate folder structure in storage so all decompressed blobs start at a single container depth and add plate names as folders (and a second folder depth optionally, for plate2 content
* Adding in changes for an app-level base container
* Testing build pipeline
* Resolved failing tests
* Added DSS config to the unit test harness
A while back, we swapped out a struct implementaiton of WwtContext with
an interface. At that time, Http*Base types were used as abstractions
over the request/response objects. These are possible to mock, but not
as easy as interfaces. This change swaps these out for pure interfaces
so that mocking is much easier and as a plus removes some dependency on
System.Web.
An implementation of this for Page is still used for the aspx pages.
However, that implementation implements all the interfaces (explicity,
ie privately) so that only a single object must be constructed to pass
the context around.
As part of this change, the directory information that was historically retrieved directly from ConfigurationManager is being moved to an options object so that it can be tested, as well as consolidate access points for it.
This required a bit of refactoring of the WwtContext so that it could be testable. Instead of being a struct, it is now an interface that can accept any implementation. This is now mockable from within the testing framework. This also abstracts out the configuration into an options type that defaults to ConfigurationManager, but allows for cusomizations if needed.