Skip to content
Snippets Groups Projects

Aws impl, id version bug fix

Merged Spencer Sutton requested to merge aws-impl into master
1 unresolved thread

Type of change

  • Bug Fix
  • Feature

Does this introduce a change in the core logic?

  • [Yes]

Does this introduce a change in the cloud provider implementation, if so which cloud?

  • AWS
  • Azure
  • GCP
  • IBM

Updates description?

Aws implementation code. Also bug fix that addresses this issue: #55 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
37 44 version = ""
45
46 # make sure trailing colons get removed
38 47 if id_value.endswith(":"):
39 48 _id = id_value[:-1]
40 elif id_value.split(":")[-1].isdigit():
41 version = str(id_value.split(":")[-1])
42 _id = id_value[:-len(version) - 1]
43 else:
44 _id = id_value
49 version = ""
50
51 if re.match(RECORD_ID_WITH_VERSION_REGEX, id_value):
52 id_parts = id_value.split(":")
53 _id = id_parts[0] + ":" + id_parts[1] + ":" + id_parts[2]
54 version = id_parts[3]
  • We can't be 100% sure that the third part of ids with versions is a version, because a bare id can contain both ":" and digits at its end.

    Example:

    test:work-product--WorkProduct:test:121212 is a bare id.

    Then test:work-product--WorkProduct:test:121212:1000 is the same id with the version "1000" and it will pass the regex validation.

    "121212" will be considered a version, because it is the third part of the id.

  • Please register or sign in to reply
  • changed milestone to %M5 - Release 0.8

  • Please register or sign in to reply
    Loading