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

[full-ci] Updated MimeTypes configuration for AppRegistry #2603

Merged
merged 8 commits into from
Oct 12, 2021

Conversation

gmgigi96
Copy link
Contributor

Follow up of cs3org/reva#2138. This PR changes the type of the mime types config to a list, to ensure the order of mime types from the config.

@update-docs
Copy link

update-docs bot commented Oct 11, 2021

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@ownclouders
Copy link
Contributor

💥 Acceptance tests Web-Tests-ocis-ocis-storage-1 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-9 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-7 failed. The build is cancelled...

@wkloucek
Copy link
Contributor

@gmgigi96 could you please also update the example config file

{
"application/pdf": {
"extension": "pdf",
"name": "PDF",
"description": "PDF document",
"icon": "",
"default_app": "",
"allow_creation": false
},

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-9 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-1 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-2 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-5 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests localApiTests-apiAccountsHashDifficulty-ocis failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests Web-Tests-ocis-ocis-storage-1 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-8 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-4 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-3 failed. The build is cancelled...

@wkloucek
Copy link
Contributor

Core-API-Tests-ocis-storage-3

@gmgigi96 the CI is failing (https://drone.owncloud.com/owncloud/ocis/7088/21/3)

{"level":"error","service":"storage","error":"unable to register services: rgrpc: grpc service appregistry could not be started,: 1 error(s) decoding:\n\n* 'mime_types' expected a map, got 'slice'","time":"2021-10-11T09:30:20Z","message":"error starting the grpc server"}

Do you need to update REVA for this to work?

@gmgigi96
Copy link
Contributor Author

Core-API-Tests-ocis-storage-3

@gmgigi96 the CI is failing (https://drone.owncloud.com/owncloud/ocis/7088/21/3)

{"level":"error","service":"storage","error":"unable to register services: rgrpc: grpc service appregistry could not be started,: 1 error(s) decoding:\n\n* 'mime_types' expected a map, got 'slice'","time":"2021-10-11T09:30:20Z","message":"error starting the grpc server"}

Do you need to update REVA for this to work?

How can I do? Sorry it's the first time :)

@wkloucek
Copy link
Contributor

Do you need to update REVA for this to work?

How can I do? Sorry it's the first time :)

go get github.com/cs3org/reva@master

@wkloucek wkloucek changed the title Updated MimeTypes configuration for AppRegistry [full-ci] Updated MimeTypes configuration for AppRegistry Oct 11, 2021
@ownclouders
Copy link
Contributor

💥 Acceptance tests Web-Tests-ocis-ocis-storage-1 failed. The build is cancelled...

@ownclouders
Copy link
Contributor

💥 Acceptance tests Core-API-Tests-ocis-storage-9 failed. The build is cancelled...

@wkloucek
Copy link
Contributor

@gmgigi96 I gave it a try but I got a huge response on the /app/list/ endpoint:

...
 {
      "mime_type": "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
      "ext": "application/octet-stream",
      "app_providers": [
        {
          "mime_types": [
            "image/vnd.dxf",
            "application/x-mswrite",
            "application/vnd.sun.xml.draw.template",
            "application/vnd.oasis.opendocument.spreadsheet",
            "application/msword",
            "application/vnd.visio",
            "image/tiff",
            "application/vnd.ms-powerpoint",
            "application/x-mspublisher",
            "text/csv",
            "application/vnd.ms-excel.template.macroenabled.12",
            "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
            "application/vnd.apple.numbers",
            "application/vnd.ms-works",
            "application/vnd.ms-excel",
            "application/vnd.ms-powerpoint.template.macroenabled.12",
            "application/vnd.openxmlformats-officedocument.presentationml.template",
            "application/vnd.oasis.opendocument.presentation-template",
            "application/vnd.oasis.opendocument.presentation",
            "application/vnd.oasis.opendocument.graphics-template",
            "text/plain",
            "image/jpeg",
            "application/x-abiword",
            "image/wmf",
            "application/vnd.oasis.opendocument.graphics",
            "application/vnd.oasis.opendocument.text",
            "application/vnd.sun.xml.impress",
            "application/vnd.ms-excel.sheet.binary.macroenabled.12",
            "application/x-pilot",
            "application/vnd.oasis.opendocument.spreadsheet-template",
            "application/vnd.oasis.opendocument.text-master",
            "application/vnd.sun.xml.impress.template",
            "application/vnd.sun.xml.calc",
            "image/svg+xml",
            "application/vnd.oasis.opendocument.text-web",
            "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
            "application/vnd.ms-word.document.macroenabled.12",
            "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
            "application/vnd.wordperfect",
            "application/vnd.sun.xml.calc.template",
            "application/vnd.sun.xml.draw",
            "application/octet-stream",
            "application/vnd.apple.pages",
            "image/emf",
            "application/vnd.sun.xml.writer.global",
            "text/rtf",
            "application/vnd.oasis.opendocument.text-template",
            "application/vnd.ms-powerpoint.presentation.macroenabled.12",
            "application/x-gnumeric",
            "application/vnd.sun.xml.writer",
            "application/vnd.openxmlformats-officedocument.presentationml.presentation",
            "application/vnd.openxmlformats-officedocument.spreadsheetml.template",
            "application/vnd.sun.xml.writer.template",
            "image/png",
            "image/gif",
            "image/cgm",
            "application/vnd.ms-excel.sheet.macroenabled.12",
            "application/vnd.ms-word.template.macroenabled.12",
            "image/x-freehand",
            "application/vnd.openxmlformats-officedocument.wordprocessingml.template",
            "image/x-ms-bmp"
          ],
          "name": "Collabora",
          "icon": "https://www.collaboraoffice.com/wp-content/uploads/2019/01/CP-icon.png"
        }
      ],
      "name": "APPLICATION/OCTET-STREAM file",
      "description": "APPLICATION/OCTET-STREAM file"
    },
 ...

@wkloucek
Copy link
Contributor

also having

    {
      "mime_type": "image/tiff",
      "ext": "application/octet-stream",
      ...
      "name": "APPLICATION/OCTET-STREAM file",
      "description": "APPLICATION/OCTET-STREAM file"
    },

is not nice since this is not the file extension, nor a proper name and description (if there is nothing configured in the config file, it should be empty or omitted)

@wkloucek
Copy link
Contributor

wkloucek commented Oct 11, 2021

@gmgigi96 I added a PR to REVA to fix that: cs3org/reva#2149

With this fix it looks fine:

{
  "mime-types": [
    {
      "mime_type": "application/vnd.oasis.opendocument.text",
      "ext": "odt",
      "app_providers": [
        {
          "name": "Collabora",
          "icon": "https://www.collaboraoffice.com/wp-content/uploads/2019/01/CP-icon.png"
        }
      ],
      "name": "OpenDocument",
      "description": "OpenDocument text document",
      "allow_creation": true
    },
    {
      "mime_type": "application/vnd.oasis.opendocument.spreadsheet",
      "ext": "ods",
      "app_providers": [
        {
          "name": "Collabora",
          "icon": "https://www.collaboraoffice.com/wp-content/uploads/2019/01/CP-icon.png"
        }
      ],
      "name": "OpenSpreadsheet",
      "description": "OpenDocument spreadsheet document",
      "allow_creation": true
    },
    {
      "mime_type": "application/vnd.oasis.opendocument.presentation",
      "ext": "odp",
      "app_providers": [
        {
          "name": "Collabora",
          "icon": "https://www.collaboraoffice.com/wp-content/uploads/2019/01/CP-icon.png"
        }
      ],
      "name": "OpenPresentation",
      "description": "OpenDocument presentation document",
      "allow_creation": true
    },
    {
      "mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
      "ext": "docx",
      "app_providers": [
        {
          "name": "Collabora",
          "icon": "https://www.collaboraoffice.com/wp-content/uploads/2019/01/CP-icon.png"
        }
      ],
      "name": "Microsoft Word",
      "description": "Microsoft Word document",
      "allow_creation": true
    },
    {
      "mime_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
      "ext": "xlsx",
      "app_providers": [
        {
          "name": "Collabora",
          "icon": "https://www.collaboraoffice.com/wp-content/uploads/2019/01/CP-icon.png"
        }
      ],
      "name": "Microsoft Excel",
      "description": "Microsoft Excel document",
      "allow_creation": true
    },
    {
      "mime_type": "application/vnd.openxmlformats-officedocument.presentationml.presentation",
      "ext": "pptx",
      "app_providers": [
        {
          "name": "Collabora",
          "icon": "https://www.collaboraoffice.com/wp-content/uploads/2019/01/CP-icon.png"
        }
      ],
      "name": "Microsoft PowerPoint",
      "description": "Microsoft PowerPoint document",
      "allow_creation": true
    },
    {
      "mime_type": "text/csv",
      "app_providers": [
        {
          "name": "Collabora",
          "icon": "https://www.collaboraoffice.com/wp-content/uploads/2019/01/CP-icon.png"
        }
      ]
    },
    .....

@gmgigi96
Copy link
Contributor Author

Thanks, you anticipated me :)

@labkode
Copy link
Contributor

labkode commented Oct 11, 2021

@wkloucek we need help here to unblock the tests. Can you take the PR as it is and fix the CI? Thanks

@wkloucek wkloucek self-requested a review October 11, 2021 13:44
@wkloucek
Copy link
Contributor

@wkloucek we need help here to unblock the tests. Can you take the PR as it is and fix the CI? Thanks

We are on it

@wkloucek
Copy link
Contributor

wkloucek commented Oct 11, 2021

@wkloucek we need help here to unblock the tests. Can you take the PR as it is and fix the CI? Thanks

We are on it

@labkode @gmgigi96 Will be unblocked by cs3org/reva#2152 cs3org/reva#2154, this PR needs a REVA update again after the merge.

@gmgigi96
Copy link
Contributor Author

@wkloucek we need help here to unblock the tests. Can you take the PR as it is and fix the CI? Thanks

We are on it

@labkode @gmgigi96 Will be unblocked by cs3org/reva#2152, this PR needs a REVA update again after the merge.

@wkloucek I do not understand why this PR is blocked by that reva PR. Could you go ahead with this (if only needs a reva update) and create an other one for only updating reva after that PR will be merged?

@wkloucek
Copy link
Contributor

@wkloucek we need help here to unblock the tests. Can you take the PR as it is and fix the CI? Thanks

We are on it

@labkode @gmgigi96 Will be unblocked by cs3org/reva#2152, this PR needs a REVA update again after the merge.

@wkloucek I do not understand why this PR is blocked by that reva PR. Could you go ahead with this (if only needs a reva update) and create an other one for only updating reva after that PR will be merged?

The REVA update in this PR pulls in a regression. This is why the tests fail. The PR I linked, fixes this regression IN REVA.
Sometimes it gets more complicated than one like :-/

We cannot pull in this PR without REVA because it depends on changes in REVA.

Actually we can also not update REVA until this PR is merged...

@wkloucek
Copy link
Contributor

@gmgigi96 sorry... It must be cs3org/reva#2154

Copy link
Contributor

@wkloucek wkloucek left a comment

Choose a reason for hiding this comment

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

LGTM, tests should also become green now :-)

@gmgigi96
Copy link
Contributor Author

LGTM, tests should also become green now :-)

Thanks :)

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
56.0% 56.0% Duplication

@wkloucek wkloucek merged commit 1a8faff into owncloud:master Oct 12, 2021
ownclouders pushed a commit that referenced this pull request Oct 12, 2021
Merge: f75c781 121e133
Author: Willy Kloucek <[email protected]>
Date:   Tue Oct 12 10:07:03 2021 +0200

    Merge pull request #2603 from gmgigi96/appregistry-config

    [full-ci] Updated MimeTypes configuration for AppRegistry
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