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

DXE-1960 --srcver option doesn't work #81

Open
naraumi opened this issue Dec 9, 2022 · 6 comments
Open

DXE-1960 --srcver option doesn't work #81

naraumi opened this issue Dec 9, 2022 · 6 comments

Comments

@naraumi
Copy link

naraumi commented Dec 9, 2022

After using the following command, the "based on" value in the Property Manager UI doesn't show "Version 1" but the latest version.
akamai property-manager property-update -p <property> --srcprop <srcprop> --srcver 1

It seems --srcver option doesn't work.

Thank you in advance.

@naraumi
Copy link
Author

naraumi commented Dec 9, 2022

I'm from Akatec. Please let me know if you have any questions.

@wzagrajcz
Copy link

Hello @naraumi
Thank You for opening the issue. Can You confirm (or correct if any mistakes) steps to reproduce this issue?

  1. Have some property (let's call it prop_1) with at least two versions (1 and 2).
  2. You create a new property e.g. named prop_2:
    akamai property-manager property-update -p prop_2 --srcprop prop_1 --srcver 1
    The property is created correctly but it looks (in UI) that property was created from version 2. Is that correct understanding?

Thanks and best regards,
Wojciech

@naraumi
Copy link
Author

naraumi commented Dec 12, 2022

Hi @wzagrajcz
Thank you for checking my post.

The property is created correctly but it looks (in UI) that property was created from version 2. Is that correct understanding?

Yes, your understanding is correct.
In my test, I created a new version of the property with --srcver 1 but UI shows it is based on Version 202 (the latest version).
image

Regards,
naraumi

@wzagrajcz wzagrajcz changed the title --srcver option doesn't work DXE-1960 --srcver option doesn't work Dec 16, 2022
@wzagrajcz
Copy link

Hello @naraumi
Thanks for confirming that. After brief check it seems that indeed there is something wrong with this options.
We will go back to You if we have any update.

best regards,
Wojciech

@wzagrajcz wzagrajcz added the bug Something isn't working label Dec 16, 2022
@wzagrajcz
Copy link

Hello @naraumi
After some deeper investigation, I conclude that cli-pm works as expected: it's copying correct rules from correct property version to correct property. At this moment API does not directly allow to clone versions of other properties but to clone the latest version of target property and put rules from source property into newly created one.

Maybe it will help you to understand it better, learning what happens under the hood (at this moment) when running:
akamai property-manager property-update -p prop_2 --srcprop prop_1 --srcver 1
In this case, since user didn't specify --propver, cli would create new property version, by first cloning latest version of prop_2 and then updating its rules to the ones from prop_1 version 1. UI is showing the actual source of the property. So as we cloning the latest version of prop_2, then UI is showing that.

This works this way because, although PAPI allows creating new property version based on some version of the same property, it does not directly allow to clone versions of other properties. Therefore rules need to be copied "by hand" from one prop version to the other.

Thanks and best regards,
Wojciech

@wzagrajcz wzagrajcz removed the bug Something isn't working label Jan 10, 2023
@TomHart
Copy link

TomHart commented Jun 7, 2024

Hi, I'm noticing the same too:

  1. I have a property with versions, for example version 1 through 10
  2. I want to create a new version, based on the last deployed to "Production" version, let's say that's version 5
  3. So I try
akamai pm property-update \
  --srcprop "example.com-UAT" \
  --srcver "5" \
  -p "example.com-UAT" \
  --message "Message test"

In the UI this creates a new version based of version 10, not 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants