Граф коммитов

49 Коммитов

Автор SHA1 Сообщение Дата
Taylor Southwick dcf062de68 Revert "Technical debt updates (#313)"
This reverts commit b6a37bdc8e.
2024-09-26 09:28:49 -07:00
Taylor Southwick b6a37bdc8e
Technical debt updates (#313)
- 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
2024-09-25 15:52:30 -07:00
Peter Williams c0aecda55d Update to .NET 6
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.
2022-09-16 10:38:45 -04:00
Peter Williams c38ae05349 Normalize namespaces to match assembly names 2020-12-11 23:14:33 -05:00
Peter Williams fe49afbc2a WWT.Providers: deprecate unused/broken APIs
Closes #204.
2020-12-10 12:48:20 -05:00
Peter Williams a73baa409d Fix command-line `dotnet publish` on Linux
We need to make sure that the projects use `<TargetFramework>`, not
`<TargetFrameworks>`, to prevent complaints about explicitly specifying
the framework to use.
2020-12-02 21:33:09 -05:00
Taylor Southwick 733b1df459 Don't use Directory.Build.* 2020-12-02 09:58:16 -08:00
Taylor Southwick 7a382d689b Try different path 2020-12-02 09:48:37 -08:00
Taylor Southwick fb2f14d316 Add build on Linux to pipeline
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.
2020-12-02 09:13:07 -08:00
Taylor Southwick b535d9986d
Update to .NET 5 wave of libraries (#220)
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
2020-11-23 20:37:49 -08:00
Chris Roberts 5ade2e1d78 Corrected case mis-match between string literals and the name of plate files in blob storage 2020-11-19 21:05:52 -08:00
Taylor Southwick 6036210e55
Fix casing for plate files in moontoast* (#203) 2020-11-17 11:00:25 -08:00
Taylor Southwick 1749b58da7
Change IResponse.Write to be async (#197) 2020-11-09 14:49:18 -08:00
Taylor Southwick b744366c54
Remove final ConfigurationManager usage (#192)
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
2020-11-05 15:00:55 -08:00
Taylor Southwick 3762688890
Add modules for requests for AppInsights (#188)
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
2020-11-05 08:42:02 -08:00
Taylor Southwick c5b3479477
Fix some casing issues for plate files (#180) 2020-11-03 11:13:21 -08:00
Taylor Southwick 9799914acd
Update IPlateTilePyramid to be fully async (#176)
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.
2020-11-03 07:12:11 -08:00
Taylor Southwick a996cbcace
Make providers title case to fit .NET casing standard (#169) 2020-10-30 15:07:21 -07:00
Taylor Southwick ce78c89b6b
Handle case sensitivty (#162)
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.
2020-10-29 19:14:30 -07:00
Taylor Southwick 30e55f448d
Add ITourAccessor to access coretours (#159) 2020-10-29 07:07:32 -07:00
Taylor Southwick 9e20f14bf3
Enable async RequestProviders (#158)
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.
2020-10-28 11:23:34 -07:00
Taylor Southwick ad6694fb09
Using caching library instead of manual caches (#157) 2020-10-28 10:43:37 -07:00
Taylor Southwick 1eb8ece63d
Add exception and logging to Redis cache layer (#154)
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.
2020-10-26 13:31:57 -07:00
Taylor Southwick 7aa674ff1f Update moontoast* plate files to reflect changes to blob storage
A prefix was added to these (documented in the CoreDataMap.docx) and this updates the providers to be aware of that.
2020-10-23 09:19:28 -07:00
Taylor Southwick c397c225cd
Use seekable streams for plate1 storage (#146) 2020-10-19 16:58:06 -07:00
Taylor Southwick beb324f457
Add caching to IPlateTilePyramid (#145)
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.
2020-10-19 14:52:46 -07:00
Taylor Southwick 7479f1da8e
Add tests for stream slicing (#143) 2020-10-16 16:47:10 -07:00
Taylor Southwick c7a2ae5001
Use a const for the default container name (#139) 2020-10-14 13:36:57 -07:00
Taylor Southwick 72560f9a96
Use IPlateTilePyramid in providers starting with t (#137)
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.
2020-10-14 13:26:10 -07:00
Taylor Southwick cfe750f817
Use IPlateTilePyramid in providers starting with v and w (#138) 2020-10-14 13:25:07 -07:00
Taylor Southwick 6706c43626
Update providers P-R to use IPlateTilePyramid (#134)
* Combine PostMarsProviders that have same code

* Update providers P-R with IPlateTilePyramid
2020-10-13 11:44:55 -07:00
Peter Williams aeb5119458 Merge `master` into `mars` to fix conflicts
Conflicts were re: documenting the always-404 codepaths.
2020-10-13 08:33:29 -04:00
Taylor Southwick a004f1985a
Use IPlateTilePyramid in moon* providers (#132) 2020-10-12 18:11:50 -07:00
Taylor Southwick 3dd5eaea75 Use IPlateTilePyramid in Mars related endpoints
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.
2020-10-12 16:37:19 -07:00
Taylor Southwick 9e0097a1d9
Use abstraction in Jupiter endpoint (#129) 2020-10-12 16:13:44 -07:00
Taylor Southwick 5e74703b65
Use IPlateTIlePyramid in Hirise (#126) 2020-10-12 15:39:41 -07:00
Taylor Southwick fa54c15fa3
Convert GlimpseProvider and hAlphaToastProvider (#125) 2020-10-12 13:43:11 -07:00
Taylor Southwick 13fe0543a7
Add a test harness for providers to build on top of (#124)
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.
2020-10-12 12:16:01 -07:00
Chris Roberts 1b6f0b3526
Updated unit tests to handle one off DSS patterns (#123)
* 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
2020-10-09 10:27:44 -07:00
Taylor Southwick afed97da7d
Replace abstractions with interfaces (#119)
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.
2020-10-08 11:23:33 -07:00
Taylor Southwick 0fb2589e8d Implement IPlateTilePyramid abstract into Galex* providers 2020-10-07 11:38:18 -07:00
Taylor Southwick 5e59482000
Update for AutoSubstitute 6.1.0 (#117)
This allows us to remove some hacks we were doing before with new APIs added in the latest version.
2020-10-07 09:48:15 -07:00
Taylor Southwick 6ce965296d
Incorporate IPlateTilePyramid into providers A-D (#113) 2020-10-07 08:53:22 -07:00
Taylor Southwick 8f3c033486
Add IPlateTilePyramid for DSSToastProvider (#112)
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.
2020-10-06 09:50:31 -07:00
Taylor Southwick 9486b7b488
Check if a file exists before writing to minimize data transfer (#100)
* Add check if file already exists.

* Include log level
2020-09-29 14:54:58 -07:00
Taylor Southwick 9ab072b3b6
Add tests for DSS provider (#98)
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.
2020-09-29 11:11:23 -07:00
Taylor Southwick 739b55aa6f
Ensure tests are run on CI (#96) 2020-09-28 16:09:37 -07:00
Taylor Southwick 6ca23c4acb Use AutofacContrib.NSubstitute 2020-09-24 12:47:20 -07:00
Taylor Southwick 0338856087 Initial unit tests 2020-09-24 12:43:54 -07:00