question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot make Revision current through code change (publisher)

See original GitHub issue

I have two revisions:

{
  "name": "myApi",
  "properties": {
    "apiRevision": "1",
    "apiVersion": "v1",
    "isCurrent": true,
}
{
  "name": "myApi;rev=2",
  "properties": {
    "apiRevision": "2",
    "apiVersion": "v1",
}

When I set revision 2 to be current in the portal, here is the code change the extractor tool makes in a PR:

{
  "name": "myApi;rev=1",
  "properties": {
    "apiRevision": "1",
    "apiVersion": "v1",
}
{
  "name": "myApi",
  "properties": {
    "apiRevision": "2",
    "apiVersion": "v1",
    "isCurrent": true,
}

Note how ;rev=# has been added to the non-current revision and is removed from the current revision.

I create a new revision in code like this and merge it to the main branch:

{
  "name": "myApi;rev=3",
  "properties": {
    "apiRevision": "3",
    "apiVersion": "v1",
}

After the publisher pipeline runs, revision 3 is visible as non-current in the portal. image

Then I make this revision current in the code and merge to main again:

{
  "name": "myApi;rev=2",
  "properties": {
    "apiRevision": "2",
    "apiVersion": "v1",
}
{
  "name": "myApi",
  "properties": {
    "apiRevision": "3",
    "apiVersion": "v1",
    "isCurrent": true,
}

The publisher does see I made this change in the most recent commit: image

But it does not make revision 3 current in the portal. image

I could not find any documentation on whether this is the expected behavior. I understand in most cases we will want to turn on a revision in the portal, like hot-swapping an appservice slot, but shouldn’t the portal reflect the updates in the code?

If I make revision 3 current in the portal, then run the extractor, all the changes say The file differs only in whitespace. I would expect the portal to reflect the code and code to reflect the portal whichever way I make the updates.

Please advise. Thank you!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
colincmaccommented, Oct 17, 2022

I’m looking into this this week. Sorry for the delay @shawnmurtagh. I’m going to do a little testing, but this does seem to be a change in behavior from previous testing we’ve had.

You’re right about possible order issues. The REST API calls around API’s, which are saved as versioned-revisioned resources only, and VersionSets, which is only a group of versioned-revisioned API’s, are very temperamental. However, we’ve accounted for these issues (for now).

You may have already surmised this, but the API name prefix ;rev=<revNumber> is for testing revisions that aren’t current. You can actually hit the API with that URI (https://<apim-name>.azure-api.net/<api-slug>/<api-version>;rev=<api-revision>/<api-operation>) and you can test a revision. It looks like you correctly changed the files in code based on what you showed.

If you had a public repo I could look at with PR’s it would help! Either way, I’ll test this on my side to see if I can do an E2E reproduction of your issue.

0reactions
waelkdouhcommented, Nov 16, 2022

Closing this issue due to lack of activity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use revisions in API Management to make non-breaking ...
Make non-breaking changes to your revision · Select Demo Conference API from the API list. · Select the Design tab near the top...
Read more >
Issues with Revision pipeline
We have the admin, Editor and Revisor with the ability to approve revisions and a couple of other roles who submit posts for...
Read more >
Change I make to code behind not updating when I publish ...
Copied and pasted my code into a new application. Everything works, including my changes and I can make changes and they apper when...
Read more >
Revisions in Azure API Management
In this article. Accessing specific revisions; Current revision; Revision descriptions; Take a revision offline; Versions and revisions.
Read more >
Allow anyone to create revisions immediately · Issue #6
At the moment, only the "Revisor" user gets immediate use from the Revisionary plugin. That makes it hard to get started and to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found