Skip to content

Adds EU support#27

Merged
rafusel merged 8 commits intomainfrom
adds-eu-support
Jul 13, 2021
Merged

Adds EU support#27
rafusel merged 8 commits intomainfrom
adds-eu-support

Conversation

@rafusel
Copy link
Copy Markdown
Contributor

@rafusel rafusel commented Jul 6, 2021

Adds a region flag to the server command that can be either us or eu and determines which PagerDuty region the daemon should talk to. If the flag is not provided it defaults to us.

@rafusel rafusel marked this pull request as ready for review July 6, 2021 00:13
@rafusel rafusel force-pushed the adds-eu-support branch 3 times, most recently from 31963b4 to 9c12438 Compare July 6, 2021 15:39
Copy link
Copy Markdown

@ChezCrawford ChezCrawford left a comment

Choose a reason for hiding this comment

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

Have you tested out whether you can set region: eu in the config.yaml and have the events sent to the correct place? I think that is the primary use case here and it does not seem to be working properly for me.

Comment thread pkg/cmdutil/validate.go
@@ -0,0 +1,10 @@
package cmdutil

func ValidateEnumField(inputVal string, allowedValues []string, err error) error {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛷 Slick 🛷

@rafusel
Copy link
Copy Markdown
Contributor Author

rafusel commented Jul 12, 2021

Have you tested out whether you can set region: eu in the config.yaml and have the events sent to the correct place? I think that is the primary use case here and it does not seem to be working properly for me.

Interesting, it works for me if I do these steps:

  1. remove the old config file by running rm -r /path/to/.pdagent
  2. to test add this line: s.logger.Infof("Server will be using this events url: %v", common.PdEventsUrl()) to the beginning of func (s *Server) Start() error in pkg/server/server.go
  3. build the new pdagent binary with make build
  4. run pdagent init
  5. open the config file in VSCode: code /path/to/.pdagent
  6. edit the region field to be eu instead of us and save the file
  7. run pdagent server

When the server starts up I see this in the server logs:

2021-07-12T13:12:51.817-0400    INFO    Server  server/server.go:62     Server will be using this events url: https://events.eu.pagerduty.com

Are you doing anything differently? Would love to test you method out to see what's going wrong.

UPDATE: pushed a fix for this here -> 6a02985

@rafusel rafusel merged commit 75f16bf into main Jul 13, 2021
@rafusel rafusel deleted the adds-eu-support branch July 13, 2021 18:24
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.

2 participants