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

Add product to version in capabilities response #39851

Merged
merged 5 commits into from
Mar 15, 2022
Merged

Conversation

kulmann
Copy link
Member

@kulmann kulmann commented Mar 4, 2022

Description

Add product to version in capabilities response

This has been introduced by oCIS recently to announce oCIS with a proper
product name. The web ui (as just another API client) defaults to
"ownCloud" if the property is not set. With this enhancement we show the
product name for ownCloud Server as well so that clients don't have to
guess a sane default.

Motivation and Context

Handle all clients equally.

How Has This Been Tested?

... manually with a capabilities request 👀

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@kulmann kulmann self-assigned this Mar 4, 2022
@owncloud owncloud deleted a comment from update-docs bot Mar 8, 2022
@phil-davis
Copy link
Contributor

capabilites/core/status and status.php already contain a data item called productname.

Should we add a data item called product to those, just to be consistent?
The value would be reported the same as for productname.

Then clients can find this called product everywhere, and productname could be "deprecated" (but we would never need to remove it).

PR #39857 is my example.

@phil-davis
Copy link
Contributor

Note: it would be good to have a test somewhere for the version data items. I will have a look tomorrow - if there is no API test scenario then I will add one, because we want to automagically have a test that runs on both oC10 and oCIS-reva that confirms that the data items exist and have some "reasonable" values.

@kulmann
Copy link
Member Author

kulmann commented Mar 8, 2022

Then clients can find this called product everywhere, and productname could be "deprecated" (but we would never need to remove it).

I do like that! Added a commit to this PR. Let's see if someone disagrees. 😁

kulmann and others added 3 commits March 9, 2022 12:30
This has been introduced by oCIS recently to announce oCIS with a proper
product name. The web ui (as just another API client) defaults to
"ownCloud" if the property is not set. With this enhancement we show the
product name for ownCloud Server as well so that clients don't have to
guess a sane default.
@owncloud owncloud deleted a comment from ownclouders Mar 9, 2022
@owncloud owncloud deleted a comment from ownclouders Mar 9, 2022
@phil-davis
Copy link
Contributor

I added the test code. Hopefully it passes. I will enhance the test for the "version" data items so that it also checks the major/minor/micro values for reasonableness.

@phil-davis
Copy link
Contributor

I added the test code. Hopefully it passes. I will enhance the test for the "version" data items so that it also checks the major/minor/micro values for reasonableness.

Test has been enhanced so it validates the major-minor-micro values. A capabilities response has a version section like:

  <version>
   <major>10</major>
   <minor>9</minor>
   <micro>2</micro>
   <string>10.9.2 prealpha</string>
   <edition>Enterprise</edition>
   <product>ownCloud</product>
  </version>

The test finds the string with "10.9.2" at the start and checks that the major, minor and micro data items have the matching values.

@ownclouders
Copy link
Contributor

💥 Acceptance tests pipeline apiAuth-mariadb10.2-php7.4 failed. The build has been cancelled.

https://drone.owncloud.com/owncloud/core/34842/47/1

@sonarcloud
Copy link

sonarcloud bot commented Mar 9, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

33.3% 33.3% Coverage
0.0% 0.0% Duplication

@phil-davis
Copy link
Contributor

@micbar IMO this is ready to merge. Are you (or anyone) OK with this capabilities enhancement?

@phil-davis phil-davis merged commit 545ea9d into master Mar 15, 2022
@delete-merged-branch delete-merged-branch bot deleted the product-in-version branch March 15, 2022 08:26
@jnweiger
Copy link
Contributor

Confirmed fixed in 10.10.0 rc2

<version>
<major>10</major>
<minor>10</minor>
<micro>0</micro>
<string>10.10.0 rc2</string>
<edition>Enterprise</edition>
<product>ownCloud</product>
</version>

The 'edition' normally is 'Community' -- it changes to 'Enterprise', as soon as a license is added.

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.

5 participants