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

Filter S3 Metadata in COMS data #137

Merged
merged 2 commits into from
Oct 24, 2023
Merged

Filter S3 Metadata in COMS data #137

merged 2 commits into from
Oct 24, 2023

Conversation

TimCsaky
Copy link
Contributor

@TimCsaky TimCsaky commented Oct 18, 2023

Description

ticket: https://apps.nrs.gov.bc.ca/int/jira/browse/SHOWCASE-3379

NOTE: we still need to decide on the actual keys we want to exclude. Maybe there's an easy way to update that in future.

general approach:

  • remove metadata from the coms response in bcbox service later (object service.getMetadata())
  • excluded metadata doesnt get into bcbox store
  • if they edit metadata on an object (using bcbox edit metadata form) the new version will not have the excluded metadata
  • coms-id tag will always persist
  • removed some old code to filter coms-id during update

to test, add this to your local.json and clear browser session storage(existing config):

{
  "frontend": {
    "exclde": {
      "metadata": "geodrive.common.encoding,geodrive.windows.att,geodrive.windows.secdesc,s3b-last-modified",
      "tagset": "coms-id"
    },
    "oidc": {

Types of changes

New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING doc
  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

  • may want to consider hiding ugly meta rather than excluding in a future PR
  • i think we're duplicating code with searchMetadata() and getMetadata() in the object service.

@github-actions
Copy link

Coverage Report (Application)

Totals Coverage
Statements: 75% ( 51 / 68 )
Methods: 62.5% ( 5 / 8 )
Lines: 82.61% ( 38 / 46 )
Branches: 57.14% ( 8 / 14 )

@github-actions
Copy link

github-actions bot commented Oct 18, 2023

Coverage Report (Frontend)

Totals Coverage
Statements: 35.86% ( 616 / 1718 )
Methods: 34.99% ( 134 / 383 )
Lines: 42.94% ( 429 / 999 )
Branches: 15.77% ( 53 / 336 )

@TimCsaky TimCsaky force-pushed the meta-tag-filter branch 5 times, most recently from 5094405 to e884abc Compare October 19, 2023 00:10
@TimCsaky TimCsaky marked this pull request as ready for review October 19, 2023 00:11
@TimCsaky TimCsaky requested a review from jujaga as a code owner October 19, 2023 00:11
@TimCsaky TimCsaky requested review from jatindersingh93, wilwong89, kamorel and jujaga and removed request for jujaga October 19, 2023 00:11
frontend/src/utils/utils.ts Outdated Show resolved Hide resolved
frontend/src/utils/utils.ts Outdated Show resolved Hide resolved
frontend/src/utils/utils.ts Outdated Show resolved Hide resolved
frontend/src/services/versionService.ts Outdated Show resolved Hide resolved
frontend/src/services/versionService.ts Outdated Show resolved Hide resolved
frontend/src/services/objectService.ts Outdated Show resolved Hide resolved
frontend/src/services/objectService.ts Outdated Show resolved Hide resolved
frontend/src/services/objectService.ts Outdated Show resolved Hide resolved
frontend/src/services/objectService.ts Outdated Show resolved Hide resolved
@TimCsaky TimCsaky force-pushed the meta-tag-filter branch 2 times, most recently from 43cb9ea to 415bf22 Compare October 23, 2023 18:57
@TimCsaky TimCsaky force-pushed the meta-tag-filter branch 2 times, most recently from e131d59 to 0571065 Compare October 23, 2023 20:26
@TimCsaky TimCsaky force-pushed the meta-tag-filter branch 2 times, most recently from e12b55a to a1941e6 Compare October 23, 2023 21:39
@jujaga jujaga marked this pull request as draft October 23, 2023 23:40
@jujaga jujaga marked this pull request as ready for review October 24, 2023 23:06
@jujaga jujaga merged commit 21609ec into master Oct 24, 2023
14 checks passed
@jujaga jujaga deleted the meta-tag-filter branch October 24, 2023 23:28
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.

4 participants